$ skilldirectory
— zsh — registry.skilldirectory.dev
skill libraryblogguidesabout

home / blog / security

How to Use AI Agent Skills for Automated Security Audits (2026)

Quick answer: An AI agent security-audit skill turns your coding agent into a structured auditor.

Install one, point your agent at code you are authorised to test, run it in a sandbox, and treat every finding as a lead to verify, not proof.

Security audit skills are a fast-growing kind of agent skill. Instead of matching code against fixed rules, they give an AI coding agent a method for finding, checking and reporting vulnerabilities.

This guide explains how they work, using Cloudflare's open-source skill as the worked example, and how to run your first audit safely.

Why security audit skills are in the news

Cloudflare's security-audit-skill has been one of the fastest-rising projects on GitHub. It was created on June 18, 2026, and had about 67,000 stars on November 6, 2026.

One developer write-up reported it spent five days at or near the top of GitHub's trending list in late October. We could not independently confirm any exact weekly star figure, so we do not quote one.

Cloudflare's security-audit skill at a glance

QuestionAnswer
What is it?A coding-agent skill for multi-phase security audits
Who made it?Cloudflare
LicenceMIT
How does it work?Six phases run by isolated agents, with independent verification
What does it produce?Structured findings plus Markdown reports
How do you install it?The Skills CLI, with one command
What does it need?A tool-using model with parallel sub-agents, Node.js and a sandbox

The project says this skill seeded Cloudflare's own vulnerability discovery harness. That harness grew into a larger, multi-stage system, and the skill is the single-repository starting point it evolved from.

How an audit skill differs from a scanner

A scanner, such as a static analysis tool, matches code against known patterns. It is fast and repeatable, but it can only find what its rules describe.

An audit skill gives an agent a way of working: map the system, hunt for weaknesses, try to disprove each candidate and report only what holds up. It can reason about how pieces fit together, but it can also be wrong, so it complements scanners rather than replacing them.

For the scanner side, see our SAST Configuration skill.

The six phases of Cloudflare's audit

A full audit runs these phases in order.

PhaseWhat happensWhat it writes
1. ReconnaissanceMaps architecture, trust boundaries and input surfacesarchitecture.md, coverage-ledger.json
2. Coverage-led huntingIsolated hunters check units from the ledger, and critics look for gapsRecorded checks
3. Candidate validationA fresh verifier tries to disprove every unique candidateVerdicts
4. Structured outputRecords are written and validated against a schemafindings.json
5. Independent verificationFresh agents verify final source claimsCorrected records
6. Target-neutral reportingReports are derived from the verified recordsREPORT.md, FINDINGS-DETAIL.md, NEEDS-VALIDATION.md

The skill runs two bundled validators, one for the coverage ledger and one for the findings. They are zero-dependency Node.js scripts that check the files meet the schema.

The three verdicts

Every finding ends up in one of three states.

  • Confirmed: a complete source trace and a bounded observed result.
  • Needs validation: a lead with an exact unresolved fact, and no severity assigned.
  • Rejected: a candidate that was disproved.

This matters because a loose list of warnings is hard to act on. Separating confirmed issues from open questions tells you where to spend your time.

Design principles worth copying

The README lists principles that apply to any AI audit.

  • Adversarial validation: the agent that checks a finding is never the agent that found it.
  • Severity requires impact: priority comes from likelihood times impact, not from deviation from a checklist.
  • Missing defence is not a vulnerability: if one layer already stops the attack, a missing second layer is a hardening note.
  • Repeat runs improve coverage: in Cloudflare's test runs, one run found roughly half of what repeated runs found in total.

What you need before you start

  • A coding agent whose model supports tool use and parallel sub-agents.
  • Node.js, for the two validators.
  • An OS-enforced sandbox for anything that runs target code, such as builds, tests, fuzzers or browsers.

The sandbox should block external networking, use a cleaned environment, limit resources and allow writes only to scratch folders. Without these controls, the skill keeps a lead as needs-validation instead of running the target's code.

How to run your first AI security audit

