What is skill injection? How to protect AI agents from poisoned skills and tools
Skill injection hides malicious instructions inside AI agent skills, plugins and MCP tools. Learn how it works, real incidents, and a checklist to stop it.
Este artigo ainda não está disponível em português, então mostramos a versão original em inglês.

Em resumoSkill injection is an attack where a third-party skill, plugin, rules file or MCP tool carries hidden instructions that an AI agent follows as if they came from you. Because agents treat skill text as trusted guidance, a single poisoned SKILL.md can steal secrets or run code with your privileges. Defend with vetted sources, pinned versions, least privilege, sandboxes, human approval for sensitive actions and monitoring.
Pontos-chave
- A skill is instructions plus optional code that an agent loads on demand, so its text is effectively part of the agent's prompt.
- Research in 2026 found that most vulnerabilities in malicious skills live in the SKILL.md prose, not in the code.
- Real incidents include hundreds of malicious skills on ClawHub, a backdoored postmark-mcp package and a poisoned Amazon Q release.
- Treat every skill, plugin and MCP server like a software dependency: review it, pin it and limit what it can reach.
- No model-level filter fully solves this; the architecture around the agent has to limit the damage.
Skill injection is an attack in which a third-party skill, plugin, rules file or MCP tool carries hidden instructions that an AI agent follows as if they came from you. Agent skills are folders of instructions (a SKILL.md file) and optional scripts that agents such as Claude Code, Codex, Cursor or GitHub Copilot load to learn a task. Because the agent treats that text as trusted guidance, one poisoned skill can read your secrets, call your tools or run code with your privileges.
Dream Makers is a senior LatAm engineering team that architects and deploys software systems and AI automation for founders and companies in the US. We add skills, plugins and MCP servers to production agents regularly, and this guide covers how skill injection works, what has already happened in the wild and the controls we use. If you are new to agent hardening, start with our guide on how to secure AI agents in production.
What is skill injection?
Skills became a standard fast. Anthropic published Agent Skills as an open standard in December 2025, and by October 2026 it reported more than 70 supporting platforms, over one million published skills and nearly 280 million installs. The same week, it donated the standard to the Agentic AI Foundation. That growth created a new software supply chain made mostly of plain English.
A skill injection happens when that English, or the code bundled with it, is written to serve an attacker. The skill might look like a PDF helper or a crypto tracker, but its instructions tell the agent to collect environment variables, download a "required" binary or quietly send data to an external endpoint. A 2026 study of 98,380 skills from two registries found 157 confirmed malicious skills, and 84.2% of their vulnerabilities lived in the SKILL.md prose, not in code. The researchers titled the published paper after a phrase the attackers kept using: "Do not mention this to the user."
How is skill injection different from prompt injection and tool poisoning?
All of these abuse the same weakness: language models cannot reliably separate data from instructions. What changes is where the malicious text comes from and how much trust it gets.
| Attack | Where the payload lives | Why it works |
|---|---|---|
| Direct prompt injection | The user's own input | The user tries to override the system prompt |
| Indirect prompt injection | Web pages, emails, files, issues the agent reads | The model treats external content as instructions (OWASP LLM01) |
| MCP tool poisoning | Tool descriptions, schemas or tool outputs | The model sees the full description; the user sees a short name |
| Skill injection | SKILL.md, scripts, AGENTS.md, rules files, plugins | The agent is explicitly told to follow this content |
Skill injection is best understood as indirect prompt injection with a promotion. A malicious web page has to convince the agent to listen. A skill is installed on purpose, framed as expert instructions, often persists across sessions and can ship executable scripts. The OWASP Top 10 for Agentic Applications 2026 maps the risk mainly to ASI04 Agentic Supply Chain Vulnerabilities, with consequences in ASI01 Agent Goal Hijack and ASI02 Tool Misuse and Exploitation.
How does a skill injection attack work?
Most attacks follow a few patterns:
- Always-on metadata. In Anthropic's implementation, each installed skill's name and description are loaded into context at startup, and the body loads when the task matches. Attackers write descriptions that win selection: a University of Maryland study of SKILL.md-only attacks found adversarial variants were chosen in 77.6% of paired trials.
- Hidden instructions. Payloads sit in HTML comments, long runs of whitespace, base64 strings or invisible Unicode characters that humans skip and models read.
- Fake prerequisites. The skill says a "helper tool" must be installed first, then links to a password-protected archive or a
curl | bashone-liner that installs malware. - Remote instructions. The skill tells the agent to fetch instructions from a URL at runtime, so the reviewed version is not the version that runs.
Researchers behind the Skill-Inject benchmark tested 202 injection-task pairs against frontier models in agents like Claude Code, Codex and Gemini CLI and reported attack success rates of up to 80%, including data exfiltration and destructive actions. Their conclusion is the important part: the problem "will not be solved through model scaling or simple input filtering."
What real skill injection incidents have happened?
This is not theoretical. Documented cases from the last 18 months include:
- ClawHavoc (February 2026). Koi Security audited 2,857 skills on ClawHub, the OpenClaw marketplace, and found 341 malicious ones, 335 tied to one campaign that used fake prerequisites to install the Atomic macOS Stealer. Koi later reported 824 malicious skills as the registry grew past 10,700.
- Snyk ToxicSkills (February 2026). A scan of 3,984 skills from ClawHub and skills.sh found 13.4% with at least one critical issue and 76 confirmed malicious payloads. Snyk noted that publishing on ClawHub required only a SKILL.md and a one-week-old GitHub account.
- postmark-mcp (September 2025). An unofficial npm package imitating Postmark's email MCP server was clean for 15 versions, then version 1.0.16 added a hidden BCC of every email to an attacker domain. It was described as the first malicious MCP server found in the wild. Postmark confirmed it had no involvement.
- Amazon Q Developer for VS Code (July 2025). An attacker used an over-scoped token to commit a prompt telling the agent to wipe local files and cloud resources into version 1.84.0. AWS says the code failed to execute due to a syntax error and shipped a fix in 1.85.0 (CVE-2025-8217).
- MCP tool poisoning and rug pulls (2025). Invariant Labs showed a harmless-looking
addtool whose description told the agent to read~/.cursor/mcp.jsonand SSH keys, and a "sleeper" server that changed its description after approval to leak WhatsApp history. - MCPoison (CVE-2025-54136). Check Point found that once Cursor approved an MCP config, later changes ran without re-approval, enabling persistent code execution through a shared repo. Cursor fixed it in version 1.3.
- Rules File Backdoor (March 2025). Pillar Security showed hidden Unicode in Cursor and Copilot rules files steering the assistant to insert backdoors that slip past code review.
- Plugin pin bypass (2026). Air Security reported that a branch named like a commit SHA could bypass plugin version pinning in several coding agents. Claude Code fixed it in 2.1.179 and Codex in 0.146.0.
The good news: registries respond. The USENIX study found that most malicious skills it tracked were removed within 30 days. The bad news is that 30 days is a long time for an agent with your cloud credentials.
Which attack vectors should you watch?
- Marketplaces and typosquats. Open registries with light publisher checks, brand impersonation and look-alike names. In the USENIX study, a single actor accounted for 54.1% of confirmed malicious skills.
- Instruction files in repos.
SKILL.md,AGENTS.md(used by over 60,000 open-source projects),.cursorrulesand similar files are read by agents whenever someone opens the repo, including in a pull request from a stranger. - Rug pulls and auto-updates. A clean version earns trust, and a later update turns malicious. Auto-update turns that into a zero-click attack.
- Secret exfiltration. Skills that read
.env,~/.aws/credentials, SSH keys or MCP config files and encode them into a URL, a tool parameter or an outgoing email. - Privilege escalation and shadowing. One tool or skill rewrites how the agent uses another trusted tool, or asks it to disable safety settings and approvals.
- The lethal trifecta. Simon Willison's framing: when an agent has access to private data, exposure to untrusted content and a way to communicate externally, an injection can turn into a breach.
How do you protect your company from skill injection?
You will not filter your way out of this. The goal is to make a successful injection boring: limited reach, visible and reversible. These are the controls we apply:
- Review skills like code. Read every file, not just the description. Anthropic's own guidance is to use skills only from trusted sources and audit anything else as you would install software. Its enterprise docs list the red flags: code execution, instruction manipulation, network calls, hardcoded credentials and broad filesystem scope.
- Pin versions and verify hashes. Install from a reviewed commit or archive hash, turn off auto-update for third-party skills and plugins, and alert on changed tool descriptions.
- Apply least privilege. Give each agent its own scoped credentials, read-only by default, with no access to production secrets it does not need. See how we scope MCP servers in what MCP is and how to secure it.
- Isolate execution. Run agents in containers or VMs with no host credentials, restricted network egress and allowlisted domains.
- Require human approval for sensitive actions. Payments, deletions, outbound emails, permission changes and new dependencies should need a human click, with the full action shown, not a summary.
- Separate data from instructions. Treat tool outputs, documents and repo files as data. Break the lethal trifecta by keeping untrusted input away from agents that hold secrets and external channels.
- Scan and monitor. Use scanners such as mcp-scan (its
--local-onlymode keeps descriptions off third-party APIs), log every tool call and alert on unusual destinations or data volume.
Skill injection checklist
- Keep an inventory of every skill, plugin, MCP server and rules file your agents load.
- Allow installs only from an approved list of publishers or an internal registry.
- Read SKILL.md and all bundled scripts before installing; search for URLs, base64,
curl,evaland "do not tell the user." - Check for hidden Unicode and long whitespace runs in instruction files.
- Pin by commit hash or archive checksum and disable auto-update.
- Re-review on every version change and alert on modified tool descriptions.
- Give each agent scoped, short-lived credentials; never your personal admin keys.
- Run agents in a sandbox with egress allowlists.
- Require human approval for destructive, financial and outbound actions.
- Log tool calls and review anomalies weekly.
- Have a revocation plan: how to uninstall a skill and rotate exposed secrets in under an hour.
How we approach agent extensions at Dream Makers
When we build agents for clients, third-party skills and MCP servers go through the same path as any dependency: review, pin, sandbox test, scoped credentials and monitoring before they reach production. Often the safest skill is one we write ourselves for the client's exact workflow. You can read more about our practices on our security page.
Adding agents to your product or operations and want a second pair of eyes on the skills and tools they load? Contact Dream Makers.
Sources
- Anthropic, "Donating Agent Skills to the Agentic AI Foundation" (October 22, 2026): anthropic.com
- Anthropic, "Agent Skills overview": platform.claude.com
- Anthropic, "Skills for enterprise": platform.claude.com
- Liu et al., "Malicious Agent Skills in the Wild" (USENIX Security 2026): arxiv.org
- Schmotz et al., "Skill-Inject" (February 2026): arxiv.org
- Saha, Faghih and Feizi, "Under the Hood of SKILL.md" (May 2026): arxiv.org
- Snyk, "ToxicSkills" (February 2026): snyk.io
- The Hacker News, "Researchers find 341 malicious ClawHub skills" (February 2026): thehackernews.com
- Cloud Security Alliance, "OpenClaw ClawHub supply chain risk": cloudsecurityalliance.org
- Postmark, "Information regarding malicious postmark-mcp package" (September 2025): postmarkapp.com
- BleepingComputer, "Unofficial Postmark MCP npm silently stole users' emails" (September 2025): bleepingcomputer.com
- AWS, "Security bulletin AWS-2025-015" (July 2025): aws.amazon.com
- BleepingComputer, "Amazon AI coding agent hacked to inject data wiping commands" (July 2025): bleepingcomputer.com
- Invariant Labs, "MCP Security Notification: Tool Poisoning Attacks" (April 2025): invariantlabs.ai
- Invariant Labs, "WhatsApp MCP Exploited" (April 2025): invariantlabs.ai
- Check Point Research, "MCPoison" (2025): research.checkpoint.com
- Pillar Security, "Rules File Backdoor" (March 2025): pillar.security
- Anthropic, Claude Code advisory GHSA-pq7j-f95f-qfcv (October 2026): github.com
- Air Security, "Plugin4Shell" (September 2026): air.security
- OWASP, "LLM01:2025 Prompt Injection": genai.owasp.org
- OWASP, "Top 10 for Agentic Applications 2026" (December 2025): genai.owasp.org
- OWASP, "MCP Security Cheat Sheet": cheatsheetseries.owasp.org
- Simon Willison, "The lethal trifecta for AI agents" (June 2025): simonwillison.net
- AGENTS.md: agents.md
Perguntas frequentes
What is skill injection in AI agents?
Skill injection is an attack where malicious instructions are embedded in a skill, plugin, rules file or tool that an AI agent loads. The agent treats that content as trusted guidance and may exfiltrate data, run commands or change its behavior without the user noticing.
Is skill injection the same as prompt injection?
It is a form of indirect prompt injection, but it is more dangerous than a malicious web page because skills are installed on purpose, are framed as instructions, often persist across sessions and can ship executable code.
What is MCP tool poisoning?
Tool poisoning hides instructions in an MCP tool's description, schema or output. The model reads the full text while the user usually sees only a short name, so the tool can steer the agent into leaking files or misusing other tools.
How can I check if an agent skill is safe to install?
Read every file in the skill, look for external URLs, encoded strings, install steps and instructions to hide actions from the user, check the publisher, run a scanner, and test it in a sandbox with no real credentials before pinning a reviewed version.
Can better models or filters stop skill injection?
Not on their own. Benchmarks published in 2026 showed high attack success rates on frontier models, and the researchers argued that scaling or input filtering will not fix it. You need least privilege, isolation and human approval around the agent.