What Is the Cloudflare security-audit Skill? Auditing Your Own Code for Security With a Coding Agent
You tell your coding agent "audit this project"; Cloudflare's security-audit skill turns the agent into a six-phase security auditor. The agent first maps your code, then hunts for vulnerabilities with separate subagents per attack type; each candidate found is handed to a fresh agent that didn't find it, which tries to refute it. The remaining findings are written to a machine-readable findings.json file and readable Markdown reports; the skill doesn't change your code, it describes the fix. The skill is free and open source (MIT), but the audit uses up your agent's model usage. Support for reports in Turkish is not stated in the official documentation.
- What it does
- Turns a coding agent into a security auditor
- Type
- Skill (instruction files + two validator scripts)
- Maker
- Cloudflare (official repository)
- Output
- findings.json + 3 Markdown reports
- Does it change your code
- No, it describes the fix
- Windows
- Validators don't work (open issue)
- Cost
- Skill is free (MIT); model usage is separate
What Is the Cloudflare security-audit Skill For?
Instead of asking a coding agent for a single answer to "are there security vulnerabilities in this code?", the security-audit skill ties the job to a method. According to the README's design principles, a finding's severity is based on likelihood × impact, not on deviation from a checklist; a claim that can't be validated doesn't count as a finding. To do this, the skill runs the agent like an audit team and forces every claim through evidence and independent validation. A skill is a ready-made instruction package that tells the assistant how to do a specific job.
Cloudflare wrote this skill to find vulnerabilities in its own codebase; it later grew the internal system that scans 128 repositories out of this skill, and open-sourced the skill with a blog post on June 18, 2026. Who it helps: developers and small technical teams who want the code of their site, app, API or library audited before release. What it doesn't do: it doesn't fix your code or scan your live site or server; it works by reading the source code and only with safe local testing.
!This skill is for defensive use: only audit your own code or code you're authorized to audit.
How Does It Work? Six Phases
| Phase | What happens | What it produces |
|---|---|---|
| 1. Reconnaissance | Parallel research agents read the code without network access: product type, languages, entry points, trust boundaries, previous runs. | architecture.md, coverage-ledger.json |
| 2. Coverage-led hunting | A separate hunter agent for each unit in the ledger; attack-type files (web and authentication, client side, cloud, supply chain, AI and LLM, memory safety…) are chosen to fit the target. | Structured candidate list |
| 3. Candidate validation | Each unique candidate is given to a fresh validator that tries to refute it. | A verdict per candidate |
| 4. Structured output | Verdicts are written to findings.json and checked with report-schema.json and validate-findings.cjs. | findings.json |
| 5. Independent record validation | Fresh agents re-check the source claims of the final records; a record that changes is independently validated once more. | Validated records |
| 6. Target-independent report | Readable reports are derived only from validated records; they contain no instructions for testing the live system. | REPORT.md, FINDINGS-DETAIL.md, NEEDS-VALIDATION.md |
There are two operating modes. According to SKILL.md, the skill is in guidance mode by default: for a security question, a review of a single file or the investigation of a specific finding, it uses only the relevant part, doesn't run the six phases and doesn't create files. Full audit mode turns on only when you explicitly ask it to audit a codebase, run a "pen-test", do a comprehensive review or produce a report file. If your request looks like both, the agent asks a single question before creating files.
Source: README "What it does", SKILL.md "Operating modes" and "Full audit workflow", RECONNAISSANCE.md (October 29, 2026). The Cloudflare blog describes the first version as seven phases; the seventh phase was submission to Cloudflare's own internal system. The current version in the repository has six phases.
How Do You Install It? Claude Code, Codex and Other Agents
The README gives the installation with the Skills CLI: Vercel's command-line tool that installs skills into the skill folders of different coding agents. No account or API key is needed. You run the command in the folder of the project you'll audit; the CLI asks which agent to install it for.
› npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit› npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit --global- For agent selection and non-interactive install options, the README points to the
npx skills --helpcommand. - The Skills CLI requires Node.js 22.20 or later; the skill's validator scripts also run on Node.js.
- There's no version tag in the repository: the command takes the main branch as of install time (on October 29, 2026, the latest change was September 14, 2026, commit c1c8a8c). Later changes come in with
npx skills update.
The Skills CLI sends anonymous usage data during installation; to turn it off, put DISABLE_TELEMETRY=1 in front of the command (Skills CLI README).
The official README doesn't describe uploading it to the Claude app (claude.ai, Desktop) as a ZIP; an upload error reported by a user is under "Common problems".
How Do You Use It? What You Type, What You Get
Start your agent inside the code repository you want to audit (or point it to the repository) and ask for a security audit in plain language. According to the README, when the request matches a trigger (such as "security audit", "find vulnerabilities", "pen-test the code"), the skill kicks in automatically; you don't need to type a separate command. The requests below are examples from the README; the outputs are described according to the official documentation.
| Profile | When | What changes |
|---|---|---|
| quick | Small project, quick first look, re-runs | A single hunting wave, a single final coverage check; the report says "partial" |
| standard (default) | Most projects | The full workflow as documented |
| deep | Large or high-risk project | Finer coverage units, checks until a clean pass, candidate validation and final validation by separate agents |
You can add a budget to your request (such as "at most 40 agent calls"). SKILL.md records the budget as a number of agent calls; if the budget doesn't cover reconnaissance and the mandatory checks, the agent doesn't start at all and asks for a larger budget or a narrower scope. The profile doesn't lower the evidence bar; it only changes the breadth.
Running it again pays off. A second run on the same repository reads the previous coverage ledger and findings, and targets gaps and changed code. README: in Cloudflare's own tests, a single run found about half of the vulnerabilities that repeated runs found in total (the maker's measurement).
What Do You Get in the Report? findings.json and Three Markdown Files
| confirmedYes | A vulnerability with a full trace in the source and a bounded, observed outcome. Only these get a severity: critical, high, medium, low, info. |
|---|---|
| needs_validationUnclear | A claim grounded in the source but stuck on a single missing fact (e.g. the server configuration isn't in the repository). No severity is given; exactly what's missing and a safe validation plan are written down. |
| rejectedNo | A candidate refuted by the validator agent. It isn't described as a finding in the report. |
- REPORT.md: run profile and scope, a short security posture summary, a table of confirmed findings (severity, title, affected boundary, one-line outcome), each finding's source location, local reproduction, impact and smallest source fix, a separate "needs validation" table, hardening notes and a coverage summary.
- FINDINGS-DETAIL.md: the full trace of medium, high and critical findings, local reproduction steps with a fake user and resource, a fix and a suggested regression test.
- NEEDS-VALIDATION.md: the list of claims that couldn't be validated, the fact each one is stuck on and how to resolve it.
A clean run can end with zero findings; in that case the documentation explicitly asks not to invent "low" findings. The skill doesn't change the target code: it describes the fix, and applying it is up to you (or an agent you ask separately).
Source: README, VALIDATION-AND-REPORTING.md (phases 4–6), SKILL.md "Separate priority from certainty" (October 29, 2026).
Which Agents Does It Work With? Claude Code, Codex, Cursor
Cloudflare's documentation names no specific agent; it describes the skill as "agent-agnostic" and sets one requirement: a coding agent with a model that can use tools and run parallel subagents. The README of the install tool, Skills CLI, supports OpenCode, Claude Code, Codex, Cursor and 75 more agents.
| Claude Code, Codex, Cursor, OpenCodePartly | The Skills CLI installs to these agents. The Cloudflare documentation doesn't mention them by name; subagent support is checked in the agent's own documentation. |
|---|---|
| Claude app (ZIP upload)Unclear | The README doesn't describe this route; an open user report on GitHub describes an upload error. |
| WindowsPartly | Guidance mode doesn't need the validators because it produces no files; a full audit stops at phase 4, because the validator scripts reject every input on Windows (validate-findings.cjs line 608; Common problems). |
| Reports in TurkishUnclear | Not stated in the official documentation. Instructions and file names are in English; asking for the report in Turkish is up to the agent's model. |
What Does It Do to My Code? Does It Go Online?
- Reads: the source code of the repository you audit, local configuration and build files; the previous run's ledger and findings, if any
- Writes: audit files to the output folder outside the target; each subagent only to its own temporary folder
- Doesn't change the target source; doesn't install dependencies or let the build download packages from outside
The reconnaissance agents' instructions say "don't use network access"; live sites, external services, production accounts and paid API quotas aren't tested. But your code goes to your agent's model provider, as in any agent session; for files containing secret keys, check your agent's data rules.
Only if there's an operating-system-level sandbox: external network off, environment variables empty and from an allowlist, CPU, memory and disk limited, writing only to a temporary folder. If any of these conditions isn't met, the target code isn't run; the claim stays "needs_validation".
Maintenance: the latest change on the main branch was September 14, 2026; the open PR queue is long and there's no SECURITY.md in the repository. Recorded warnings: no security advisories on GitHub; on skills.sh two audits "passed" and Snyk gives a "warning"; this isn't a security certification.
!An audit report isn't a security guarantee: the documentation explicitly states that a single run doesn't exhaust the target and that areas left out of scope shouldn't be considered "clean".
Is It Free? How Much Does an Audit Cost?
The skill itself is free and open source (MIT); no account, subscription or Cloudflare product is needed. The real cost is that the audit uses your agent's model: a full audit runs many subagents (reconnaissance agents, a hunter per coverage unit, one or two validators per candidate). The official sources give no token or dollar amount for an audit; the amount depends on the repository's size, the profile and your agent's plan.
- Track spending in your agent's usage dashboard; do your first try on a small repository with the quick profile.
- Write an agent-call limit into your request; SKILL.md asks that the budget you set not be silently exceeded.
- The Cloudflare blog says that in its own multi-repository system almost all of the compute budget went to the hunting phase; this isn't a figure for the single-repository skill.
- Use, copy, modify and distribute, including commercial use (MIT)
- Remove the copyright and license notice from copies
- The software is provided "as is"; Cloudflare gives no warranty
Source: LICENSE (MIT, Copyright (c) 2025-2026 Cloudflare, Inc.), SKILL.md "Cost budget", Cloudflare blog "What it costs" (October 29, 2026). This is not legal advice.
Common Problems and Fixes
| What's happening | What to do |
|---|---|
| On Windows the validators throw "OS no-follow and nonblocking input protection is unavailable" | Because these protections don't exist on Windows in the source code, the script rejects every input (validate-findings.cjs). A proposed fix is waiting in an open PR (issue #117, PR #113). Run the full audit on macOS, Linux or WSL. |
| "SKILL.md file must be in the top-level folder" error when uploading a ZIP to the Claude app | Reported by users GitHub issue #64: in the repository ZIP, SKILL.md is two folders deep (skills/security-audit). No official fix has been posted; use the Skills CLI installation from the README. |
| The agent didn't start the six phases, it only answered in the chat | Expected behavior: a focused question stays in guidance mode. For a full audit, explicitly ask for "security audit this codebase" or a report file. |
| The agent stopped and asked for a budget or output folder | The documentation requires the agent to stop if the budget doesn't cover reconnaissance and the mandatory checks, or if the folder you chose is inside the repository and not ignored by version control. Increase the budget, narrow the scope or give a folder outside the repository. |
| The report has many "needs_validation" items and few "confirmed" | If there's no sandbox, or decisive information (server configuration, identity provider) isn't in the repository, the claim doesn't count as confirmed. NEEDS-VALIDATION.md gives the missing fact and a safe validation plan for each one. |
How Do You Uninstall It?
› npx skills remove security-auditThe command comes from the command table in the Skills CLI README (npx skills remove [skills...]). The audit outputs stay in a separate folder (by default ~/security-audit-skill/); you delete them yourself.
Frequently asked questions
What is the Cloudflare security-audit skill?
An open source (MIT) skill from Cloudflare that turns a coding agent into a six-phase security auditor. The agent maps the code, hunts for vulnerabilities by attack type, has a separate agent try to refute each candidate, and writes what remains to findings.json and Markdown reports.
How do I install it in Claude Code?
In your project's folder, run npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit and choose Claude Code as the agent. For all your projects, add --global to the end of the command.
Does it work in Codex or Cursor?
The Cloudflare documentation names no agent; it requires an agent that uses tools and can run parallel subagents. The install tool, Skills CLI, supports Codex, Cursor, OpenCode and Claude Code.
What should I type to use it?
Start your agent inside the repository you want to audit and type "security audit this codebase" or "find security vulnerabilities in ./src"; the skill kicks in automatically when the request matches.
What comes out in the report?
In findings.json, a confirmed, needs validation or rejected verdict for each candidate; in REPORT.md, FINDINGS-DETAIL.md and NEEDS-VALIDATION.md, severity, source location, local reproduction and the smallest suggested fix.
Does it change my code?
No. According to the documentation, the audit describes fixes and doesn't change the target source; by default it writes files to the ~/security-audit-skill folder outside the repository.
Is it free?
The skill is free and MIT licensed. However, the audit uses up your agent's model usage; the official sources give no amount for an audit. You can set a budget as a number of agent calls.
Related guides
Sources
- security-audit-skill repository and README
- SKILL.md (modes, safe execution, budget)
- VALIDATION-AND-REPORTING.md (phases 3–6)
- License (MIT)
- Cloudflare blog: Build your own vulnerability harness
- Skills CLI (install tool)
- skills.sh page and audits
- Issue #117: validators on Windows
- Issue #64: ZIP upload to the Claude app
Not clear in the official sources: The token or dollar cost of an audit · subagent behavior in agents the Cloudflare documentation doesn't name (Claude Code, Codex, Cursor) · uploading to the Claude app as a ZIP · reports in Turkish · when the Windows validator bug will be fixed · an install path pinned to a commit. Each is covered in the relevant section along with what you can do.