Steps 3 to 5 follow Cloudflare's documentation. The others are our suggestions.

1. Get permission and set the scope

Audit only code you own or are authorised to test. Decide what is in scope, such as one service or the whole repository, before you start.

2. Work on a clean copy

Use a fresh branch or a copy of the repository. That keeps audit files and any agent changes away from your working tree.

3. Install the skill

Install it with the Skills CLI. Add the global option for a user-level install.

npx skills add https://github.com/cloudflare/security-audit-skill \
  --skill security-audit

New to installing skills? Read our guide on how to install an agent skill.

4. Start your agent and ask for an audit

Open your coding agent in the codebase and ask in plain words. The skill activates when your request matches, for example:

security audit this codebase

You can also name a folder or an output location.

do a security review, output to ~/audits/my-project

5. Know the two modes

The skill has a guidance mode and a full audit mode. Loading it does not by itself authorise the full workflow or file creation.

  • Guidance mode: for security questions, focused reviews and triage of a specific finding. It uses only the relevant parts and writes no audit files.
  • Full audit mode: for explicit audit or pen-test requests, comprehensive reviews or requested report files. It runs all six phases.

If your request is ambiguous, the skill is meant to ask one question first. In full audit mode, the default output is ~/security-audit-skill/<repo-name>/run-<N>, outside your repository.

6. Review the results in order

Open REPORT.md first, then read the confirmed findings in FINDINGS-DETAIL.md. Then go through NEEDS-VALIDATION.md, because those leads hold the exact facts still to check.

7. Fix, then run it again

Fix the confirmed issues, and run the audit again on the updated code. Later runs use earlier ledgers and findings to target gaps, so repeat runs add to your coverage.

Safety rules for AI security audits

An audit agent reads your code, may build it and may run tests. That makes it more powerful than a chat assistant, so set limits.

  • Use the sandbox: never let an agent run untrusted code with your credentials or network access.
  • Keep secrets out: do not give it production keys or customer data.
  • Read the skill first: this one is 20 files, including two JavaScript validators.
  • Verify before you act: treat each finding as a lead until you reproduce it.

Our safety checklist for agent skills lists what to look for in any skill. The Skill Security Auditor skill can scan one before you install it.

What AI audits cannot do

Be honest about the limits.

  • They are not guarantees. A clean report does not prove the code is secure.
  • They can miss things and can be wrong. That is why independent verification exists.
  • They cost time and usage. A full audit launches many agents.
  • They do not replace a penetration test or a compliance audit. They are one input.

Other security skills in our directory

A full audit is one tool among several. These skills cover narrower jobs.

JobSkill
Full multi-agent code auditCloudflare Security Audit
Threat modellingSTRIDE Analysis Patterns
CI code scanningSAST Configuration
Secrets in pipelinesSecrets Management
API security reviewAPI Security Best Practices
Workflow securityGitHub Actions Hardening

Browse the full Security category. For skills that work across agents, see our guides to Codex skills and Cursor skills, and the best Claude Code skills.

Frequently asked questions

What is the Cloudflare security-audit skill?

It is an open-source coding-agent skill from Cloudflare that runs a six-phase security audit with isolated agents. Findings are verified by a separate agent before they are reported.

Is the Cloudflare security-audit skill free?

Yes. It is published under the MIT licence. You still pay for the AI model usage it consumes.

How do I install it?

Use the Skills CLI with the repository address and the skill name security-audit. The exact command is in the steps above.

Which agents does it work with?

It is agent-neutral and needs a coding agent that supports skills, tool use and parallel sub-agents. Check your agent's documentation for skill support.

Can AI replace a penetration test?

No. An AI audit can surface and verify leads quickly, but it cannot guarantee security. Use it alongside scanners, human review and, where needed, a professional test.

Methodology and disclosure

We read the skill's README and SKILL.md from Cloudflare's repository on November 6, 2026. Star counts come from the GitHub API, and our suggestions are labelled as such.

We have not run the skill ourselves, and we are not affiliated with Cloudflare. This article contains no affiliate links.