Skip to content
Skill

Diagnose loop

Guides the agent to build a fast pass/fail reproduction before diagnosing hard bugs

Diagnose loop is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
shell
Platforms
Claude Code, Codex, Cursor
GitHub stars
12
Last commit
License
MIT
Listing updated

Similar skills

About Diagnose loop

Diagnose Loop is a structured debugging workflow for bugs that resist quick fixes, such as flaky tests, performance regressions and intermittent failures. Its central idea is to construct a fast, deterministic, binary feedback loop before any investigation, then run the later phases against that signal. The skill ranks ten ways to build such a loop, from an existing failing test up to a human-in-the-loop bash harness, and advises picking the cheapest one that reproduces the bug. It also covers raising the reproduction rate of intermittent failures by tightening the test surface, running tests in parallel and stressing the system.

The remaining phases walk the agent through reproducing the user's exact failure, generating three to five ranked falsifiable hypotheses for the user to review, and testing them one variable at a time. Debug output is tagged with a unique token so it can be removed in one search. The fix is expected to come with a regression test at the smallest observable seam, and cleanup ends by rerunning the original loop against the pre-fix and post-fix commits.

The skill includes a bash helper template and reference documents for recipes and hypothesis format. It lists Read, Write, Edit, Bash, Grep and Glob as its allowed tools, and it suggests pairing with the Playwright skill for browser-based bugs. It is MIT licensed.

When your agent uses it

Disciplined bug diagnosis whose core is building a fast, deterministic pass/fail reproduction first; the later phases run on that signal. Use for hard bugs, flaky tests or performance regressions. Trigger on "diagnose this", "debug this", "why is this broken", "it sometimes fails", "this test is flaky", "I can't reproduce it".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 4 files (21 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the skill-madness plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ivy00johns/Skill-Madness
/plugin install skill-madness@skill-madness

Or copy only this skill to ~/.claude/skills/diagnose-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/diagnose-loop &&
cp -R "$tmp/skills/workflows/diagnose-loop" ~/.claude/skills/diagnose-loop &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/diagnose-loop inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/diagnose-loop to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/diagnose-loop &&
cp -R "$tmp/skills/workflows/diagnose-loop" ~/.agents/skills/diagnose-loop &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/diagnose-loop inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/diagnose-loop to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/diagnose-loop &&
cp -R "$tmp/skills/workflows/diagnose-loop" ~/.cursor/skills/diagnose-loop &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/diagnose-loop inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ivy00johns/Skill-Madness.git --path skills/workflows/diagnose-loop

Or copy the folder to ~/.gemini/skills/diagnose-loop yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/diagnose-loop:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/diagnose-loop &&
cp -R "$tmp/skills/workflows/diagnose-loop" ~/.copilot/skills/diagnose-loop &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/diagnose-loop inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ivy00johns/Skill-Madness.git

Then copy Skill-Madness/skills/workflows/diagnose-loop into your agent's skills folder as diagnose-loop. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Feedback loop construction
Ranks ten methods for building a fast, deterministic pass/fail signal and picks the cheapest one that reproduces the bug.
Flaky bug stabilization
Raises the reproduction rate of intermittent failures through narrower tests, parallel runs and deliberate system stress.
Ranked hypothesis testing
Produces three to five falsifiable hypotheses for user review and tests them one variable at a time.
Tagged debug instrumentation
Marks every temporary log or breakpoint with a unique token so cleanup is a single search.
Regression test guidance
Places regression tests at the smallest observable seam and flags missing seams as architectural issues.
Post-fix verification
Reruns the original loop on pre-fix and post-fix commits and records the root cause in the commit message.

Good for

  • Track down a test that passes locally but fails intermittently in CI
  • Investigate a performance regression that appeared after a recent change
  • Debug a bug that only happens in production by replaying the request locally
  • Reproduce a UI rendering issue in a visible Playwright browser
  • Find the commit that introduced a bug using git bisect

Diagnose loop FAQ

Which tools does the skill need?

It lists Read, Write, Edit, Bash, Grep and Glob as allowed tools, and its loop recipes rely mainly on Bash and the repository's test tooling.

When should I skip Diagnose loop?

For trivial bugs with obvious causes, such as typos or a missing import the stack trace already points at, the skill says to just fix them. It is meant for flaky tests, performance regressions and bugs that take more than about 15 minutes to understand.

How does Diagnose loop differ from systematic-debugging?

The skill recommends systematic-debugging for straightforward bugs that only need disciplined hypothesizing. It is aimed at cases where building a fast, deterministic feedback loop is the main payoff.

Does Diagnose loop work with Playwright?

Yes, the skill suggests composing with the playwright skill and running browser scripts with headless set to false for UI bugs.

How do I install Diagnose loop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/diagnose-loop to use it in all your projects, or to .claude/skills/diagnose-loop in one project. Or install the skill-madness plugin, which includes it: /plugin marketplace add ivy00johns/Skill-Madness, then /plugin install skill-madness@skill-madness.

Does Diagnose loop run scripts?

Yes. It runs shell scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Diagnose loop?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Diagnose loop?

The closest alternatives to Diagnose loop are Diagnosing bugs, Debug, Debug issue, Debug hypothesis and Debug.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ivy00johns/Skill-Madness

  1. Finds merged and stale git branches, then deletes them only after your confirmation

    • Open source
    • 12 GitHub stars
    • Developer tools
  2. Finds and removes git worktrees whose changes are already merged into main

    • Open source
    • 12 GitHub stars
    • Developer tools
  3. Bulk-scans a skill ecosystem for consistency, quality gaps and ownership conflicts

    • Open source
    • 12 GitHub stars
    • Developer tools
  4. Runs a single-skill quality review covering structure, triggering and output checks

    • Open source
    • 12 GitHub stars
    • Developer tools
  5. Turns skill review or audit reports into a prioritized list of concrete SKILL.md fixes

    • Open source
    • 12 GitHub stars
    • Developer tools
  6. Applies planned edits to SKILL.md files, validates them, and offers to sync

    • Open source
    • 12 GitHub stars
    • Developer tools