skills-auditor

Agent skill security, step by step

How to audit a SKILL.md before your agents run it

An agent skill is a folder with a SKILL.md file and, often, scripts and reference files. When Claude Code, Cursor or Codex loads it, its instructions run with that agent’s permissions: your shell, your files, your tokens. Review a skill the way you would review a new dependency. Work through these twelve checks in order.

The 12-point checklist

  1. Provenance

    Know where the skill came from and pin what you reviewed: a commit, a release tag or a content hash. “Latest from someone’s repo” is not a version.

  2. Frontmatter

    Check that name matches the folder and that description says what the skill does. The description decides when an agent loads the skill, so a vague one (“use for any task”) makes it load almost everywhere.

  3. Description vs. body

    Read the whole SKILL.md. The instructions should do what the description promises and nothing else. A “formatter” that reads ~/.ssh is misaligned.

  4. Tool permissions

    If the skill declares allowed-tools (Claude Code), look for unrestricted shell access such as Bash(*). Ask whether each tool is needed for the stated job.

  5. Scripts

    Open every file in scripts/ and any referenced helper. Red flags: curl … | sh, eval, long base64 or hex blobs, obfuscated code, package install hooks.

  6. Network calls

    List every URL and host the skill or its scripts contact, and what data goes out. Unexplained outbound requests are the main exfiltration path.

  7. Credentials and sensitive paths

    Look for reads of .env files, cloud credentials, SSH keys, browser profiles, or dumps of all environment variables.

  8. Persistence

    Flag writes to agent configuration: CLAUDE.md, AGENTS.md, settings.json, .mcp.json, hooks, or other skills folders. A skill that edits these can outlive its own removal.

  9. Injected instructions

    Search for text that tells the agent to ignore earlier instructions, hide what it is doing, skip confirmation, or approve its own actions.

  10. Scope creep

    The skill should not install other skills, plugins or packages that its description doesn’t mention.

  11. Every copy, not one

    The same skill often lives in several places: ~/.cursor/skills, ~/.claude/skills, ~/.agents/skills and repo folders. Copies drift apart, so the one you reviewed may not be the one an agent runs. Audit all of them.

  12. Approval tied to content

    Record the hash of what you approved. Any later edit, even one line, should send the skill back for review instead of inheriting the old approval.

What a tool can do for you

Points 4 to 10 are about reading code and intent. Open-source static skill scanners can flag known malicious patterns there, but a clean scan is not proof of safety, so keep a human review for anything with shell or network access.

Points 1, 2, 11 and 12 are bookkeeping, and that is what skills-auditor does. It is free and MIT licensed. Its read-only audit lists every copy of every skill in the skill folders you point it at, flags metadata problems and duplicate or diverging copies, and changes nothing. For managed installs, approval is bound to the exact bytes you reviewed, and any edit voids it. It is not a malware scanner.

pipx install git+https://github.com/ERerGB/skills-auditor.git
skills-audit audit --skills-dir ~/.cursor/skills --skills-dir ~/.claude/skills --skills-dir ~/.agents/skills

See how skills-auditor handles approval and receipts →