Supply-Chain Security for AI Agent Skills: Auditing SKILL.md, Hidden Scripts, and Prompt Injection
A skill folder is both natural-language instruction and executable supply chain. Treat third-party skills like npm packages: inspect YAML triggers, audit scripts/, pin commits, and separate read-only guidance (L1) from shell or browser skills (L3).
Installing an Agent Skill feels harmless because it starts as a Markdown file. Yet inside coding agents like Claude Code, Codex, or Antigravity—which possess shell, filesystem, and network tools—a malicious or sloppy SKILL.md carries the exact same blast radius as an untrusted postinstall script.
Every skill indexed on YUML carries an explicit L1 / L2 / L3 Risk Tier and Capability Tags (Prompt-Only, FS: Read, FS: Write, Shell Exec, Network, Browser, API Key). Here is the threat model behind those labels.
Three Real Threat Vectors in SKILL.md Ecosystems
1. Hidden Exfiltration in scripts/
Because Tier 3 scripts are often executed directly by the agent to “verify” or “preprocess” files, an attacker can bury outbound curl or fetch calls inside a benign-looking validator script that reads ~/.ssh, .env, or cloud credentials.
2. Instruction Hijacking Inside references/
Even a pure-Markdown skill without executable scripts can inject social-engineering directives—for example, instructing the agent to append a hidden telemetry webhook, disable SSL verification, or relax Row-Level Security policies during code generation.
3. Indirect Prompt Injection via Browser & Scrape Skills
Skills like Browser Use Automation and Webapp Testing ingest untrusted DOM content from external web pages. Without strict profile isolation, a crafted webpage can attempt to redirect the agent’s next local shell command.
The YUML L1–L3 Capability Taxonomy
| Tier | Label | Typical Permissions | Recommended Guardrail |
|---|---|---|---|
| L1 | Low Risk | Prompt-Only, FS: Read |
Safe for daily use after a quick read of SKILL.md |
| L2 | Moderate Risk | FS: Write, Shell Exec, API Key |
Audit scripts/ and keep .env secrets out of agent stdout |
| L3 | Elevated Risk | Browser, Shell Exec, Network, API Key |
Run inside OS sandboxes or isolated browser/worktree environments |
A 60-Second Pre-Install Audit Checklist
Before running npx skills add <repo> in a production repository:
# 1. Inspect the repository tree before granting global trust
npx skills add anthropics/skills --skill frontend-design --list
# 2. Grep bundled scripts for unexpected network or credential reads
rg -n "(curl|wget|fetch|http://|https://|OPENAI_|ANTHROPIC_|AWS_|\.ssh|\.env)" ~/.claude/skills/<skill-name>/
- Verify Maintainer Provenance: Prefer official vendor repositories (
anthropics/skills,vercel-labs/agent-skills,cloudflare/skills,trailofbits/skills) or inspectable personal repos with clear commit history. - Read
SKILL.mdFrontmatter & Override Rules: Watch for broaddescriptiontriggers that hijack unrelated tasks, or phrases telling the agent to bypass user confirmation. - Audit Every File in
scripts/: Check outbound URLs, subprocess spawns, andevalpatterns. - Scope Skills to the Project When Possible: Keep elevated skills in project-local
.claude/skills/or sandboxed worktrees rather than global user directories when testing new packs. - Pair with Automated Security Audits: Use Trail of Bits Security Audit on codebases touched by autonomous workflows, and review the full YUML Security & Permission Spec.
Skills Referenced in This Article
All skills →Addy Osmani Agent Skills
Production-grade engineering skills spanning spec definition, incremental builds, code review, performance, and shipping.
$ npx skills add addyosmani/agent-skillsBrowser Use Automation
Autonomous browser control, CDP session driving, and resilient multi-step web task execution for AI agents.
$ npx skills add browser-use/browser-useTrail of Bits Security Audit
Security research workflows for static analysis, fuzzing harnesses, secrets hygiene, and vulnerability auditing.
$ npx skills add trailofbits/skillsWebapp Testing
Playwright reconnaissance-and-verification workflow for testing local web apps, inspecting DOM state, and capturing UI screenshots.
$ npx skills add anthropics/skills --skill webapp-testing