save_skill
Save a skill to your private registry so you can run, share, or improve it later (name, description, body, outcome, tags).
Addressing: omit skill_id to save in your own namespace, which
updates your own skill of this name or creates a new one. Saving by
name never edits a skill someone else shared with you. To edit a
skill you own or have edit access to, pass its skill_id (and a
matching name). If a skill of this name is shared with you at edit
access and you save by name alone, the reference is ambiguous and the
call asks you to address it by id.
Optional source ('manual' | 'teach' | 'optimization' |
'description_optimization' | 'audit') attributes the version to a
manual save, a teach_skill session, a skill optimization session,
a description optimization session, or an audit_skill session; omit
to leave NULL.
Returns skill_id and version. Skills are private to the caller; share via publish_template_version.
files is a full snapshot: any path you do not include is deleted.
Only pass files when you hold the complete tree. To change specific
files in a skill that already exists, use update_skill_files, which
keeps the paths you do not name. When a save does drop paths, the
response lists them under deleted, so check that key and restore
anything you did not mean to remove.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Publish-skill payload aligned with the Claude Code skills convention. Required top-level fields mirror a Claude Code ``SKILL.md`` frontmatter: ``name`` (kebab-case handle) and ``description`` (one-sentence summary). ``outcome`` and ``tags`` are top-level discovery facets surfaced by ``list_skills``; everything else lives in the ``body`` and is opaque to the registry. Skills are always private to the caller. Public sharing is the ``templates`` surface (``publish_template_version`` / ``fork_template``); there is no ``visibility`` knob on a skill row. Unknown fields are silently dropped (``extra="ignore"``). Fields such as ``manifest``, ``visibility``, and ``kpi`` do not cause validation errors and are simply ignored. The server accepts both ``slug`` and ``name`` as input for the skill handle. Responses return both ``name`` and ``slug`` fields with identical values. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||