Agent Skills: The Open Standard for Extending AI Agent Capabilities
Imagine your AI assistant as a skilled craftsman. While basic tools suffice for everyday tasks, specialized projects demand precision instruments. Agent Skills is the standardized system that allows AI agents to dynamically load these specialized capabilities, transforming a general-purpose assistant into a domain-specific expert. This open format provides a structured way to package instructions, scripts, and resources, enabling agents to perform complex tasks with greater accuracy and efficiency.
At its heart, Agent Skills addresses a fundamental challenge in artificial intelligence: the gap between an agent’s inherent capabilities and the specific, contextual knowledge required for real-world work. By providing a mechanism for on-demand loading of procedural knowledge and organizational context, this standard empowers developers, enterprises, and end-users to extend AI functionality in a portable, version-controlled, and interoperable manner.
This comprehensive guide will demystify the Agent Skills format, exploring its architecture, practical applications, and the steps required to integrate it into your own AI tools. We will delve into the core specifications, best practices for authoring skills, and the security considerations essential for a robust implementation.
What Are Agent Skills? The Core Concept
An Agent Skill is, fundamentally, a self-contained folder that encapsulates everything an AI agent needs to perform a specific task. At a minimum, this folder contains a single, mandatory file: SKILL.md. This file serves as the brain of the skill, containing both metadata that helps agents discover it and the detailed instructions that guide its execution.
The beauty of this system lies in its simplicity and extensibility. While a skill can be as simple as a text file with instructions, it can also include executable code, reference documents, templates, and other static resources. This modular structure allows skills to range from basic procedural guides to complex, automated workflows.
The Anatomy of a Skill
A typical skill directory follows a clear and logical structure:
my-skill/
├── SKILL.md # Required: The core instructions and metadata
├── scripts/ # Optional: Executable code (Python, Bash, etc.)
├── references/ # Optional: Supporting documentation
└── assets/ # Optional: Templates, images, data files
This design imparts several key advantages:
-
Self-Documenting: Anyone can open the SKILL.mdfile and immediately understand the skill’s purpose and operation. This transparency makes skills easy to audit, debug, and improve. -
Extensible: The format accommodates a wide spectrum of complexity. A skill might be a simple checklist for a code review or a sophisticated data analysis pipeline complete with Python scripts and reference documentation. -
Portable: Because skills are just collections of files and folders, they are inherently easy to edit, share, and manage with standard version control systems like Git.
How Skills Work: The Principle of Progressive Disclosure
To manage the limited context window of large language models efficiently, Agent Skills employs a three-stage process called progressive disclosure. This ensures that agents remain fast and responsive while still having access to deep, specialized knowledge when necessary.
-
Discovery (Startup): When an agent starts, it scans configured directories for skills. During this initial phase, it loads only the essential metadata—the nameanddescription—from eachSKILL.mdfile. This is just enough information for the agent to know when a particular skill might be relevant to a user’s request, keeping the initial context usage minimal (around 100 tokens per skill). -
Activation (Task Matching): When a user’s task aligns with a skill’s description, the agent activates that skill. It reads the full content of the SKILL.mdfile, loading the complete instructions into its context. This provides the agent with the detailed procedural knowledge needed to perform the task. -
Execution (On-Demand Loading): As the agent follows the instructions, it may need to access additional resources. It can then dynamically load referenced files from the scripts/,references/, orassets/directories, or execute bundled code as required. This ensures that only the necessary information is loaded at any given time.
This intelligent, layered approach keeps the agent lean during startup but allows it to access rich, detailed context precisely when and where it’s needed.
The Agent Skills Specification: A Detailed Breakdown
The Agent Skills standard is meticulously defined to ensure consistency and interoperability across different AI platforms. Let’s break down the components of a compliant skill.
Directory Structure
The foundation of every skill is its directory structure. At its most basic, a skill is a directory containing a SKILL.md file. The name of the directory must match the name field in the SKILL.md file’s frontmatter.
skill-name/
└── SKILL.md # Required
The SKILL.md File: Format and Frontmatter
The SKILL.md file is the cornerstone of any skill. It must be formatted with YAML frontmatter followed by Markdown content. The frontmatter acts as a formal introduction, providing machine-readable metadata about the skill.
Required Frontmatter Fields
Every SKILL.md file must include at least these two fields:
---
name: skill-name
description: A description of what this skill does and when to use it.
---
Optional Frontmatter Fields
To provide more context and control, skills can include several optional fields:
---
name: pdf-processing
description: Extract text and tables from PDF files, fill forms, merge documents.
license: Apache-2.0
compatibility: Requires git, docker, jq, and access to the internet
metadata:
author: example-org
version: "1.0"
allowed-tools: Bash(git:*) Bash(jq:*) Read
---
Here is a complete table detailing all frontmatter fields, their requirements, and constraints:
| Field | Required | Constraints & Description |
|---|---|---|
name |
Yes | Max 64 characters. Lowercase letters, numbers, and hyphens only. Must not start or end with a hyphen or contain consecutive hyphens. Must match the parent directory name. |
description |
Yes | Max 1024 characters. Non-empty. Clearly describes what the skill does and when to use it. Should include keywords to help agents identify relevant tasks. |
license |
No | Specifies the license applied to the skill. Can be a license name (e.g., “Apache-2.0”) or a reference to a bundled license file. |
compatibility |
No | Max 500 characters. Indicates specific environment requirements, such as intended products, required system packages, or network access needs. |
metadata |
No | An arbitrary map of string keys to string values for storing additional properties not defined by the specification. |
allowed-tools |
No | An experimental, space-delimited list of pre-approved tools the skill may use. Support for this field may vary between agent implementations. |
A Closer Look at Key Fields
The name Field:
The name is the unique identifier for the skill. The rules are strict to ensure consistency and prevent parsing errors.
-
Valid Examples: -
name: pdf-processing -
name: data-analysis -
name: code-review
-
-
Invalid Examples: -
name: PDF-Processing(Uppercase letters are not allowed) -
name: -pdf(Cannot start with a hyphen) -
name: pdf--processing(Consecutive hyphens are not allowed)
ThedescriptionField:
This field is critical for discoverability. It must clearly articulate the skill’s function and its ideal use cases.
-
-
Good Example:
description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents or when the user mentions PDFs, forms, or document extraction. -
Poor Example:
description: Helps with PDFs.
The good example is specific, uses relevant keywords, and explicitly states when the skill should be triggered.
The Body Content: The Instructions
Following the YAML frontmatter, the Markdown body contains the actual instructions for the agent. There are no strict formatting restrictions here; the goal is to write whatever content best helps the agent perform the task effectively.
Recommended sections for the body include:
-
Step-by-step instructions for the core task. -
Examples of expected inputs and outputs. -
Guidance on handling common edge cases or errors.
It’s important to note that the agent loads the entireSKILL.mdfile when it activates the skill. For very complex skills, it’s better practice to keep the main instructions concise and move detailed reference material into separate files within thereferences/directory.
Optional Directories: Adding Functionality
Beyond the required SKILL.md, skills can include three optional directories to add executable code, documentation, and static resources.
scripts/ Directory
This directory contains executable code that the agent can run as part of its workflow. Scripts should be:
-
Self-contained: They should either have no external dependencies or clearly document them. -
Robust: Include helpful error messages and handle edge cases gracefully. -
Language-agnostic: While Python, Bash, and JavaScript are common, the supported languages depend on the agent’s implementation.
references/ Directory
This holds additional documentation that the agent can load on demand. This is ideal for information that is too detailed for the main SKILL.md file. Common files include:
-
REFERENCE.md: A detailed technical reference guide. -
FORMS.md: Templates for forms or structured data formats. -
Domain-specific files: e.g., finance.md,legal.md,api-endpoints.md.
Keeping these files focused and relatively small is key, as they are loaded individually to minimize context usage.
assets/ Directory
This directory is for static resources that the skill might need. Examples include:
-
Templates: Document templates, configuration file templates. -
Images: Diagrams, screenshots, or example images. -
Data Files: Lookup tables, schemas, or sample datasets.
File References and Progressive Disclosure in Practice
When a skill’s instructions need to reference other files within the skill directory, they must use relative paths from the skill’s root directory.
For example, within SKILL.md:
For a detailed API reference, see [the technical guide](references/REFERENCE.md).
To process the data file, run the extraction script:
scripts/extract.py –input assets/sample.csv
This practice reinforces the principle of progressive disclosure:
1. **Metadata** (~100 tokens): The `name` and `description` are loaded at startup.
2. **Instructions** (< 5000 tokens recommended): The full `SKILL.md` body is loaded upon activation.
3. **Resources** (as needed): Individual files from `scripts/`, `references/`, or `assets/` are loaded only when explicitly required.
As a best practice, the main `SKILL.md` file should be kept under 500 lines, with detailed material moved to separate reference files to maintain clarity and efficiency.
## Integrating Agent Skills into Your AI Agent
Adding support for the Agent Skills standard to your AI agent or development tool involves a series of well-defined steps. There are two primary architectural approaches to consider.
### Integration Approaches: Filesystem vs. Tool-Based
1. **Filesystem-based Agents**: These are the most capable type. They operate within a full computer environment (like bash/unix). Skills are activated when the AI model issues shell commands, such as `cat /path/to/my-skill/SKILL.md`. All bundled resources are accessed directly through the file system. This approach offers maximum power and flexibility.
2. **Tool-based Agents**: These agents function without a dedicated computer environment. Instead of shell commands, they implement a set of tools that the model can call. These tools are designed to trigger skills and access bundled assets. The specific implementation of these tools is left to the developer, offering more control but potentially less flexibility than the filesystem approach.
### The Five-Step Agent Lifecycle for Skills
A skills-compatible agent must be able to perform five core functions:
1. **Discover Skills**: The agent must scan one or more configured directories to find all valid skill folders (those containing a `SKILL.md` file).
2. **Load Metadata**: At startup, for each discovered skill, the agent should parse only the YAML frontmatter from the `SKILL.md` file. This keeps the initial context usage low.
3. **Match User Tasks**: When a user provides a task, the agent must match it against the descriptions of the available skills to identify the most relevant one.
4. **Activate Skills**: Once a relevant skill is identified, the agent must load the full content of its `SKILL.md` file into its context, giving it the complete instructions.
5. **Execute Scripts and Access Resources**: As the agent follows the instructions, it needs to be able to execute any bundled scripts and access other resources like templates or reference documents as required.
### Loading Metadata and Injecting it into Context
The process of loading metadata is crucial for performance. Here is a conceptual JavaScript function for parsing the frontmatter:
```javascript
function parseMetadata(skillPath) {
content = readFile(skillPath + "/SKILL.md")
frontmatter = extractYAMLFrontmatter(content)
return {
name: frontmatter.name,
description: frontmatter.description,
path: skillPath
}
}
Once parsed, this metadata must be injected into the agent’s system prompt so the model knows which skills are available. The format depends on the platform, but for Claude models, the recommended format is XML:
<available_skills>
<skill>
<name>pdf-processing</name>
<description>Extracts text and tables from PDF files, fills forms, merges documents.</description>
<location>/path/to/skills/pdf-processing/SKILL.md</location>
</skill>
<skill>
<name>data-analysis</name>
<description>Analyzes datasets, generates charts, and creates summary reports.</description>
<location>/path/to/skills/data-analysis/SKILL.md</location>
</skill>
</available_skills>
For filesystem-based agents, the location field with the absolute path is essential. For tool-based agents, it can be omitted. Keeping this metadata concise is vital, with each skill contributing roughly 50-100 tokens to the context.
Security Considerations for Skill Execution
Allowing an agent to execute arbitrary scripts introduces significant security risks. A robust implementation must incorporate several layers of protection:
-
Sandboxing: Scripts should always be run in isolated, containerized environments to prevent them from accessing or modifying unauthorized parts of the host system. -
Allowlisting: Agents should be configured to only execute scripts from trusted, pre-approved skills. This prevents the execution of malicious code. -
Confirmation: For potentially dangerous operations (e.g., deleting files, making network requests), the agent should be required to ask the user for confirmation before proceeding. -
Logging: Every script execution should be recorded in a detailed audit log, allowing for security reviews and forensic analysis if something goes wrong.
The Ecosystem and Developer Tools
The Agent Skills standard is not just a specification; it’s a growing ecosystem supported by major AI development tools and a reference implementation to aid developers.
Adoption by Leading Tools
The open nature of the standard has led to its adoption by a wide range of prominent AI development platforms. This interoperability means that a skill created once can be used across multiple compatible products.
The following tools are listed as supporting Agent Skills:
-
OpenCode -
Cursor -
Amp -
Letta -
Goose -
GitHub -
VS Code -
Claude Code -
Claude
This broad support demonstrates the industry’s recognition of the need for a standardized way to extend AI agent capabilities.
The skills-ref Reference Library
To help developers get started and ensure compliance, the skills-ref library provides Python utilities and a command-line interface (CLI) for working with skills.
Validating a Skill Directory:
You can easily check if your skill adheres to the specification using the validate command:
skills-ref validate ./my-skill
This command checks that your SKILL.md frontmatter is valid, that all naming conventions are followed, and that the overall structure is correct.
Generating Prompt XML:
The library can also generate the <available_skills> XML block for your agent’s system prompt, saving you from manual formatting:
skills-ref to-prompt /path/to/skills
The source code of the skills-ref library itself serves as an excellent reference implementation for developers looking to build their own skills-compatible agent.
Frequently Asked Questions (FAQ)
To clarify common points of confusion and provide quick answers, here is a list of frequently asked questions based on the Agent Skills specification.
Q: What is the absolute minimum required for a skill to be valid?
A: A skill is a directory that must contain a file named SKILL.md. This file must have YAML frontmatter with at least the name and description fields, followed by Markdown content.
Q: Can a skill name contain uppercase letters or underscores?
A: No. The name field must be 1-64 characters long and can only contain lowercase letters, numbers, and hyphens. It cannot start or end with a hyphen and cannot contain consecutive hyphens. It must also exactly match the name of its parent directory.
Q: How do I make my skill’s description more effective?
A: A good description should be between 1 and 1024 characters and clearly state both what the skill does and when it should be used. Include specific keywords (like “PDF,” “form,” “chart”) that will help an AI agent match the skill to a user’s request.
Q: Is it safe for an agent to run scripts from a skill?
A: Running scripts introduces inherent security risks. It is critical to implement security measures such as running scripts in sandboxed environments, using an allowlist of trusted skills, asking for user confirmation before dangerous operations, and logging all executions for auditing.
Q: What’s the difference between a filesystem-based and a tool-based agent?
A: A filesystem-based agent operates in a full computer environment and activates skills using shell commands like cat. A tool-based agent does not have a dedicated environment and instead uses custom-developed tools to trigger skills and access their resources. Filesystem-based agents are generally more capable.
Q: How can I check if my skill follows the specification correctly?
A: You can use the official skills-ref library’s CLI command: skills-ref validate <path-to-your-skill>. This tool will check your skill’s structure and frontmatter for compliance.
Q: Can I include other files like images or data files in my skill?
A: Yes. You can create an assets/ directory within your skill folder to store static resources like images, templates, and data files. You can then reference these files from your SKILL.md instructions using a relative path, for example: .
Q: Why is there a recommendation to keep the main SKILL.md file under 500 lines?
A: This recommendation is part of the progressive disclosure principle. Keeping the main instruction file concise ensures that when a skill is activated, it doesn’t overwhelm the agent’s context window. Detailed information should be moved to separate files in the references/ directory, which are loaded only when needed.
The Agent Skills standard represents a significant step forward in the quest for more capable, reliable, and context-aware AI agents. By providing a simple, open, and powerful format for packaging expertise, it enables a new paradigm where knowledge can be built once, versioned, and shared across an entire ecosystem of AI tools. For developers, it offers a clear path to creating more extensible and powerful products. For enterprises, it provides a mechanism to capture and deploy organizational knowledge at scale. And for end-users, it promises AI assistants that can be dynamically customized with new skills, making them endlessly more useful. As this open standard continues to evolve and gain adoption, it is poised to become a fundamental building block in the future of intelligent automation.
