In short.
This documentation guide teaches Python and TypeScript developers to extend Claude Agent SDK agents with reusable instructions, but its skill allowlist does not isolate files or block direct invocation of omitted user-invocable skills. It covers creating SKILL.md files, discovering them through filesystem settings, controlling model invocation and inspecting session messages. Its most useful distinction is between skill availability, command dispatch and tool approval. Installation, authentication, prices and licensing are not established by this page, and runtime behavior has not been assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is the complete captured page at [https://code.claude.com/docs/en/agent-sdk/skills.md], including its examples, notes, troubleshooting, version qualifications and related-resource references. The documentation index and every linked page are excluded. Claims about permissions, bundled skills and related features are limited to what this page states. No examples were executed, and runtime behavior, security effectiveness, costs and licensing remain unassessed or unknown as specified.
The overview
Identity
Extend agents with skills is a Claude Code documentation guide about skills and commands in Claude Agent SDK sessions. The selected resource is the complete page at [https://code.claude.com/docs/en/agent-sdk/skills.md].
It documents the Python claude_agent_sdk package and TypeScript @anthropic-ai/claude-agent-sdk package. A skill is a directory containing a SKILL.md instruction file and, optionally, supporting resources.
Assessment
The guide is useful for turning repeated instructions into discoverable agent capabilities or named commands. Its paired language examples connect skill files, session configuration and streamed messages, while troubleshooting explains several common reasons a skill may be missing or unused.
Its central caveat matters for application design: the skills option controls which discovered skills Claude can invoke through the Skill tool. It does not prevent direct dispatch of omitted user-invocable skills or make their files inaccessible through available file-reading tools.
Users
The primary audience is developers building Claude Agent SDK applications in Python or TypeScript. Relevant tasks include adding project-specific instructions, sharing personal skills across projects and exposing named tasks such as a security review.
Beginners get concrete file locations and examples, but the page assumes familiarity with SDK queries, asynchronous message streams and filesystem paths. Installation and authentication instructions are not provided.
Capabilities
The page explains automatic skill selection and explicit /name dispatch. Omitting the skills option enables discovered skills; "all" enables every discovered skill, an exact-name list limits model invocation, and an empty list disables model invocation of skills. Plugin skills use plugin:skill names.
It also documents discovering commands through the initialization message, summarizing existing conversation history with /compact and resetting active context with /clear. Clearing context leaves the previous conversation on disk, where it can be resumed by session ID. Commands requiring an interactive terminal are unavailable through these SDK sessions.
Using it
Requirements
Skills must exist as filesystem artifacts; the SDK does not provide a programmatic skill-registration API. Project skills normally live under .claude/skills/ and personal skills under ~/.claude/skills/. The working directory determines which project directories are searched.
Default query options load user and project setting sources. When explicitly configuring settingSources in TypeScript or setting_sources in Python, retain the sources containing the intended skills. Project discovery includes parent directories up to the repository root and directories supplied through additionalDirectories or add_dirs. An explicit tools list must include Skill for model invocation.
Mechanism
The SDK discovers skill metadata at startup and loads the full instructions when Claude invokes a skill. The description helps Claude decide when the skill is relevant. Direct /name dispatch provides a separate invocation path for user-invocable skills.
The initialization message contains a skills array and a slash_commands field. The skills array lists eligible user-invocable skills regardless of the configured skills allowlist. A skill marked user-invocable: false can remain available to Claude while appearing in neither list, so absence from those lists does not establish that its instructions failed to load.
Setup
Create .claude/skills/security-check/SKILL.md with YAML frontmatter describing the task, followed by its instructions. Point cwd at the project or a directory beneath it within the repository. Configure the relevant setting sources and choose "all", an exact-name list or an empty list for skills.
Setting skills automatically adds Skill to allowedTools, but a separately supplied tools list must also include Skill. Preapprove only the tools appropriate to the task through allowedTools or allowed_tools. Inspect the initialization messages for discovery and check the configured allowlist separately.
Allowlist entries must be exact names. Empty strings, surrounding whitespace, parentheses, commas, control characters and wildcard forms are rejected by the documented validation.
Example
The page's security-check skill asks Claude to inspect a codebase for SQL injection, cross-site scripting, exposed credentials and insecure configurations. Its directory is .claude/skills/security-check/, containing SKILL.md. The example dispatches /security-check through query() with maxTurns: 10 in TypeScript or max_turns=10 in Python.
A separate example preapproves Read, Grep and Glob so the skill can inspect project files. The supplied scan excerpt illustrates findings and suggested corrections; it does not establish detection accuracy or coverage. No example or security scan was executed for this report.
Assessment & evidence
Limitations
A skills allowlist is not a filesystem restriction. Unlisted skills remain on disk and can be reached through available Read or Bash tools, while direct commands can invoke omitted user-invocable skills. Preapproving named tools does not restrict other tools.
Managed allowManagedPermissionRulesOnly settings can cause Claude Code to ignore both project or personal skill tool preapprovals and query-level preapprovals. The complete permission flow is delegated to a linked page and is not established here.
Commands can reach the session's turn limit. Compaction requires enough existing conversation history; a success result without a compact_boundary message does not establish that compaction occurred. Skills also depend on filesystem discovery and description matching, so merely creating a file does not establish useful task performance.
Reasoning
The documented separation between discovery, invocation and tool permissions explains why a skill may appear in session metadata yet remain unavailable for model invocation, or run directly despite being omitted from the allowlist. These controls need to be understood separately when choosing how an application exposes tasks.
Direct invocation provides an explicit task entry point, while automatic invocation depends on Claude recognizing a relevant description. Neither path establishes output quality. In particular, instructions to find vulnerabilities and a sample findings excerpt provide no evidence of exhaustive review, false-positive rates or reliability across projects.
Alternatives
Existing flat Markdown command files under .claude/commands/ continue to provide named prompts. The page recommends skills as their successor. For specialist agents defined programmatically, it points to subagents configured through the agents option.
Built-in commands handle operations such as compaction and context clearing, while bundled code-review and verify skills provide existing named tasks. These are documented options within the same ecosystem; their separate guides and comparative performance were not assessed.
Evidence
The evidence consists of the complete captured documentation page at [https://code.claude.com/docs/en/agent-sdk/skills.md], captured on 14 November 2026 at 21:51:16 UTC. It includes explanations, paired Python and TypeScript examples, sample output, troubleshooting and version-specific behavior.
The findings describe documented behavior. No SDK session, command, skill or example was executed. Runtime compatibility, task quality, permission enforcement and the accuracy of sample findings remain unassessed. Linked pages supply references rather than additional evidence.
Access & freshness
Costs
The page provides no prices, subscription requirements, measured token usage or per-task costs. SDK access costs and the cost of running a skill remain unknown.
The documentation states that an unrecognized slash command can be forwarded to Claude as an ordinary message and consume a model turn. Although /compact summarizes conversation history, the page establishes no measured cost savings.
Rights
The supplied page contains no license statement establishing reuse or redistribution rights for its documentation, code examples, SDK packages or bundled skills. Those rights are unknown from this evidence. References to other documentation do not establish their license terms.
Freshness
The capture date identifies the available snapshot, not the page's publication or last-update date. Those dates and the latest SDK releases are unknown from the supplied text.
The page identifies specific compatibility boundaries: conflicting skill names in added directories require Claude Code v2.1.309 or later for the documented prefixed names; unknown-command behavior changed at v2.1.274; and allowlist-name validation was absent before TypeScript Agent SDK 0.3.221 and Python Agent SDK 0.2.129. These are feature thresholds, not evidence of the latest versions.
Actions
Start with one narrowly described project skill and decide whether it should be invoked automatically, directly or both. Configure its discovery sources, exact invocation name and required tools, then inspect initialization messages and actual invocation behavior in the intended application.
Before relying on the result, confirm installed-version compatibility and review the skill's output against the task. Establish applicable pricing and license terms separately. Applications needing stronger restrictions must address command dispatch and tool or filesystem permissions as well as the skills list.
