skill_manage
Create, edit, patch, delete, restore, or reconcile reusable skills with frontmatter validation and mirrored, hash-verified writes across configured skill roots.
Instructions
Create, edit, patch, or delete skills under the primary skills root.
Atomic primary write with frontmatter validation before disk hits, then
copy-and-hash verification in every configured skill root. A failed
mirror leaves the canonical write recoverable and returns
ERR mirror_partial_failure with redacted per-consumer diagnostics.
Actions:
create — write a brand-new skill. Requires name + description
+ content (the body markdown WITHOUT frontmatter; the
tool prepends a valid frontmatter block).
Pass full content starting with '---' to skip the
auto-frontmatter and supply your own. Link the reason for
creating the skill with source='note:' or record a
short use case in metadata.threadkeeper-eval-context.
Set classification='fixture' for hidden validation data.
Existing skills require skill_fixture_migrate instead.
edit — overwrite SKILL.md wholesale. Requires name + content
(full file including frontmatter).
patch — find/replace within SKILL.md. Requires name,
old_string, new_string. Result revalidated.
write_file — add a support file. Requires name, sub_path (must
start with references/, templates/, scripts/, or assets/),
content.
remove_file — remove a support file under one of the allowed subdirs.
Requires name, sub_path.
delete — remove a skill entirely. Pinned skills (in skill_usage)
are refused. Foreground/unknown-origin skills require
force from a foreground writer. Pass replacement_name
during consolidation to repoint inbound [[wikilinks]];
otherwise the result lists dangling references. The
Curator verifier can retire a rule-only skill by passing
usefulness_score (1 or 2), deletion_reason, rule_lesson_slug
and rule_excerpt. The complete rule must exist in the named
lesson. The retirement is recorded in skill_deletion_log.
restore — restore the latest trashed copy for name.
reconcile — retry mirror convergence for the canonical skill, or
finish removing mirrors when its canonical copy is gone.
cleanup_orphan — Curator verifier only. Archive or remove an already
validated registry-only orphan without requiring a skill
directory. Set orphan_action to archive or remove.
Quality gates (create, edit, patch, write_file). Learning-loop writers are refused; a session agent gets warnings for history noise, repetition, the active cap and patches without use, and may pass force=True to keep a deliberate template or project exception:
a new skill follows the template: description starts with "Use when", body has "## Not for", "## Steps", "## Check" and a one-line "## Why";
no [[wikilinks]] (write the rule text), no thread/ticket/PR IDs, dates, incident counts, version stories, user quotes or personal paths;
a shared skill names no project from SKILL_PROJECT_TERMS; a project skill passes
projectand names it in the description;no near-duplicate of any installed skill by meaning; pass
new_despite=<neighbor>when the task class really differs;a learning-loop create passes
evidence_sessions(ids from at least two sessions or days where the task came up);a learning-loop edit or patch passes
patch_reason(used_failed | used_corrected | contradicted) and a one-lineevidence. Session-agent writes are queued as proposals (SESSION_SKILL_WRITES=propose); show the proposal to the user and accept it with memory_proposal_decide.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "skill_manage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| force | No | ||
| action | Yes | ||
| source | No | ||
| content | No | ||
| project | No | ||
| evidence | No | ||
| sub_path | No | ||
| new_string | No | ||
| old_string | No | ||
| description | No | ||
| new_despite | No | ||
| patch_reason | No | ||
| rule_excerpt | No | ||
| orphan_action | No | archive | |
| classification | No | production | |
| deletion_reason | No | ||
| replacement_name | No | ||
| rule_lesson_slug | No | ||
| usefulness_score | No | ||
| evidence_sessions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |