with one click
agents-md-fix
// Use when iteratively raising a CLAUDE.md or AGENTS.md to a target audit score. Spawns blind reviewer + fixer subagents per loop (target hidden, prevents score gaming).
// Use when iteratively raising a CLAUDE.md or AGENTS.md to a target audit score. Spawns blind reviewer + fixer subagents per loop (target hidden, prevents score gaming).
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | agents-md-fix |
| description | Use when iteratively raising a CLAUDE.md or AGENTS.md to a target audit score. Spawns blind reviewer + fixer subagents per loop (target hidden, prevents score gaming). |
| disable-model-invocation | true |
| metadata | {"dependencies":["agents-md-audit"]} |
Iterates until a CLAUDE.md or AGENTS.md file passes a target audit score. The reviewer subagent never sees the target — prevents score gaming. The fixer subagent never sees the target — addresses every reported issue, not "enough to pass."
The agent running this skill is the orchestrator. Spawns subagents, parses scores, decides when to stop. Never delegates the stop decision.
Parse from skill args. Defaults if unspecified:
file — path to file under audit. Default ./CLAUDE.md.target — score (0-100) the file must reach. Default 99.max — iteration cap. Default 5.If multiple CLAUDE.md / AGENTS.md exist and the user did not name one, ask which.
Violating any of these defeats the design. If tempted to "just hint at the target so it stops earlier" — don't.
Run up to max iterations:
Use the Agent tool with subagent_type: general-purpose. Prompt — copy this template verbatim, substitute only {FILE}:
Audit the agent instruction file at `{FILE}`. Invoke the `almanac:agents-md-audit` skill via the Skill tool, run its full Phase 1 context scan, score the file against all six rubrics, and return the report verbatim. Do not edit the file. Return only the audit report.
Parse the returned report. Extract the total score from the line beginning **Total: . Capture the full report body (Suggestions section onward) for the fixer.
target → stop. Report final score, iterations used, and file path to the user.max and score < target → stop. Report last score and unresolved issues. Ask the user how to proceed.Use the Agent tool with subagent_type: general-purpose. Prompt template — substitute {FILE} and {REPORT}:
Fix every issue in the audit report below for the file `{FILE}`. Use the Read and Edit tools. Address every Suggestion line — do not pick a subset, do not skip ones that look minor. Verify ground truth (file paths, function names, line references) before editing. After edits, if `tests/test-skills.sh` exists at the repo root, run `bash tests/test-skills.sh`; if it fails, fix the regression before returning. Return a short summary of what changed and any issue you could not address with reasoning.
---
{REPORT}
Increment iteration counter and return to step 1.
Always report to the user:
N of max).Reviewer-and-fixer separation enforces an information firewall. If a single agent both scores and edits, it can rationalize "good enough" once aware of the target. Splitting roles + hiding the target makes each subagent solve only its narrow job. The orchestrator (this agent) holds the target and decides termination.