Extend agents with skills changedagent-sdk/skills
Nearest release: v2.1.242, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+6added
Lines−2removed
From line
342
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits14to this page, all time
The whole hunk
from line 342, old and new numbered
/
from line 342
342342## Pre-approve tools for skills
343343
344344<Note>
345 For project and personal skills, the `allowed-tools` frontmatter field applies only when you use the Claude Code CLI directly. In SDK sessions, manage tool approval for these skills through the `allowedTools` option (`allowed_tools` in Python) in your query configuration. Skills [synced from claude.ai](/docs/en/skills#how-claude-code-handles-the-frontmatter-of-a-synced-skill) follow their own frontmatter rules.
345 For project and personal skills, Claude Code applies the [`allowed-tools`](/docs/en/skills#pre-approve-tools-for-a-skill) frontmatter field in SDK sessions. You can also pre-approve tools for these skills through the `allowedTools` option (`allowed_tools` in Python) in your query configuration. Skills [synced from claude.ai](/docs/en/skills#how-claude-code-handles-the-frontmatter-of-a-synced-skill) follow their own frontmatter rules.
346346</Note>
347347
348348Skills run with the session's tools. The example below pre-approves `Read`, `Grep`, and `Glob` with `allowedTools` (`allowed_tools` in Python), so Claude can inspect files while running the [security-check skill](#create-and-dispatch-your-first-skill) without stopping for approval:
from line 483
483483 ```
484484
485485 An empty name reports `Skill names must be non-empty strings.`
486
487 Before TypeScript Agent SDK 0.3.221, the SDK didn't run this check.
486488 </Tab>
487489
488490 <Tab title="Python">
from line 495
493495 ```
494496
495497 An empty name reports `Skill names must be non-empty strings`.
498
499 Before Python Agent SDK 0.2.129, the SDK didn't run this check.
496500 </Tab>
497501</Tabs>
498502
from line 506
502506
503507## Next steps
504508
505The [Claude Code skills guide](/docs/en/skills) covers authoring in depth. Its guidance applies to SDK sessions, with one exception: for project and personal skills, [Pre-approve tools for skills](#pre-approve-tools-for-skills) replaces the `allowed-tools` frontmatter field with the `allowedTools` option. Start with these sections:
509The [Claude Code skills guide](/docs/en/skills) covers authoring in depth. Its guidance applies to SDK sessions. Start with these sections:
506510
507511* [Frontmatter reference](/docs/en/skills#frontmatter-reference): every supported field
508512* [Pass arguments to skills](/docs/en/skills#pass-arguments-to-skills): `$ARGUMENTS`, `$0`, `$1`, and skill stacking. The [full substitution table](/docs/en/skills#available-string-substitutions) adds named arguments and the `${CLAUDE_*}` variables
No line in this hunk matches that.