What AI Agent Skills Are and How They Work
AI agents, powered by LLMs, excel at reasoning but lack the procedural knowledge required for real-world workflows. Martin Keen explains how the 'agent skills' open standard solves this by packaging step-by-step instructions, enabling agents to automate complex tasks efficiently and reliably.
Large Language Models (LLMs) provide AI agents with extensive factual knowledge, but they inherently lack procedural knowledge—the specific, step-by-step instructions required to complete complex, real-world tasks. An agent might know the history of SQL but not the 47-step workflow for generating a compliant financial report. Agent skills are an open standard designed to solve this problem by embedding this procedural knowledge directly into the agent.
The Anatomy of an AI Agent Skill
An agent skill is a simple, structured format for providing procedural instructions to an agent. It is contained within a folder and centered around a skill.md markdown file.
-
skill.mdFile: This is the core of the skill.- YAML Front Matter: Contains metadata. The two mandatory fields are
name(to identify the skill) anddescription. The description is critical as it acts as the trigger condition, telling the agent when to use the skill. - Markdown Body: Below the front matter, this section contains the actual instructions written in plain markdown. It can include step-by-step workflows, rules, or examples of input and output that the agent needs to perform its task.
- YAML Front Matter: Contains metadata. The two mandatory fields are
-
Optional Directories: A skill can also include optional folders for more complex resources.
/scripts: Contains executable code (e.g., Python, JavaScript, Bash) that the agent can run./references: Holds additional documentation that is loaded only if the agent determines it’s needed./assets: Stores static resources like templates and data files.
Efficient Loading with Progressive Disclosure
To avoid overwhelming the LLM’s context window and token budget, skills are loaded using a three-tiered system called progressive disclosure.
- Tier 1: Metadata: At startup, the agent loads only the
nameanddescriptionfrom each available skill. This creates a lightweight, low-token “table of contents” of its capabilities. - Tier 2: Full Instructions: When a user’s request matches a skill’s description, the LLM uses its reasoning ability to load the full body of the relevant
skill.mdfile into its context. This provides the detailed, step-by-step instructions for the task at hand. - Tier 3: Resources: The contents of the optional folders (
/scripts,/references,/assets) are loaded only when a specific task within the skill explicitly requires them.
Skills vs. Other Knowledge Integration Methods
Agent skills provide a unique type of knowledge compared to other common methods for augmenting LLMs.
- Model Context Protocol (MCP): Provides agents with tool access to call external APIs and services. MCP defines what an agent can reach, while a skill provides the judgment for when and how to use it.
- Retrieval Augmented Generation (RAG): Handles factual knowledge by pulling relevant information from a knowledge base. RAG is reference material; it helps an agent look something up but doesn’t teach it how to perform a task.
- Fine-Tuning: Bakes knowledge directly into the model’s weights. This is a permanent but expensive and inflexible solution, as the process must be redone if the underlying model changes.
- Skills: Uniquely provide procedural knowledge—how to do things, in what order, and with what judgment. Because they are just files, they can be easily version-controlled, updated, and moved between platforms.
Cognitive Science Analogy and Security
The architecture of modern agents mirrors the distinct types of human memory:
- Semantic Memory (Facts): Maps to RAG and knowledge bases.
- Episodic Memory (Experiences): Maps to conversational logs and interaction history.
- Procedural Memory (Skills): Maps directly to agent skill files.
A critical consideration is security. Skills can include executable scripts with access to file systems, API keys, and environment variables. This power introduces risks like prompt injection, tool poisoning, and hidden malware. It is essential to treat any skill as a software dependency: review and understand its functionality before installation and execution.
The skill.md format is an open standard published at agent-skills.io under an Apache 2.0 license, ensuring interoperability across major AI platforms like OpenAI Codex and others.