Independent analysis by NHI Mgmt GroupSource article: Patronus AI, “Defenses & Enablers For Skill Injection Attacks on Terminal Based Agents” (June 1, 2026)

TL;DR: Skill injection in terminal-based LLM agents can drive attack success rate up to 81.4% when malicious instructions are reframed, according to Patronus AI, while guardian-based mediation cuts that to 18.6% without breaking task utility. Real-time control of reusable skills matters more than trusting the skill file itself.


At a glance

What this is: NHI Mgmt Group's analysis, drawing on Patronus AI's research: Skill injection attacks on terminal-based LLM agents can reach an 81.4% attack success rate when reframed, while guardian mediation drops that to 18.6%.

Why it matters: IAM and AI security teams need to treat agent skills as a governed attack surface, because phrasing changes can defeat static controls and expand runtime abuse paths.

By the numbers:

  • Skill injection attacks on terminal-based LLM agents reached an 81.4% attack success rate when malicious instructions were reframed.
  • A dynamic guardian reduced that attack success rate to 18.6%.

Context

Reusable skills are instruction-bearing documents that agents load and execute to complete tasks. When those skills can be altered or rephrased, the skill layer becomes part of the attack surface, not just a productivity feature. This is especially relevant for terminal-based agents, where file handling and command execution often sit close together.

The security problem is not only malicious content in the skill itself. It is the agent's willingness to trust and execute guidance that has been subtly rewritten to preserve intent while changing surface wording. That makes skill governance a runtime control problem, not just a content review problem.


Key questions

Q: How do terminal-based agents defend against skill injection?

A: Terminal-based agents defend against skill injection by treating untrusted instruction inputs as data, not commands, and by enforcing a strict allowlist of callable tools, commands and files. They also need output filtering, prompt boundary markers, and human approval for high-impact actions such as shell execution, file writes or secret retrieval. Without those controls, injected text can redirect the agent’s runtime authority.

Q: Why do paraphrased prompts bypass agent skill filters?

A: Paraphrased prompts bypass agent skill filters because they preserve the attacker’s intent while changing the wording enough to evade brittle keyword or pattern matching. Effective filters need semantic classification, context-aware policy checks and a clear separation between user content, system instructions and tool directives. Relying on exact phrase matching leaves the agent open to prompt injection and task hijacking.

Q: How should teams govern AI agent skills in production?

A: Treat skills as controlled runtime assets, not informal text. Assign ownership, version them, restrict when they can load, and require evaluation before release. The right question is whether a skill improves a specific model-harness pair under real task conditions, because that is where hidden regressions and overbroad instructions show up.

Q: What is the difference between static and dynamic guardian controls?

A: Static guardian controls use fixed rules, regexes or policy lists to block or allow agent actions, while dynamic guardian controls evaluate the live context of the prompt, tool call, destination, data sensitivity and runtime state. Dynamic controls can stop a benign-looking request when the surrounding context indicates prompt injection, privilege abuse or unsafe tool use.


Technical breakdown

How skill injection changes the agent trust boundary

Skill injection abuses the fact that agents often treat skill files as trusted operational guidance. If the file is read, parsed, and executed by the agent, then the document becomes an input channel that can alter behaviour without traditional code injection. The attacker does not need to replace the whole skill, only preserve the harmful intent while changing wording enough to evade filters. In terminal-based agents, that matters because the skill often governs actions that can reach the shell, files, and network. This is closer to policy manipulation than malware in the classic sense.

Practical implication: Treat skill files as governed inputs and apply policy checks at load time and at execution time.

Why guardian mediation reduces attack success

A guardian is an intermediary that inspects or rewrites skill access before the agent consumes it. Static guardians act at build time by pre-processing skill files, while dynamic guardians mediate access in real time as the agent requests the skill. The key distinction is timing. Static controls can miss wording variants that are created later, while dynamic controls can evaluate the skill in the context of the live request. That is why the dynamic model is harder to bypass when attackers preserve intent but change phrasing. See the AI Red Teaming Guide.

Practical implication: Place policy enforcement at the moment of skill retrieval or use, not only during repository review.

Why attack reframing defeats simple keyword filters

Attack reframing keeps the malicious objective intact while changing the language that carries it. This defeats controls that depend on literal matches, fixed templates, or simple heuristics looking for known toxic phrases. In practice, the attack surface is semantic, not lexical. For agent security, that means defenders need to evaluate whether the model can recognise harmful intent across paraphrases, indirect instructions, and context shifts. The article's results show that language variation alone can materially change exploitation outcomes.

Practical implication: Test controls against paraphrase and intent-preserving variants, not just exact malicious strings.


Threat narrative

Attacker objective: The attacker wants the agent to follow malicious instructions while appearing to execute a normal reusable skill.

  1. Entry occurs when the agent loads a reusable skill file that looks operationally legitimate but contains malicious instruction content.
  2. Credential harvested is not the main mechanism here; the attacker instead abuses the agent's trust in the skill layer to change runtime behaviour.
  3. Escalation happens when the reframed skill bypasses simple content checks and persuades the agent to execute unsafe actions.
  4. Impact is agent misuse, with harmful task execution succeeding at high rates unless mediation is applied.
  • Langflow Flodrix botnet 2025: Attackers used Langflow's unauthenticated code endpoint to dump AI servers' environment variables and enlist them in the Flodrix botnet.
  • Spain's first AI agent data breach 2026: Spain's AEPD logged its first breach notification attributed to an attacker's AI agent, which altered personal data and accessed invoices.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Skill injection turns reusable agent skills into a governed trust boundary, not a static asset. Once a skill file can influence runtime behaviour, its security depends on how and when the agent evaluates it, not just where it is stored. That makes agent skill management an IAM-style control problem for delegated machine action, especially when commands or file operations sit behind the skill. The practitioner conclusion is that governance must move to the point of use.

