What does this skill do?

The Claude Code Skill Security Audit scans the .claude/ configuration directory for vulnerabilities, misconfigurations, and injection risks using AgentShield. It checks CLAUDE.md, settings.json, MCP servers, hooks, and agents, and generates a report with an alphabetical grade (A–F) and optional automatic fixes.

New Project Setup
Run a scan when setting up a new project with Claude Code to identify risks from the start.
After changing the settings
Check for changes in settings.json, CLAUDE.md, or MCP settings before committing them to the repository.
Addition to an existing repository
Audit your legacy Claude Code settings when you join a new project.
Periodic audits
Conduct regular health and safety inspections to keep the project safe.

Usage examples

🔍 Basic scan
Run a security scan on my Claude Code project and generate a report in Markdown.
🔧 Auto-correction
Scan the .claude/ configuration and apply any safe automatic fixes that are available.
🧠 Adversarial Analysis with Opus
Run an in-depth security analysis with Opus using my ANTHROPIC_API_KEY for a three-phase evaluation.
📂 Scan a specific route
Audit the Claude Code configuration in the /my-project/.claude/ directory and show me the critical findings.

Features

Full scan of .claude/ Check CLAUDE.md, settings.json, MCP servers, hooks, and agents for vulnerabilities.
Safe Auto-Correction Replace encoded secrets with environment variables and adjust wildcard permissions using the --fix option.
Adversarial Analysis with Opus A three-agent pipeline (Attacker, Defender, Auditor) for a comprehensive security assessment.
Gravity Classification Report with an alphabetical rating (A–F) and findings classified into four levels: Critical, High, Medium, and Info.
Exporting Reports Generate reports in Markdown format that are ready to be documented and shared with the team.

Frequently asked questions

It's not required. The skill can run AgentShield directly with npx without installing it first. If you'd prefer to have it available, you can install it globally.
You need to set the ANTHROPIC_API_KEY environment variable. The analysis launches a pipeline of three agents (Attacker, Defender, Auditor) for a comprehensive adversarial evaluation.
It detects everything from exposed API keys and unrestricted shell access (Critical) to missing blocklists (High), silent error suppression (Medium), and best practices for reporting (Info).
Yes. The --fix option only applies fixes that are considered safe, such as replacing hard-coded secrets with environment variables or adjusting overly permissive wildcard permissions.
Claude Code Security Audit — Vulnerability Scan with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.