Guide · Agent skill
How to use the Claude Security Scanner agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The claude-security skill lets an AI agent run a security review of your code. It can scan a whole repository, a chosen part of it, or only the changes on a branch, pull request, or single commit. This guide explains what an agent skill is, how to install this one, how to ask for each job in plain language, and what to check before you run it.
Quick start
- 1Download the ZIP. Download the claude-security ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one repository.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the skill.
- 4Enable auto mode. Press Shift+Tab until the status bar shows auto mode, or start with claude --permission-mode auto.
- 5Make a request. Ask in plain language, such as scan this repo, scan my branch, or fix the findings. Answer the menu questions if the agent asks.
- 6Watch progress and read results. Open /workflows to follow the stages. Review the report in the CLAUDE-SECURITY-2 folder when the run finishes.
- 7Apply patches yourself. Review any .patch files and their notes, then apply the ones you accept. The skill never commits or opens a pull request for you.
What an agent skill is and what claude-security makes the agent do
An agent skill is a folder with a SKILL.md file that tells an agent how to carry out a specific task. When the request matches the skill's description, the agent follows the skill's instructions instead of improvising.
claude-security covers three jobs. Scan codebase reviews the whole repository or a scoped part of it. Scan changes reviews the diff of a branch or pull request against its base, or one commit against its parent. Suggest patches turns existing findings into targeted patch files that you can review and apply.
- Each reported finding is checked by a separate verifier pass before it appears in a report.
- Patches are written to disk as patch files. Nothing is committed, pushed, or opened as a pull request.
Install the claude-security skill
Download the ZIP for this skill from this page. Then use one of these two methods.
Method one is a personal install. Unzip the file into ~/.claude/skills/ so the skill is available in all your projects. Method two is a project install. Unzip it into the .claude/skills/ folder inside a specific repository so it applies only there.
Method three is the Claude apps. Upload the skill under Settings → Capabilities → Skills.
- Requires Claude Code or a compatible SKILL.md agent runtime.
- Requires Git for scanning branches, pull requests, or commits.
- Requires Python 3 for the helper scripts (render_report.py, save_result.py, write_scan_meta.py, patch_artifacts.py).
- Requires Bash shell access for the scripts and git commands.
Trigger the skill with a natural request
You do not need a special command. Describe what you want in plain language. If your request already names a job, the agent starts that job directly. If it does not, the agent opens a menu with three options: Scan codebase (recommended), Scan changes, and Suggest patches.
Examples of requests the skill responds to include scanning the repo, scanning your branch, fixing the findings, or passing a bare commit sha of 7 or more characters. A ref name in the request also points to the changes job.
- "Scan this repo with Claude Security."
- "Scan my branch with Claude Security."
- "Scan commit 3fa9c21 for security problems."
- "Fix the Claude Security findings."
Run each job and read the results
Scan codebase runs in your session, so there is no separate process to launch. Progress appears in the workflow detail view, which you open with /workflows, and a running count appears in the chat. Scan changes works the same way but focuses on the changed lines and the changed files read in full. An ordinary change usually finishes in minutes.
Suggest patches works four findings at a time. For each, a patch-generator subagent drafts a fix in a scratch copy of the repository. A patch-verifier subagent then reviews the change and runs the project's tests. A .patch file is written only when the verifier is confident the change is targeted, adds no new vulnerability, and leaves behaviour unchanged.
- For best results, use auto mode. Press Shift+Tab until the status bar shows auto mode, or start with claude --permission-mode auto.
- Reports are saved in your project as folders named CLAUDE-SECURITY-2 followed by a timestamp.
claude --permission-mode autoSafety notes: scripts, network and trust
This skill runs helper scripts and uses the network, and it runs in your session under your permissions. Your session's settings, hooks, CLAUDE.md, and MCP servers apply as usual. There is no isolation layer, so open the session in a repository only if you trust it.
The skill treats repository contents, including code, comments, CLAUDE.md, and findings text, as data to review, not as instructions. Nothing is applied automatically. Every suggested fix stays a patch file until you apply it yourself.
For code you do not trust, the source recommends running the whole session inside sandbox-runtime (https://github.com/anthropic-experimental/sandbox-runtime), which enforces filesystem and network restrictions at the OS level.
Tips for getting useful results
Scan changes is the fastest way to check a pull request before merging, because it looks at the diff. Scan codebase is better for a full review. A flaw that the change does not touch is reported by the codebase scan, not the changes scan.
Only committed changes are scanned, so commit your work before asking for a changes scan. Treat findings as leads to verify, and keep a human review in the loop for critical systems.
- Pick a scoped part of the repository when you want a faster run.
- Review each .patch file and its note before applying it.
What people use it for
- Check your own repository for security problems before a release.
- Review a pull request or branch diff for security issues before merging.
- Scan one commit to see whether a specific change introduced a problem.
- Turn confirmed findings into patch files you can review and apply.
- Scan a scoped folder of a large repository to get a faster result.
Frequently asked questions
How do I install the claude-security skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder for one repository. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
What do I need to run claude-security?
You need Claude Code or a compatible SKILL.md agent runtime. Git is needed for scanning branches, pull requests, or commits, Python 3 is needed for the helper scripts, and Bash shell access is needed for the scripts and git commands.
Does claude-security change my code?
No. Suggested fixes are written as patch files on disk that you review and apply yourself. The skill never commits, pushes, or opens a pull request.
Is it safe to scan code I do not trust?
The source says the scan runs in your session with no isolation layer, so it is built for your own code. For untrusted code, run the whole session inside sandbox-runtime, which enforces filesystem and network restrictions at the OS level.
Can I use it instead of a penetration test?
No. The source says it is not a replacement for a dedicated, audited security tool or a penetration test for compliance-critical systems, because its findings come from an AI review.
Why does the scan not find a problem my changes did not touch?
The changes scan reports only flaws that the change takes part in. Flaws that exist regardless of the change are reported by the codebase scan.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use claude-security if you want a second, AI-driven security review of your own repository, a pull request, or a branch, and you want fixes delivered as patch files you control. Pick something else if you need to scan untrusted code without a sandbox, or if you need a dedicated audited tool or penetration test for a compliance-critical system.
Download the skill