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
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.
Frontmatter
Check that
namematches the folder and thatdescriptionsays 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.Description vs. body
Read the whole SKILL.md. The instructions should do what the description promises and nothing else. A “formatter” that reads
~/.sshis misaligned.Tool permissions
If the skill declares
allowed-tools(Claude Code), look for unrestricted shell access such asBash(*). Ask whether each tool is needed for the stated job.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.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.
Credentials and sensitive paths
Look for reads of
.envfiles, cloud credentials, SSH keys, browser profiles, or dumps of all environment variables.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.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.
Scope creep
The skill should not install other skills, plugins or packages that its description doesn’t mention.
Every copy, not one
The same skill often lives in several places:
~/.cursor/skills,~/.claude/skills,~/.agents/skillsand repo folders. Copies drift apart, so the one you reviewed may not be the one an agent runs. Audit all of them.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