agentleFS
MicrosoftKnown publishermicrosoft/Huabu/apps/server/src/prompt/skills/update-skill/SKILL.md

Update a user skill

Skill157 starsChanged 9 months agoMITView on GitHub

Find an existing user skill and apply the requested change to its SKILL.md.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only user / merged skills can be updated.

    line 26
  2. Very specific:

    Never create a new file in this flow.

    line 27
  3. Very specific:

    Always read("skills/<id>/SKILL.md") first to see the current content.

    line 31
  4. Distinctive:

    Do not make Space changes in the same turn.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update a user skill

You were called because the user typed /update-skill <target-and-change> in the chat input. Your job for this turn is locate the right user skill and apply the requested change to its setting/skills/<id>/SKILL.md. Reuse fs_write — no other writes.

Inputs you have

  • The free-text after /update-skill in the most recent user message — usually mixes a target hint ("the warm-healing skill") with the actual change ("add a frame-spacing rule for vertical layouts"). Parse out both.
  • The skill catalogue in your system prompt — the authoritative list of user/merged skills with their ids and one-line descriptions.

Resolve the target

  1. Direct id match — if the brief contains an obvious skill id (kebab-case token matching the catalogue), use it. Done.
  2. Name match — otherwise scan the catalogue's name and description for the best fit. If exactly one matches, use it. Done.
  3. Multiple candidates / no match — reply with the candidates (or "no matching skill found") and stop. Do not guess.

Constraints:

  • Only user / merged skills can be updated. If the user references a system-only skill id, reply explaining the limitation and stop.
  • Never create a new file in this flow. If the resolved target doesn't exist on disk, reply and stop — /create-skill is the right command for that.

Read before you write

Always read("skills/<id>/SKILL.md") first to see the current content. Do not rely on the catalogue blurb or your memory of the file.

Pick the mode

  • replace_string — default. Use whenever the change can be expressed as "find this exact existing block, replace it with this new block". Safer: nothing else in the file is touched. Pick a unique oldString (add 1–2 lines of surrounding context if the snippet is otherwise common).
  • overwrite — only when the change is structural (sections reorganised, more than half the file rewritten). You then submit the entire file including the frontmatter fence — anything you omit is permanently deleted.

The rationale field is ignored for updates (it's only checked when creating a new skill).

Write it

For a targeted edit:

{
  "path": "skills/<id>/SKILL.md",
  "mode": "replace_string",
  "oldString": "## When to use\n\nUse for plot-driven stories with a clear antagonist.",
  "newString": "## When to use\n\nUse for plot-driven stories with a clear antagonist, including episodic TV bibles."
}

For a structural rewrite:

{
  "path": "skills/<id>/SKILL.md",
  "mode": "overwrite",
  "body": "---\nname: \"…\"\ndescription: \"…\"\nappliesTo: [\"ask\", \"operate\"]\n---\n\n# …\n\n## When to use\n\n…\n"
}

After writing

  • Briefly confirm to the user: skill id, mode used (replace_string / overwrite), and a one-line summary of what changed.
  • Do not make Space changes in the same turn.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.