跪拜 Guibai
← Back to the summary

AI Agent Skills Are a Fresh Supply Chain Risk: What to Vet and How to Run Them Safely

Skill 的安全边界在哪里:风险来源、验证思路与用户可用的防线

Skill bundles documentation, scripts, and resources into a folder, and hands it to an agent to call as needed. It's convenient to install, but it's also like inviting a new colleague with your permissions into your computer. The security problem isn't mysterious; the core is that you can't see at a glance what this colleague brings. Below we start with where the risks come from, then clarify whether a skill can be fully proven safe, and finally land on methods you can use today.


🧨 Where the risks come from

Skill is unusual in that it carries two kinds of content at once. One is natural language instructions meant for both humans and models; the other is scripts that can actually execute. Malicious content can hide in either.

export_pzqygt.png

Security researchers have already demonstrated these paths clearly. HiddenLayer's research points out that Claude Code skills can bypass permission confirmations, hide malicious actions, pollute the agent's long-term memory, and form a new AI supply chain risk. Another group of researchers built a benchmark called Skill-Inject that measures how vulnerable agents are to harmful instructions hidden in skills, and warns that malicious skills are flooding in.

The root of these attacks is indirect prompt injection. The text an agent reads contains instructions written by an attacker; the model has a hard time distinguishing user intent from commands planted by someone else. Hidden prompts in web pages can hijack agents that parse web pages; skill files follow the same logic, only the entry point becomes a folder you actively installed. There is also a series of studies that break down, from an attack-surface perspective, how malicious skills and malicious sub-agents take down coding agents step by step.


🔍 Can we prove a skill has no malicious code?

Straight to the conclusion: absolute proof is very hard. Three reasons.

So a more pragmatic goal is to reduce risk to an acceptable level, by shrinking the trust scope, limiting the blast radius, and keeping audit trails.

export_a70xqd.png


🛡️ Practical measures users can take

Before install: guard the entrance

Read through the content, focus on these spots

Read through SKILL.md and all scripts; don't just look at the first few lines. This set of commands can quickly surface suspicious points.

# Find network requests and remote execution
grep -rniE "curl|wget|http[s]?://|nc |ssh |scp " ./skill-folder

# Find encoding obfuscation and dynamic execution
grep -rniE "base64|eval|exec\(|os\.system|subprocess|powershell -enc" ./skill-folder

# Find access to sensitive locations
grep -rniE "\.ssh|\.aws|\.env|id_rsa|keychain|credentials|token" ./skill-folder

# Find hidden comments and invisible characters in Markdown
grep -rnP "<!--|[\x{200B}-\x{200F}\x{202A}-\x{202E}]" ./skill-folder

When reading instructions, watch for phrasing like asking to ignore previous rules, asking to execute silently without telling the user, asking to read files unrelated to the task, or asking to send content to external addresses. These are typical signals of prompt injection.

At runtime: tighten permissions

After install: ongoing management


🧭 Summary

Layer What to do What it blocks
Source Official first, self-write first Blocks most mass poisoning
Review Read instructions, search for suspicious patterns Obvious malicious scripts and hidden instructions
Runtime Isolation, least privilege, per-action confirmation Controls loss even if inspection misses
Maintenance Pin versions, review updates Good-first-bad-later delayed attacks

The point of this table is multi-layer stacking. Any single method has gaps: sources can be compromised by account hijacking even if trusted; review can't read every variant; the isolated environment is the backstop. Developing the habit of treating a skill as an executable program rather than a document already blocks most risk.


References

Claude Code Skills Security https://www.hiddenlayer.com/research/whats-the-matter-with-skills

Maksym Andriushchenko's post on Skill-Inject benchmark https://www.linkedin.com/posts/maksym-andriushchenko_malicious-agent-skills-are-flooding-the-activity-7432802586358894592-Yrkm

Weaponizing autonomy: The rise of malicious AI agent skills

Skill Issues: Compromising Claude Code with malicious skills and agents