Learn how to extend your deep agent’s capabilities with skills
Skills are reusable agent capabilities that provide specialized workflows and domain knowledge.You can use Agent Skills to provide your deep agent with new capabilities and expertise.Deep agent skills follow the Agent Skills specification.
Skills are a directory of folders, where each folder has one or more files that contain context the agent can use:
A SKILL.md file containing instructions and metadata about the skill
Additional scripts (optional)
Additional reference info, such as docs (optional)
Additional assets, such as templates and other resources (optional)
Any additional assets (scripts, docs, templates, or other resources) must be referenced in the SKILL.md file with information on what the file contains and how to use it so the agent can decide when to use them.
When you create a deep agent, you can pass in a list of directories containing skills. As the agent starts, it reads through the frontmatter of each SKILL.md file.When the agent receives a prompt, the agent checks if it can use any skills while fulfilling the prompt. If it finds a matching prompt, it then reviews the rest of the skill files. This pattern of only reviewing the skill information when needed is called progressive disclosure.
You might have a skills folder that contains a skill to use a docs site in a certain way, as well as another skill to search the arXiv preprint repository of research papers:
The SKILL.md file always follows the same pattern, starting with metadata in the frontmatter and followed by the instructions for the skill.The following example shows a skill that gives instructions on how to provide relevant langgraph docs when prompted:
Copy
---name: langgraph-docsdescription: Use this skill for requests related to LangGraph in order to fetch relevant documentation to provide accurate, up-to-date guidance.---# langgraph-docs## OverviewThis skill explains how to access LangGraph Python documentation to help answer questions and guide implementation.## Instructions### 1. Fetch the Documentation IndexUse the fetch_url tool to read the following URL:https://docs.langchain.com/llms.txtThis provides a structured list of all available documentation with descriptions.### 2. Select Relevant DocumentationBased on the question, identify 2-4 most relevant documentation URLs from the index. Prioritize:- Specific how-to guides for implementation questions- Core concept pages for understanding questions- Tutorials for end-to-end examples- Reference docs for API details### 3. Fetch Selected DocumentationUse the fetch_url tool to read the selected documentation URLs.### 4. Provide Accurate GuidanceAfter reading the documentation, complete the user's request.
The following example shows a SKILL.md file using all available frontmatter fields:
Copy
---name: langgraph-docsdescription: Use this skill for requests related to LangGraph in order to fetch relevant documentation to provide accurate, up-to-date guidance.license: MITcompatibility: Requires internet access for fetching documentation URLsmetadata: author: langchain version: "1.0"allowed-tools: fetch_url---# langgraph-docs## OverviewThis skill explains how to access LangGraph Python documentation to help answer questions and guide implementation.## Instructions### 1. Fetch the documentation indexUse the fetch_url tool to read the following URL:https://docs.langchain.com/llms.txtThis provides a structured list of all available documentation with descriptions.### 2. Select relevant documentationBased on the question, identify 2-4 most relevant documentation URLs from the index. Prioritize:- Specific how-to guides for implementation questions- Core concept pages for understanding questions- Tutorials for end-to-end examples- Reference docs for API details### 3. Fetch selected documentationUse the fetch_url tool to read the selected documentation URLs.### 4. Provide accurate guidanceAfter reading the documentation, complete the user's request.
When multiple skill sources contain a skill with the same name, the skill from the source listed later in the skills array takes precedence (last one wins). This lets you layer skills from different origins.
Copy
// If both sources contain a skill named "web-search",// the one from "/skills/project/" wins (loaded last).const agent = await createDeepAgent({ skills: ["/skills/user/", "/skills/project/"], ...});
When you use subagents, you can configure which skills each type has access to:
General-purpose subagent: Automatically inherits skills from the main agent when you pass skills to create_deep_agent. No additional configuration is needed.
Custom subagents: Do not inherit the main agent’s skills. Add a skills parameter to each subagent definition with that subagent’s skill source paths.
Skill state is fully isolated: the main agent’s skills are not visible to subagents, and subagent skills are not visible to the main agent.
Copy
const researchSubagent = { name: "researcher", description: "Research assistant with specialized skills", systemPrompt: "You are a researcher.", tools: [webSearch], skills: ["/skills/research/", "/skills/web-search/"], // Subagent-specific skills};const agent = await createDeepAgent({ model: "claude-sonnet-4-5-20250929", skills: ["/skills/main/"], // Main agent and GP subagent get these subagents: [researchSubagent], // Researcher gets only its own skills});
For more information on subagent configuration and skills inheritance, see Subagents.
When skills are configured, a “Skills System” section is injected into the agent’s system prompt. The agent uses this information to follow a three-step process:
Match — When a user prompt arrives, the agent checks whether any skill’s description matches the task.
Read — If a skill applies, the agent reads the full SKILL.md file using the path shown in its skills list.
Execute — The agent follows the skill’s instructions and accesses any supporting files (scripts, templates, reference docs) as needed.
Write clear, specific descriptions in your SKILL.md frontmatter. The agent decides whether to use a skill based on the description alone — detailed descriptions lead to better skill matching.