Skip to main content
Glama

skill_manage

Destructive

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 project and 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-line evidence. 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

NameRequiredDescriptionDefault
nameNo
forceNo
actionYes
sourceNo
contentNo
projectNo
evidenceNo
sub_pathNo
new_stringNo
old_stringNo
descriptionNo
new_despiteNo
patch_reasonNo
rule_excerptNo
orphan_actionNoarchive
classificationNoproduction
deletion_reasonNo
replacement_nameNo
rule_lesson_slugNo
usefulness_scoreNo
evidence_sessionsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.27.0
    • addedInput schema / properties / deletion_reason
      Added value: +{
      +  "default": "",
      +  "title": "Deletion Reason",
      +  "type": "string"
      +}
    • addedInput schema / properties / evidence
      Added value: +{
      +  "default": "",
      +  "title": "Evidence",
      +  "type": "string"
      +}
    • addedInput schema / properties / evidence_sessions
      Added value: +{
      +  "default": "",
      +  "title": "Evidence Sessions",
      +  "type": "string"
      +}
    • addedInput schema / properties / new_despite
      Added value: +{
      +  "default": "",
      +  "title": "New Despite",
      +  "type": "string"
      +}
    • addedInput schema / properties / patch_reason
      Added value: +{
      +  "default": "",
      +  "title": "Patch Reason",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "default": "",
      +  "title": "Project",
      +  "type": "string"
      +}
    • addedInput schema / properties / rule_excerpt
      Added value: +{
      +  "default": "",
      +  "title": "Rule Excerpt",
      +  "type": "string"
      +}
    • addedInput schema / properties / rule_lesson_slug
      Added value: +{
      +  "default": "",
      +  "title": "Rule Lesson Slug",
      +  "type": "string"
      +}
    • addedInput schema / properties / usefulness_score
      Added value: +{
      +  "default": 0,
      +  "title": "Usefulness Score",
      +  "type": "integer"
      +}
  2. Changed1 schema field changedv0.26.0
    • addedInput schema / properties / classification
      Added value: +{
      +  "default": "production",
      +  "title": "Classification",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.22.0
    • addedInput schema / properties / orphan_action
      Added value: +{
      +  "default": "archive",
      +  "title": "Orphan Action",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.19.0
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "",
      +  "title": "Source",
      +  "type": "string"
      +}
  5. Changed2 schema fields changedv0.17.0
    • addedInput schema / properties / force
      Added value: +{
      +  "default": false,
      +  "title": "Force",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / replacement_name
      Added value: +{
      +  "default": "",
      +  "title": "Replacement Name",
      +  "type": "string"
      +}
  6. First observedv0.13.2

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare destructive=true and non-idempotent, and the description adds substantial context beyond that: validation before disk writes, copy-and-hash mirror verification, the ERR mirror_partial_failure outcome with recoverable canonical write, and the quality-gate checklist that can refuse writes. It also discloses that session agents get proposals rather than direct writes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but well structured: a one-line capability statement, an indented action table, then a bulleted quality-gate block. Nearly every clause carries operational meaning, though the gate list is dense enough that an agent must parse carefully to find the field it needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 21-parameter mutation tool with 0% schema coverage, the description supplies action requirements, formatting contracts, refusal conditions, error semantics, and the proposal flow. Output schema exists, so return-value explanation is not required, and the failure mode it names is still adequately described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden, and it documents essentially all 21 parameters grouped by action, including formatting rules (content without frontmatter vs. full file starting with '---'), allowed sub_path prefixes, and the patch_reason value set. It falls short of an exhaustive per-parameter spec, so a 4 rather than 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb set and resource: "Create, edit, patch, or delete skills under the primary skills root." The subsequent action table makes each operation's scope explicit and distinguishes this tool from siblings like skill_fixture_migrate (named for existing skills) and skill_deletion_log.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives per-action when-to-use rules plus alternatives: existing skills require skill_fixture_migrate, consolidation should pass replacement_name, force=True is for deliberate template/project exceptions, and session-agent writes are queued as proposals accepted via memory_proposal_decide. Exclusions such as pinned skills being refused and Curator-only actions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools