← Claude Docs

Agent Skills in the SDK - Claude Code Docs

Claude Docs · May 7, 2026
Agent Skills extend Claude with specialized capabilities that the model autonomously invokes when relevant, packaged as SKILL.md files containing instructions and descriptions. These Skills are loaded from filesystem directories (.claude/skills/) and controlled through the SDK's skills option, which determines which Skills are available in a session and must be created as filesystem artifacts rather than defined programmatically.

Detailed Analysis

Anthropic's Claude Agent SDK documentation for Agent Skills reveals a structured framework through which Claude can be extended with specialized, modular capabilities that the model autonomously invokes at runtime. These Skills are defined as SKILL.md files stored in specific filesystem directories — either project-level directories shared across a team via version control, user-level directories spanning all projects, or plugin-bundled distributions — and are discovered automatically at startup when the SDK's `settingSources` configuration includes the appropriate sources. The architecture deliberately separates Skills from the programmatic subagent API: unlike subagents, which can be defined in code, Skills must exist as filesystem artifacts, making them a configuration-layer concern rather than a runtime-programming concern. The `skills` option on the `query()` method acts as a context filter, allowing developers to expose all discovered Skills, a named subset, or none at all, though the documentation explicitly notes this is not a security sandbox since underlying files remain readable through standard tools like Read and Bash.

The design philosophy embedded in Agent Skills reflects a deliberate push toward declarative AI capability management, where the model's behavior is shaped by structured metadata rather than hardcoded logic. The `description` field within each SKILL.md file serves as the primary routing mechanism — Claude reads these descriptions to determine contextual relevance and autonomously decides when to invoke a given Skill. This creates a natural-language-driven dispatch system that prioritizes intent matching over explicit function calls, lowering the barrier for non-engineer contributors to extend Claude's behavior within a project. The tiered directory structure (project vs. user vs. plugin) further enables capability governance at organizational scale, allowing teams to standardize shared Skills through version control while preserving individual developer customization.

The Agent Skills system fits within a broader industry pattern of tool-augmented language model architectures, where foundation models are paired with retrievable, task-specific instruction sets rather than being retrained for each new capability. Frameworks like LangChain, OpenAI's GPT Actions, and Google's Gemini function calling all represent variations on this theme, but Anthropic's filesystem-first approach introduces an interesting constraint: it treats Skills as a configuration artifact rather than a software artifact, aligning them more closely with devops and infrastructure conventions than with traditional software libraries. This design choice has notable implications for auditability, reproducibility, and team collaboration, since Skills stored in `.claude/skills/` directories can be reviewed, diffed, and rolled back using standard version control workflows, treating AI capability extensions with the same rigor applied to application configuration.

The troubleshooting guidance embedded in the documentation also signals maturity assumptions about the developer audience and production deployment contexts. Explicit instructions for verifying filesystem paths, confirming `settingSources` configuration, and checking skill naming conventions against the `plugin:skill` namespace convention suggest that Skills are intended for non-trivial deployments where multiple projects, users, and plugin ecosystems may coexist. The acknowledgment that the `skills` option is "a context filter, not a sandbox" is a significant transparency note — it openly concedes a security boundary limitation that developers integrating Claude into sensitive workflows must account for independently. This kind of explicit constraint documentation reflects a growing norm in enterprise AI tooling, where trust and safety assumptions must be made explicit rather than implied.

Read original article →