Claude Agent SDK Skills
Claude Agent SDK skills are SKILL.md folders that an agent built with the SDK finds on disk and uses when a task fits. They work the same way as skills in Claude Code, because the SDK runs Claude Code under the hood.

How Do Skills Work In The Claude Agent SDK?
Skills are files, not code. You create each one as a folder with a SKILL.md file, and the SDK finds it when a session starts.
At startup, the SDK reads only each skill's name and description. Claude loads the full steps when a request matches. You can also run a skill yourself by sending /skill-name in the prompt.
There is no function to register a skill in code. Anthropic's Agent SDK skills docs say this plainly. Subagents can be defined in options, but skills must live on disk.
Where Does The SDK Look For Skills?
It looks in the same places as Claude Code:
- Project skills in .claude/skills in your working folder, or in any parent folder up to the repo root
- Personal skills in ~/.claude/skills, for every project on that machine
- Skills inside plugins you pass with the plugins option
The setting sources decide which of these load. With default options, the SDK loads both user and project sources. If you set the sources yourself, keep "user" and "project" in the list, or your skills will not load.
Our guide on which agents support skills lists the skill folders for other tools too. If you build with Strands instead, its AgentSkills plugin loads a whole folder of skills, as our Strands guide shows.
How Do I Turn On Skills In A Session?
Set the skills option on query(). In Python it looks like this:
options = ClaudeAgentOptions(
cwd=os.getcwd(),
setting_sources=["user", "project"],
skills="all",
allowed_tools=["Read", "Write", "Bash"],
)When you set skills, the SDK adds the Skill tool for you. If you also pass your own tools list, add "Skill" to it, or Claude cannot call any skill.
The allowed tools line pre-approves tools that skills often need, so Claude does not stop to ask.
How Do I Limit Which Skills Claude Can Use?
Pass a list of exact names to the skills option. There are three choices:
| Value | What Claude can invoke |
|---|---|
| "all" | Every skill the SDK found |
| ["pdf", "docx"] | Only the skills you list |
| [] | No skills |
Use the folder name for your own skills and plugin:skill for plugin skills. Wildcards like * are not allowed, and the SDK rejects the list before the session starts.
A list limits what Claude can pick on its own. It does not hide the files. Sending /skill-name in a prompt still runs a user-invocable skill, even if it is not on the list.
How Do I Check That My Skills Loaded?
Read the first system message. Near the start of the stream, the SDK sends a message with the subtype init. Its skills array lists the user-invocable skills it found.
The same message has a slash_commands field. It shows every command you can send in that session, including your skills and built-ins like /compact.
If a skill is missing, check three things in order:
- First, your setting sources must include "user" and "project".
- Next, your cwd must sit at or below the folder that holds .claude/skills.
- Last, the SKILL.md file needs a description, so Claude knows when to use it.
Which Skills Help When You Build With The Agent SDK?
Start with skills that know the Claude platform itself. Both skills below come from Anthropic, and its author page lists the rest of its skills.
- mcp-builder guides you through building MCP servers in Python or TypeScript, so your agent can call outside services through clean tools.
- skill-creator helps you write new skills and test them with evals. That is useful when your agent needs a custom job done the same way each time.
Which Skill Should Every SDK Project Add First?
Add the one that keeps your code current with the API. Model names, parameters and features change often, and stale code is a common bug in agent projects.
Anthropic's claude-api skill is a reference for the Claude API and the Anthropic SDK. It covers model IDs, pricing, parameters, streaming, tool use, MCP, agents, caching, token counting and model migration. Its source is in the anthropics/skills repo under the Apache 2.0 license.
View the claude-api skill by Anthropic
FAQ
What Is The Difference Between Skills And Subagents In The Agent SDK?
A subagent is a separate agent with its own context that does a task and reports back. In the SDK, you can define subagents in code with the agents option, but skills must be files on disk.
Use a skill to teach a repeatable job. Use a subagent to split off a big task so it does not crowd the main session. Steps that your own code runs in a set order form a workflow, and our skills and workflows guide shows when that beats a skill.
Why Are My Skills Not Loading In The Agent SDK?
Most often the setting sources are the problem. If you set settingSources or setting_sources yourself and leave out "user" and "project", the SDK does not load any skills.
If the sources are right, check your cwd and each SKILL.md description next. Then look at the skills array in the init message to see what loaded.