Skip to main content
PATCH
Changes a skill. Send only what you want to change.
  • instructions replaces the instructions whole.
  • skill_md replaces the instructions with its body, and the name and description with those in its front matter. A name or description sent beside it wins.
  • files adds files. A file at a path the skill already has replaces it.
  • remove_files detaches the files at these paths. The files themselves are not deleted.
@ref[file_upload:<file_id>] tokens in the instructions follow the files: a replaced file’s tokens name the new file, and a removed file’s tokens are dropped. Paths follow the rules in Create Skill. You need edit access to the skill. Public and community skills cannot be changed.

Authentication

Requires an API key, or an OAuth token with skills:write. Sending files also needs files:read.

Path parameters

string
required
The skill to change.

Body parameters

string
The new name, up to 200 characters.
string | null
The new description, up to 2,000 characters. Send null to clear it.
string
New instructions, up to 100,000 characters. Send this or skill_md, not both.
string
A whole SKILL.md, up to 100,000 characters. Send this or instructions, not both.
object[]
Up to 100 files to add or replace, each as {"path": "...", "file_id": "..."}.
string[]
Up to 100 paths of bundled files to detach. Each must name a file the skill has.

Response

Returns 200 with the updated skill, as Get Skill returns it.

Errors