Files
command-center/agent/managed-skills/read-managed-skill-before-update/SKILL.md
T

1.4 KiB

name, description
name description
read-managed-skill-before-update Before manage_skill update (which overwrites the whole body), read the existing SKILL.md via skill:// and merge; recover lost bodies from the git repo tracking managed-skills.

Never overwrite a managed skill blind

manage_skill action:"update" replaces the entire SKILL.md body. Issuing it without the current text in hand silently destroys whatever the earlier session learned.

Rule

  1. Read first: read skill://<name> (or the file at ~/.omp/agent/managed-skills/<name>/SKILL.md) in the SAME turn as the update call, then re-issue the body as existing-content + additions.
  2. Keep additions append-shaped: a new section at the end, not a rewrite of prose that already worked. Near-duplicate sections are cheaper to clean up than lost knowledge.
  3. If a body was already clobbered, recover before rewriting: ~/.omp/agent (or the agent home) is commonly git-tracked — git -C ~/.omp/agent log --oneline -- managed-skills/<name>/SKILL.md then git -C ~/.omp/agent show HEAD:managed-skills/<name>/SKILL.md. If untracked, the version is gone; say so instead of pretending the rewrite preserved it.

Detection detail: a clobber usually shows up as a skill that still reads coherently but has lost the concrete env vars, paths, or trap list that made it actionable — i.e. the version you rewrote from memory of a sibling skill.