---
title: "Run Cloudflare's security-audit skill"
slug: cloudflare-security-audit-skill
severity: medium
category: Configuration
summary: "Cloudflare's security-audit skill is a free MIT skill that drives a coding agent through a source audit. A full run spends agent invocations, and the skill file tells the agent to stop when the budget cannot cover them."
platforms:
  - Next.js
updated: "2026-10-14"
related:
  - secret-keys-in-the-frontend
  - auth-checked-only-in-the-ui
---

Cloudflare's [security-audit skill](https://github.com/cloudflare/security-audit-skill) is a set of instructions for a coding agent, not a website you paste a URL into. The README says it turns the agent into an auditor that maps the codebase, hunts for failures of a real trust boundary, and writes findings only after a different agent tries to disprove them. The README also says this skill is the single-repo starting point for the vulnerability harness described in Cloudflare's post [Build your own vulnerability harness](https://blog.cloudflare.com/build-your-own-vulnerability-harness).

The skill file splits work into guidance mode and full audit mode. Loading the skill does not start the full workflow. A full audit runs when you explicitly ask for an audit, a pen-test, or report files. The six phases in the README are reconnaissance, coverage-led hunting, candidate validation, structured output, an independent check of those records, and a report built from the verified records.

## How to check in 5 minutes

1. Open the README and confirm the install command is `npx skills add https://github.com/cloudflare/security-audit-skill --skill security-audit`.
2. Run `npx skills --help` and look for `--agent`. On 2026-10-14 the examples included `--agent claude-code`. The skill file itself says the skill is agent-neutral and does not name Claude Code.
3. Read the "Cost budget" section of `skills/security-audit/SKILL.md` before you ask for a full audit. It counts spend as agent invocations, not as a dollar price.

## How to fix

### Claude Code

Install into Claude Code with the agent flag shown in the Skills CLI help, checked on 2026-10-14:

```bash
npx skills add https://github.com/cloudflare/security-audit-skill \
  --skill security-audit \
  --agent claude-code
```

Start Claude Code in the repository you want reviewed. The README's examples are "security audit this codebase" and "find security vulnerabilities in ./src". Ask for guidance mode if you only want a question answered. Ask for a full audit only when you mean the six phases.

Before a full audit, set a budget. The skill file says one coverage unit is about one hunter assignment, and a surviving candidate is one or two verifier assignments. It also says the agent must not launch hunters if the remaining budget cannot reserve the critic and verifier calls, and that a strict budget must not be exceeded silently. The README does not name a credit unit or a dollar price. The cost is whatever your coding agent charges for those invocations.

### Next.js

The skill reads source. It does not, by itself, open your deployed URL. The skill file says not to probe deployed endpoints, and to leave a lead as `needs_validation` when the decisive fact is outside the repository. A missing header on the live site can stay unconfirmed until you check the response yourself.

Read `findings.json` by the verdict names in the README. `confirmed` has a source trace and an observed result. `needs_validation` has an unresolved fact and no severity. `rejected` was disproved. Do not treat `needs_validation` as a vulnerability, and do not merge a change the agent describes. The skill file says the audit describes fixes and does not modify the target.

## Agent prompt

```text
You are using Cloudflare's security-audit skill in guidance mode. Do not start a full six-phase audit unless I set an agent-invocation budget first.

1. Read SKILL.md and tell me whether my request is guidance mode or full audit mode.
2. If it is a full audit, estimate hunter and verifier invocations from the cost-budget section and stop if I have not named a maximum.
3. Do not probe the deployed site. If a check needs a live response, mark it needs_validation.
4. Report confirmed, needs_validation, and rejected separately. Do not give needs_validation a severity.
```

## FAQ

### Does the README say this spends Claude credits?

No. The README does not mention credits or a price. `SKILL.md` tells the parent agent to record a budget as a maximum number of agent invocations, and to refuse the run when that budget cannot pay for reconnaissance plus the reserved critic and verifier calls.

### Is one run enough?

The README says that in Cloudflare's test runs, a single run found roughly half of the vulnerabilities that repeated runs found in total. Treat one report as partial. The skill file says a quick or scoped run must present itself as partial coverage.

## Sources

- [security-audit skill README](https://github.com/cloudflare/security-audit-skill)
- [SKILL.md cost budget](https://github.com/cloudflare/security-audit-skill/blob/main/skills/security-audit/SKILL.md)
- [Build your own vulnerability harness](https://blog.cloudflare.com/build-your-own-vulnerability-harness)
