
diagnose-fix-loop
Use only when explicitly asked to run diagnose-fix-loop: repeat diagnosis, scoped fixes, and verification.
- Installs
- 420
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/legendapp/legend-skills --skill diagnose-fix-loop- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads diagnose-fix-loop automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Diagnose Fix Loop
Use this skill to drive a complete improvement loop, not a single debugging pass.
Before starting, load and follow $diagnose. Treat $diagnose as the evidence engine for each pass; this skill only adds the outer loop that plans, implements, re-runs diagnosis, and decides whether to continue.
Explicit invocation opts in to $diagnose and authorizes scoped local fixes and verification. This skill owns implementation once evidence supports a credible cause and fix.
Selected installs do not install dependencies automatically. If $diagnose is not installed or available, stop before making changes. Tell the user to install it with:
npx skills add LegendApp/legend-skills --skill diagnose
Then ask them to retry after installation.
Loop
-
State the target outcome. Anchor the loop to the user's symptom, performance goal, failing test, UX defect, regression, or code quality concern. If the user gave no concrete anchor, create the fastest observable feedback loop first.
-
Run a
$diagnosepass. Record the causal evidence and exact validation signal to rerun after the fix. Proceed on Proven or Supported evidence that justifies a scoped fix. If evidence remains Incomplete, continue useful available probes; stop when unavailable evidence prevents a credible fix, and report the gap. If the user asked for delegation, use it only for bounded evidence collection inside this pass; keep bottleneck ranking, fix selection, code edits, and final interpretation in the main loop. -
Make a ranked fix plan. Prefer one smallest credible fix at a time. The plan must include:
- what evidence supports the change
- what file or boundary will change
- what validation should improve
- what would make the plan wrong
-
Implement only the top plan item. Keep the edit scoped to the supported causal boundary. Avoid stacking speculative cleanup, broad refactors, or adjacent improvements unless the diagnosis showed they are part of the same fault.
-
Verify with the original signal. Re-run the reproduction path or measurement from step 2, then focused regression coverage, then broader checks when the touched surface warrants them.
-
Re-run
$diagnose. Diagnose the new state from evidence, not from the intent of the change. Look for:- the original symptom still failing
- a nearby remaining fault
- a regression introduced by the fix
- a stronger next bottleneck revealed by the first fix
- missing coverage at the real seam
-
Decide whether to continue. Continue when evidence identifies a credible next fix and the next action is safe to take. Each new iteration should have a sharper target than the previous one.
Iteration Discipline
Keep a short running log while working:
- iteration number
- current evidence
- chosen fix
- validation result
- next remaining issue or stop reason
If an experiment fails, revert it unless it is independently useful and intentionally kept. Do not count a failed experiment as progress unless it narrowed the diagnosis.
If two iterations produce no measurable improvement and no sharper evidence, pause implementation and re-diagnose the feedback loop itself before making more edits.
Stop Rules
Stop only when one of these is true:
$diagnosecannot build or run a credible feedback loop with available code, tools, or artifacts- the next action requires user input, inaccessible external state, credentials, production access, or a destructive operation
- the user requested read-only diagnosis and the next useful step would edit files
- validation is clean and a fresh
$diagnosepass finds no remaining credible fault to fix - remaining improvements are speculative, cosmetic, or outside the user's target outcome
When stopping, report the final state, the validation evidence, remaining known risk, and the smallest user action or artifact needed if work is blocked.
FAQ
What does the diagnose-fix-loop skill do?
Use only when explicitly asked to run diagnose-fix-loop: repeat diagnosis, scoped fixes, and verification.
How do I install diagnose-fix-loop?
Run npx skills add https://github.com/legendapp/legend-skills --skill diagnose-fix-loop in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/diagnose-fix-loop/ (personal) or .claude/skills/diagnose-fix-loop/ (project).
Which AI agents can use diagnose-fix-loop?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is diagnose-fix-loop safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains diagnose-fix-loop?
It is published by legendapp in legendapp/legend-skills. It has 420 recorded installs.
More from legendapp/legend-skills
legend-list-best-practices
legendapp/legend-skills
Implement or audit @legendapp/list usage, including recycling, measurement, invalidation, and scroll anchoring.
legend-state-best-practices
legendapp/legend-skills
Open the skill to read its SKILL.md instructions.
react-coding-style
legendapp/legend-skills
Open the skill to read its SKILL.md instructions.
simplify
legendapp/legend-skills
Simplify the requested code or diff while preserving behavior and meaningful coverage.
commit
legendapp/legend-skills
Open the skill to read its SKILL.md instructions.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.