name: skill-refiner description: | Refine an existing Mavis skill with evidence-driven minimal patches. Use when a skill has a concrete problem (wrong instructions, outdated steps, missing edge case) backed by evidence. Do not use for creating new skills (use skill-creator), or for stylistic preferences without evidence. descriptions:
Apply the smallest evidence-backed patch to fix a real skill problem.
skill-creatorIdentify exactly what went wrong. Evidence sources:
If the only evidence is "the skill could be better" with no specifics, stop here.
Read the current skill.
skill({ name: "<name>" })
The native skill tool returns the SKILL.md body plus a Location: header with the file path. Capture the current content before editing.
Before touching the skill, determine what actually went wrong:
| Situation | Action |
|---|---|
| Skill text is factually wrong or outdated | Fix the skill |
| Agent didn't follow the skill's correct instructions | Do NOT change the skill -- agent error |
| Environment changed (new API, renamed command, etc.) | Update the skill to reflect new reality |
| Skill works for the common case but misses an edge case | Add the edge case |
| Stylistic preference with no functional impact | Do NOT change |
If the problem is not in the skill itself, explain why and stop.
Design the minimal change that fixes the problem. Document:
Problem: <what is broken>
Evidence: <specific quote, error trace, or user statement>
Rationale: <why this change fixes it without breaking other behavior>
Use old_string / new_string format for each edit point. Prefer surgical patches over section
rewrites.
Ask yourself:
If any check fails, revise the patch or abandon the change.
Two routes depending on skill type:
Edit the skill file directly with the Edit tool (user skills live in
{{DATA_DIR}}/skills/<name>/, agent skills in {{DATA_DIR}}/agents/<agent>/skills/<name>/).
Re-read the file right before editing so you are patching the current content,
not a stale copy.
These live in the repo (packages/local-runtime/assets/skills/ or the project's own skill
directory under version control). Do NOT edit the runtime copies. Instead:
Advise the user to make the change in a worktree and submit via MR
Verify.
After applying, re-read the skill and confirm:
name and description are intactThe overall skill still reads coherently
skill({ name: "<name>" })
name and description fields must survive every editDeliver: