Integration approaches
The two main approaches to integrating Agent Skills are: Filesystem-based agents operate within a computer environment (bash/unix) and represent the most capable option. Claude Skills are activated when models issue shell commands likecat /path/to/my-skill/SKILL.md. Bundled resources are accessed through shell commands.
Tool-based agents function without a dedicated computer environment. Instead, they implement tools allowing models to trigger Claude Skills and access bundled assets. The specific tool implementation is up to the developer.
Overview
An Agent Skills-compatible agent needs to:- Discover Claude Skills in configured directories
- Load metadata (name and description) at startup
- Match user tasks to relevant Agent Skills
- Activate Agent Skills by loading full instructions
- Execute scripts and access resources as needed
Skill discovery
Claude Skills are folders containing aSKILL.md file. Your agent should scan configured directories for valid Agent Skills.
Loading metadata
At startup, parse only the frontmatter of eachSKILL.md file. This keeps initial context usage low.
Parsing frontmatter
Injecting into context
Include Agent Skill metadata in the system prompt so the model knows what Claude Skills are available. Follow your platform’s guidance for system prompt updates. For example, for Claude models, the recommended format uses XML:location field with the absolute path to the SKILL.md file. For tool-based agents, the location can be omitted.
Keep metadata concise. Each Claude Skill should add roughly 50-100 tokens to the context.
Security considerations
Script execution in Claude Skills introduces security risks. Consider:- Sandboxing: Run scripts in isolated environments
- Allowlisting: Only execute scripts from trusted Claude Skills
- Confirmation: Ask users before running potentially dangerous operations
- Logging: Record all script executions for auditing
Reference implementation
The skills-ref library provides Python utilities and a CLI for working with Claude Skills. For example: Validate an Agent Skill directory:<available_skills> XML for agent prompts: