skill_update
Update an ad-ops playbook (Skill), guarded by base_revision so concurrent edits aren't clobbered.
Updates an existing Skill. Requires the skill:write scope. Always fetch
the Skill with skill_get first so you have its current
revision, then pass it back as base_revision — the update is rejected if the
Skill changed since you read it.
Input
| Field | Type | Required | Description |
|---|---|---|---|
skill_name | string | yes | The current slug identifying which Skill to update. |
base_revision | number | yes | The revision you last read via skill_get. Guards against overwriting a race. |
name | string | no | New display name. |
description | string | no | New discovery description. |
body | string | no | New playbook instructions. |
slug | string | no | Optional new slug (a deliberate rename); normalized to kebab-case. |
Only the fields you pass change; the rest carry forward. On success the
revision is bumped.
Output
The updated Skill, including its new revision.
Example
“Add a rule to the weekly-meta-audit skill: always end with a one-line summary.”
const skill = skill_get({ skill_name: 'weekly-meta-audit' }); // revision 3
skill_update({
skill_name: 'weekly-meta-audit',
base_revision: skill.revision,
body: `${skill.body}\n\n## Rules\n- End with a one-line summary.`,
});
// → { slug: 'weekly-meta-audit', revision: 4, … }
Renaming the slug moves the handle
Passing slug renames the agent-facing handle. Anything (an agent, a saved
prompt) that referenced the old slug will need updating — it’s a deliberate
rename, not an alias.
Errors
- Stale revision — the Skill changed since you read it. Re-fetch with
skill_getand retry with the latestbase_revision. - Slug conflict — a rename collided with another live Skill’s slug.
- Invalid slug — the new slug has no letters or digits.
- Not found — no Skill with that slug exists.
401 Unauthorized/403 insufficient_scope(needsskill:write).