Write a skill
A skill is a folder whoseSKILL.md opens with YAML frontmatter, following the
agentskills.io specification. The folder
can hold supporting files next to it.
description is what the agent reads to decide when to load the skill. Say
what the skill does and when to use it.
Upload it
- Python SDK
- JavaScript SDK
- HTTP
idis what an agent’sincludelist takes.scopeis"private"(the key owner only, the default) or"organization".sourceis"custom"for a skill you uploaded and"cominty"for a built-in one.allowed_toolscomes from the space-separatedallowed-toolsfield.
What file can be
The Python SDK accepts three inputs.
A plain
str raises InvalidParams. Wrap a path in Path(...).
The JavaScript SDK takes no path. It accepts a zip (Blob, File,
ArrayBuffer, or Uint8Array), sent as is, or an object of the skill’s files
by /-separated path, such as { 'SKILL.md': '...', 'reference.md': bytes }.
The SDK zips that object in memory. It must hold SKILL.md at its root, and
entries with a path part that starts with . are left out. A string throws
InvalidParams. See client.skills.
The server accepts two zip layouts:
SKILL.mdat the root of the archive.- One top-level folder that holds
SKILL.md, and nothing else at the root.
detail starts with Invalid zip structure.
A missing or invalid frontmatter also returns 422, with the reason.
Give it to an agent
Put the skill’sid in a SkillsCapability.
- Python SDK
- JavaScript SDK
- HTTP
include id that the key cannot
read makes the creation fail with 422. For the other ways to narrow skills, see
Capabilities. Skills have no per-message scope.
Manage a skill
- Python SDK
- JavaScript SDK
- HTTP
listreturns the built-in Cominty skills (sourceis"cominty",scopeis null, read-only), the organization skills, and the key owner’s skills. A private skill of another member is not there.updatesends only the fields you pass: the display name,active, andscope. Passing none raisesInvalidParams. Withactiveset to false, the skill stays, and agents stop using it.- An uploaded version becomes the default.
frontmatterandupdated_atthen describe it. Versions are tagged to the second: two uploads of one skill within a second collide and return 500. Space them out. deleteis permanent and removes every version. HTTP answers 200 with anullbody.- A built-in skill, and a skill the key owner does not own, return 404 when you update it, upload a version of it, or delete it.
Limits and errors
Do not send a
surface field over HTTP. The skill takes the key’s surface, and
the call returns 400 Forbidden field.
Next steps
Custom agents
Create the agent that uses the skill.
Sources
Index local files and let an agent search them.