Semantic attack surface is now the core problem. The study shows that attackers can preserve malicious intent while changing phrasing enough to lift attack success sharply. That means filters built around exact wording, known bad phrases, or repository scanning are structurally incomplete. The named concept here is skill semantic drift: a harmless-looking rewrite that preserves hostile intent and defeats lexical controls. The practitioner conclusion is to measure intent resilience, not just string matching.

Dynamic mediation is more defensible than build-time trust alone. The guardian results show that real-time review changes the outcome because the control sees the request in context rather than freezing trust at creation time. That is important for terminal-based agents, where skills may be reused across many sessions and tasks. For identity and agent governance, the conclusion is that runtime authorization should outweigh static approval once behaviour can be reframed.

Agent skills need the same kind of lifecycle discipline that organisations already apply to privileged automation. Reusable skills are effectively instructions with execution power, so ownership, review, and revocation matter when their content changes or their use case changes. This intersects directly with NHI governance because the skill layer behaves like a non-human control plane for action. The practitioner conclusion is to inventory skill assets, assign ownership, and control their use like privileged automation.

From our research library:

What this signals

Skill semantic drift: agent defenders need a term for intent-preserving rewrites that evade lexical filters but keep the harmful objective intact. That is the operational gap exposed here, and it shifts the security question from content screening to semantic resilience in agent workflows.

The programme implication is that agent governance must test controls against paraphrases, indirect instructions, and context shifts before those agents are allowed to touch privileged tools. Where skills can trigger shell actions or file access, runtime mediation belongs in the control path, not only in code review.

Security teams should expect reusable skills to be treated more like privileged instructions than static documentation. That means provenance, review state, and revocation become first-class governance data for agent operations.


For practitioners

  • Define skill-file trust policies Classify reusable skills as governed inputs and require review before an agent can load or execute them in production workflows.
  • Add runtime mediation for skill access Enforce policy checks at the moment of skill retrieval so phrasing changes do not bypass controls that only ran at build time.
  • Test paraphrase-resistant defences Run reframed malicious variants through detection and approval logic to confirm the control still blocks intent when wording changes.
  • Inventory reusable skills as privileged assets Track who owns each skill, where it is used, and when it was last reviewed or revoked so stale instructions do not persist.

Key takeaways

  • Skill injection shows that agent skill files are not passive documentation once they can alter runtime behaviour.
  • The study's figures show that reframing alone can push attack success above 80 percent unless mediation is in place.
  • Runtime policy enforcement is the control that changes the outcome when attackers preserve intent but rewrite the wording.

Related NHI Mgmt Group resources: AI Red Teaming Guide · AI Security Evaluations Guide · OSINT and Reconnaissance Guide


Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and MITRE ATLAS address the attack and risk surface, while NIST AI RMF sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseSkill injection manipulates an agent's delegated authority through reusable instruction files.
ASI06 — Memory & Context PoisoningReframing preserves malicious intent while changing the language the agent consumes.
ASI02 — Tool MisuseTerminal-based agents can be steered from skill content into unsafe tool actions.
Recommendation — Treat reusable skills as delegated authority and enforce policy checks before execution. Test agent controls against paraphrases and context shifts that preserve harmful intent. Constrain tool execution paths when skills can trigger shell or file operations.
NIST AI RMFGOVERN — AI Governance and AccountabilityReusable skills require ownership, review, and accountable oversight across their lifecycle.
Recommendation — Assign ownership for agent skills and enforce review and revocation as governance controls.
MITRE ATLAST0001 — Prompt InjectionThe attack pattern is a form of instruction-level manipulation against an AI system.
Recommendation — Map skill injection to prompt-injection techniques and validate defences against paraphrases.

Key terms

  • Skill Injection: Skill injection is an attack in which a malicious or altered skill document changes how an AI agent behaves. The risk is that the agent treats instructions as trusted operational guidance, so a rewritten skill can steer execution without changing the surrounding system code.
  • Guardian Control: A guardian control is a policy or enforcement check that sits between an AI agent and the actions, tools or data it wants to use. It evaluates instructions, context and risk before allowing a step, such as a tool call, file access or external request, and can block, constrain or require approval.
  • Attack Reframing: Attack reframing is the act of rewording an attack so it looks different to a filter while keeping the same malicious intent. In agent security, attackers use alternative phrasing, synonyms or indirect instructions to bypass guardrails, keyword rules and simple policy checks.
  • Reusable Skill: A reusable skill is a packaged capability that an AI agent can invoke repeatedly to perform a defined task, such as summarising, querying a system or executing a workflow. It usually includes instructions, inputs and tool access, so it can become a persistent execution path if its authority is broader than the task needs.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity, and secrets management. It helps security and identity practitioners translate governance gaps into operational controls across machine-led workflows.
NHIMG Editorial Note
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org