Subscribe to the Non-Human & AI Identity Journal

How should security teams handle AI agent skills that land in a repository?

They should treat them as repository supply-chain inputs, not just agent instructions. Review the full directory tree, not only the markdown file, because bundled tests and configs can execute through normal developer tooling. The safest pattern is allowlisting approved file types at installation time and excluding imported skill directories from test discovery in both local and CI environments.

Why This Matters for Security Teams

AI agent skills that arrive in a repository are not just documentation. They can carry tests, helper scripts, dependency manifests, and configuration files that normal developer tooling may execute automatically. That makes the repository itself part of the attack surface, especially when skills are imported from outside the trusted build path. The practical risk is supply-chain execution through ordinary workflows, not just malicious prompt content.

NHIMG research on AI Agents: The New Attack Surface report shows how quickly agentic systems can exceed intended scope, which matters here because repository-imported skills often inherit trust too early. Security teams should also track emerging agent guidance in the OWASP Agentic AI Top 10 and the NIST AI Risk Management Framework, both of which emphasize runtime risk management over blind trust in artifacts. In practice, many security teams encounter dangerous skill behaviour only after CI, linting, or test runners have already processed untrusted files.

How It Works in Practice

The safest handling pattern is to treat the skill drop as a repository supply-chain event. Before installation, security teams should inspect the full directory tree, not just the main markdown file, because the real risk often lives in hidden scripts, test fixtures, package manifests, or configuration that normal tooling resolves automatically. This is why allowlisting file types at import time is more effective than trying to block specific bad patterns later.

Operationally, a strong control set usually includes:

  • File-type allowlisting for imported skill packages, with defaults that reject executable or test-bearing files unless explicitly approved.
  • Isolation of imported skill directories from test discovery in both local developer environments and CI pipelines.
  • Review of dependency and automation surfaces, including shell hooks, package scripts, and task runners.
  • Quarantine of new skills until security validation confirms they are content-only and do not introduce executable behaviour.

This approach aligns with lessons from NHIMG coverage such as OWASP NHI Top 10 and Analysis of Claude Code Security, both of which reinforce that AI-enabled code paths should be constrained before execution rather than inspected after the fact. The same logic appears in the CSA MAESTRO agentic AI threat modeling framework, which treats tool-using agent components as composable risk units that need explicit guardrails. These controls tend to break down when skill repositories are merged directly into monorepos with permissive CI defaults, because test autoloading and package automation can execute untrusted content before review completes.

Common Variations and Edge Cases

Tighter repository filtering often increases friction for developers, requiring organisations to balance fast skill adoption against the risk of hidden execution paths. That tradeoff becomes more pronounced when teams rely on auto-generated skills, multi-language repositories, or shared template directories where harmless content and executable helpers are mixed together.

Current guidance suggests a few edge cases deserve special handling. If a skill package contains only prose and metadata, teams can still need a review step for embedded examples that downstream tooling may treat as commands. If a repository uses recursive test discovery, it may be safer to exclude entire imported skill paths by default, then selectively re-enable only verified files. Where build systems support policy-as-code, that policy should evaluate the skill import at ingestion time, not after the repository has already been cloned into a trusted workspace. For broader context on real-world agent abuse patterns, NHIMG’s Moltbook AI agent keys breach and Replit AI Tool Database Deletion illustrate how quickly agent-adjacent artifacts can turn into operational incidents. There is no universal standard for skill-package security yet, but the practical baseline is clear: imported skills should be treated as untrusted supply-chain inputs until their full contents, dependencies, and automation hooks have been vetted.

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, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A03 Imported skills can execute unintended code paths through agent tooling.
CSA MAESTRO GOV-02 Skill repositories need explicit governance before agent consumption.
NIST AI RMF GOVERN Repository-imported skills require accountable AI risk governance.
OWASP Non-Human Identity Top 10 NHI-03 Skills may introduce secrets, scripts, or identity misuse into repos.
NIST CSF 2.0 PR.IP-1 Secure configuration and change control apply to imported skill content.

Inspect imported skills for hidden credentials and restrict execution surfaces by default.