The Research Report
SkillGuard: When Agent Skills Get the Android Permission Treatment
Your AI agent loads a skill from a marketplace. The skill says it helps with code review. It also reads your SSH keys, posts data to an external endpoint, and delegates a subtask to another agent that exfiltrates your files. The agent follows every instruction because skills are trusted by default. Nobody asked for permission.
That trust gap is the problem SkillGuard was built to solve.
Published June 2, 2026 by researchers from CSIRO and Australian National University (arXiv:2606.03024), SkillGuard treats agent skills the way Android treats app permissions. Skills must declare what they can do before they do it. Runtime enforcement blocks anything not declared. Users approve sensitive actions. Everything gets audited.
The results: 99.76% coverage of real-world skill behaviors, 91% F1 automated manifest generation, and attack success rates dropped from 32.37% to 23.02% on contextual injection attacks.
The Two-Plane Problem
Existing defenses for agent skills cover half the attack surface. SkillGuard argues the problem has two distinct planes that both need governance.
The context plane. A skill can inject instructions, examples, retrieved documents, memory fragments, or hidden assumptions into the agent's context window. This reshapes the agent's reasoning trajectory before any tool call happens. A malicious instruction embedded in a SKILL.md file can redirect task outputs to an attacker's server. A skill that loads external documents can import adversarial instructions through indirect prompt injection. Context attacks don't require a single tool call to succeed.
The action plane. A skill can trigger tool calls, access files or secrets, execute code, communicate over the network, or delegate work to other agents and MCP servers. This produces externally visible side effects. A skill that legitimately reads sensitive data can exfiltrate it through an external API call. A transitive dependency can carry a malicious script that bypasses local checks.
Current approaches secure one plane or the other. Progent intercepts tool calls at runtime with fine-grained allow/forbid decisions, but it does not regulate what a skill injects into the context window. AgentBound provides declarative manifests and sandboxed execution for MCP servers, but its security principal is the MCP server, not the skill. It cannot govern instruction loading, memory ingestion, or skill-to-skill delegation. A2AS introduces authenticated prompts and security boundaries for context integrity, but it lacks a permission taxonomy or grant model specialized for skills.
The gap is fundamental. A tool-level policy may block an unsafe action, but it misses the malicious context that steers future reasoning. A context-level defense may mark untrusted input, but it cannot constrain the concrete side effects a skill produces after it is accepted. Securing skills requires governing both planes simultaneously.
Six Attack Classes
SkillGuard defines six attack classes that span both planes:
- Malicious instruction injection — adversarial text embedded directly in SKILL.md files that instructs the agent to perform unauthorized actions
- Context or permission overreach — a skill requests broader access than its task requires, violating least privilege
- Transitive skill poisoning — a benign skill invokes a dependency that carries malicious instructions, bypassing local checks through indirection
- Transitive information leakage — one skill reads sensitive data, and a downstream skill exfiltrates it through external communication
- Context injection or prompt infection — a skill reads external content containing adversarial instructions that propagate into the main agent context
- Update or rug-pull attacks — a skill is initially benign but a later update introduces new risks
With over 1.4 million skills available in marketplaces at the time of writing, the attack surface is wide and growing.
The SkillGuard Architecture
SkillGuard builds on three classical security principles from Saltzer and Schroeder's 1975 paper on information protection: least privilege, complete mediation, and fail-safe defaults. It adapts these principles the way Android did for mobile apps, but extended to cover both the context and action planes.
The framework has five core modules.
Skill Manifest
Each skill must declare its capability surface in a Skill Manifest before execution. The manifest uses a compact JSON-based domain-specific language (DSL) with an object-oriented, hierarchical structure.
The DSL defines three primary artifacts. A workspace baseline policy declares default permissions that seed each new session. A skill manifest declares the capabilities a skill may require. A session-state document records the live policy state used during enforcement.
Each permission entry combines a capability name, an enforcement effect (allow, confirm, or deny), a conflict-resolution priority, optional constraints, and a human-readable fallback message. Constraints narrow the permission with conditions like workspace-only file access, allowed path prefixes, or denied command patterns.
Capabilities are independent of concrete tool names. At runtime, SkillGuard maps each host tool invocation to a canonical capability, so the same policy vocabulary works across different agent platforms and tool APIs.
Runtime Permission Control
SkillGuard uses the tool-call boundary as its enforcement point rather than relying on the model to self-police. When a skill guides the agent to perform an action, the system first maps the request to a capability, then checks whether the requested permission is allowed under the session's permission list.
If the requested capability is not declared, the declarations exist but their constraints do not match the tool input, or the request involves a dangerous permission, the user gets informed to make the decision. Otherwise, the action executes.
In the implementation, SessionStart initializes SkillGuard state, PreToolUse mediates each tool invocation, and manifest-loading logic registers a skill's permissions when the skill is loaded.
User Interaction
Some permission decisions cannot be resolved from static declarations alone. Writing files, executing shell commands, making network requests, and delegating to subagents may be legitimate in one task but risky in another.
When a request matches a permission entry whose effect is "confirm," SkillGuard presents a structured authorization prompt with the tool name, mapped capability, policy source, and fallback message. The user can choose Allow once, Allow this session, or Deny. This mirrors Android-style runtime permission prompts adapted for agent sessions.
Session approvals are deliberately constrained. If the user selects Allow this session, SkillGuard adds a grant but copies the constraints from the original policy entry. The approval suppresses repeated prompts for the matched capability and constraint set, but it does not widen the allowed resource scope.
Policy Enforcement
Policy enforcement turns DSL declarations, user choices, and runtime constraints into concrete allow-or-block outcomes. SkillGuard enforces a fail-safe default: an action is allowed only when the current session contains an eligible permission entry for the mapped capability and the entry's constraints match the current input. Otherwise, SkillGuard blocks it before the host runtime dispatches it.
For shell-style execution, SkillGuard adds a second layer. After the normal shell.execute decision allows a command to proceed, SkillGuard invokes a read-only permission-generation mini-agent to infer the lower-level capabilities required by the command and any referenced workspace scripts. These generated capabilities are then re-evaluated against the live policy state. If analysis fails, a deny policy applies, or the user rejects a required confirmation, SkillGuard blocks the command fail-closed.
Runtime Behavior Monitoring
Monitoring records every mediated tool call with its capability mapping, policy decision, provenance, and reason. For shell-style execution, audit records also include whether permission generation ran, the capabilities identified, and the per-capability evaluation result.
The monitored state feeds back into enforcement. Loading a skill manifest updates the declared permission pool. Selecting Allow this session updates the granted set used by later checks. Constraint violations, explicit denies, failed permission generation, and rejected confirmations are blocked immediately and recorded in the audit log.
The Permission Taxonomy
SkillGuard defines eight resource groups with 21 protected objects and 46 specific permissions. Each permission has a protection level: normal, dangerous, system, or redact.
Storage covers file read, write, and delete operations. All three permissions are rated dangerous.
Code Repository governs source code access and version control. READSOURCECODE and READCOMMIT are normal. EXECUTESOURCECODE, WRITESOURCECODE, DELETESOURCECODE, and CREATECOMMIT are dangerous. PUSH_COMMIT is system-level, reflecting the risk of publishing commits to remote repositories.
Network controls outbound communication. FETCHWEB is normal. POSTWEB and INTERACTWEB are dangerous. CALLEXTERNAL_API is system-level, recognizing that external API calls can exfiltrate data or trigger irreversible actions.
Execution governs containers, processes, and REPL sessions. QUERYCONTAINER and QUERYPROCESS are normal. RUNCONTAINER, MANAGECONTAINER, CREATEPROCESS, KILLPROCESS, CREATEREPL, EXECUTEREPL, and their management variants are dangerous or system-level.
Hardware covers camera, microphone, screen, and input devices. Most hardware permissions are system-level, reflecting the sensitivity of physical device access.
System governs shell profiles, environment variables, scheduled jobs, and packages. READ operations are normal. WRITESHELLPROFILE, WRITEENVVAR, and package management are dangerous or system-level.
Secrets protects API tokens, credentials, and certificates. READSECRETS is rated redact, a level unique to this group. WRITESECRETS and DELETE_SECRETS are dangerous.
Agent Ecosystem governs tool invocation, subagent delegation, context loading, and policy modification. INVOKETOOL, DELEGATESUBAGENT, EXPANDPOLICY, RESTRICTPOLICY, and INSTALLHOOK are system-level. LOADCONTEXT is dangerous, recognizing that injecting instructions into the agent's context window is a sensitive operation.
Evaluation Results
SkillGuard was evaluated across five research questions on 315 real-world skills from SkillsMP and the SkillInject benchmark.
RQ1: Permission Taxonomy Expressiveness
Of 315 skills, 219 (69.53%) contained at least one resource-targeted instruction. Among labeled skills, the mean number of protected objects per skill was 1.94, with a maximum of 6. A single skill like web-app-creator can span multiple resource groups: fetching web content, invoking MCP tools, installing packages, calling external APIs, reading and writing source code, and running build processes.
The taxonomy achieved 99.76% predefined-object coverage (423 out of 424 observed object occurrences) and 100% group-level coverage. The only extended type beyond the predefined taxonomy was AGENT_MEMORY, which occurred once among 424 mentions (0.2%).
The dominant objects were SOURCECODE (31.1%), FILE (25.2%), and EXTERNALAPI (12.3%), reflecting the code-centric nature of most current skills.
RQ2: Automated Manifest Generation
SkillGuard uses an LLM to automatically generate skill manifests from skill content. On the SkillInject benchmark's 23 clean skills, automated manifest generation achieved 91.0% F1 at the capability level with high recall over required permissions.
This result matters because it means manifest governance does not impose a heavy authoring burden on skill developers. A 91% F1 auto-generated manifest is good enough to deploy as a baseline, with human review for high-risk skills.
RQ3: Defense Effectiveness
On the SkillInject benchmark, SkillGuard reduced attack success rates:
- Contextual injections: 32.37% to 23.02% (28.7% relative reduction)
- Obvious injections: 25.56% to 16.67% (34.8% relative reduction)
The experiments ran on Claude Code with Xiaomi's MiMo-V2.5-Pro as the foundation model. SkillGuard was deployed as Claude Code hooks. Since experiments ran unattended, every confirm decision was automatically approved as a one-time allow, so only deny decisions blocked actions. This means the reported defense effectiveness is a lower bound. In real deployments with active user mediation, the defense would likely be stronger.
RQ4: Utility Preservation
SkillGuard maintained benign task utility. Legitimate user tasks completed successfully even with permission enforcement active. The deny-by-default enforcement blocked unauthorized actions but allowed declared and confirmed operations to proceed normally.
RQ5: Efficiency
SkillGuard introduces runtime overhead from permission checks on every tool call, plus the cost of the permission-generation mini-agent for shell execution. The paper does not report specific latency numbers, but the hook-based architecture means overhead is proportional to the number of mediated tool calls rather than model inference time.
Complementing Guardian Defenses
SkillGuard occupies a different position in the defense stack from runtime guardian approaches like the Patronus AI and NVIDIA guardian intermediaries evaluated in a companion paper (arXiv:2606.01567, June 1). Guardian intermediaries sit between the user and the terminal agent, intercepting and rewriting requests to block malicious skill instructions. They reduce attack success rates from 81.4% to 18.6%.
The two approaches complement each other. Guardian intermediaries are reactive. They intercept requests at inference time and use a separate LLM to judge whether a request is malicious. SkillGuard is proactive. It requires skills to declare their capabilities upfront and blocks undeclared actions at the enforcement point, before they reach the model.
Together, they form a layered defense. SkillGuard's manifests establish a baseline of declared behavior. Anything outside the manifest is denied by default. Guardian intermediaries then inspect the remaining allowed actions for semantic threats that manifests cannot capture, like subtle prompt injection that stays within declared capabilities but violates intent.
The comparison with Android permissions is instructive here too. Android permissions do not prevent a weather app from showing misleading forecasts. They prevent the weather app from accessing your contacts without declaring it. SkillGuard prevents a code review skill from reading your secrets without declaring it. Guardian intermediaries catch the subtler case where a declared capability is used for an unintended purpose.
Implications
SkillGuard's hook-based architecture enables cross-runtime portability. Because it is implemented through agent lifecycle hooks rather than modifications to the agent runtime, any framework that exposes tool-call lifecycle events can host SkillGuard without changes to its internals. Adapting to a new runtime requires only regenerating the tool-to-capability mapping. The permission DSL, manifest schema, and enforcement logic stay the same.
The hook mechanism also provides a natural extension point for broader agent observability. The same interception points that SkillGuard uses for permission checks can support runtime behavioral monitoring, cost tracking, compliance auditing, and performance profiling. The audit log already records every mediated tool call with its capability mapping, policy decision, and provenance.
The manifest and DSL design could inform emerging standards for skill governance. Just as Android's manifest convention became an industry-wide expectation for mobile applications, a standardized skill manifest could establish baseline security expectations across AI agent ecosystems. The 91% F1 auto-generation result suggests this governance need not impose heavy authoring burden and can scale with marketplace growth.
What This Means for Agent Builders
If you build or deploy agent systems that load third-party skills, SkillGuard offers a concrete security layer you can adopt today. The key actions:
- Require manifests for every skill. Auto-generate them if needed. The 91% F1 rate means auto-generated manifests are reliable enough for most skills.
- Enforce deny-by-default. Any action not declared in the manifest gets blocked. This is the single most important policy decision you can make.
- Add user confirmation for dangerous operations. File writes, shell execution, network calls, and secret access should all require explicit user approval.
- Audit everything. The runtime monitoring module creates a trace of every mediated action. Use it for debugging, compliance, and incident response.
- Layer with guardian defenses. SkillGuard handles the declared-capability boundary. Guardian intermediaries handle the semantic intent boundary. You need both.
The 1.4 million skills in today's marketplaces will become 10 million within a year. Trust-based loading does not scale. SkillGuard shows that permission-based governance does, and it can be mostly automated.
References
- Shidong Pan, Xiaoyu Sun, Tianyi Zhang, Dianshu Liao, Meixue Si, Zhenchang Xing. "SkillGuard: A Permission Framework for Agent Skills." arXiv:2606.03024, June 2, 2026.
- Patronus AI, NVIDIA. "Guardian Defenses Against Agent Skill Injection." arXiv:2606.01567, June 1, 2026.
- Schmotz et al. "SkillInject" benchmark.
- Shi et al. "Progent: Programmable Policy Framework for Agent Tool Use." 2025.
- Bühler et al. "AgentBound: Securing Execution Boundaries of AI Agents." FSE 2026.
- Neelou et al. "A2AS: Context-Oriented Agent Security." 2025.