Skip to content
Skill

Diagnose

Walks the agent through a structured six-phase loop for diagnosing hard bugs

Diagnose 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
58
Last commit
License
MIT
Listing updated

Similar skills

About Diagnose

This skill gives the agent a disciplined method for tracking down hard-to-find bugs and performance regressions. Its central idea is to first build a fast, deterministic pass/fail signal for the problem, then use that signal to drive hypothesis testing, instrumentation and the final fix. The guide lists a range of ways to build such a loop, from failing tests and HTTP scripts to headless browser runs, trace replay, differential runs and bisection harnesses, and it advises making the loop faster, sharper and more deterministic.

The workflow runs through reproduction, ranked and falsifiable hypotheses, targeted probes that change one variable at a time, and a regression test written before the fix when a suitable test seam exists. Debug logs are tagged with a unique prefix so they can be removed with a single search. Performance issues are approached by measuring a baseline before bisecting. The skill also asks the agent to check the project's domain glossary and architecture decision records when exploring relevant code.

The skill expects a reproducible symptom from the user and access to the codebase, and it relies on whatever test runners, scripts or browser tools the project already has. It ships a bash helper template for human-in-the-loop checks. If the agent cannot build a loop, it is told to stop and request an environment, a captured artifact or permission for temporary instrumentation.

When your agent uses it

Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.

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 2 files (8 KB) on GitHub on 5 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

Copy the skill folder to ~/.claude/skills/diagnose to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/javimosch/supercli.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/diagnose &&
cp -R "$tmp/.agents/skills/diagnose" ~/.claude/skills/diagnose &&
rm -rf "$tmp"

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

Claude Code docs on skills

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

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

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

Codex docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/javimosch/supercli.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/diagnose &&
cp -R "$tmp/.agents/skills/diagnose" ~/.cursor/skills/diagnose &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/diagnose 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/javimosch/supercli.git --path .agents/skills/diagnose

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

Gemini CLI docs on skills

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

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/javimosch/supercli.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/diagnose &&
cp -R "$tmp/.agents/skills/diagnose" ~/.copilot/skills/diagnose &&
rm -rf "$tmp"

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

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/javimosch/supercli.git

Then copy supercli/.agents/skills/diagnose into your agent's skills folder as diagnose. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Feedback loop construction
Guides the agent through ten ways to build a fast pass/fail signal for a bug, in a suggested order.
Reproduction checklist
Confirms the loop shows the user's actual failure and captures the exact symptom for later verification.
Ranked hypotheses
Requires three to five falsifiable hypotheses, each with a stated prediction, before any testing begins.
Tagged instrumentation
Adds debugger or targeted log probes that map to specific predictions, with each debug log tagged for easy removal.
Regression test before fix
Turns the minimised repro into a failing test at a suitable seam, then applies and verifies the fix.
Performance baseline bisecting
Measures timing and query plans first, then narrows down the cause of performance regressions.
Cleanup and post-mortem
Checklist for removing debug code and recording the correct hypothesis in the commit or pull request.

Good for

  • Diagnose why a function throws an error in production-like conditions
  • Debug an intermittent failure that only happens some of the time
  • Track down a performance regression between two commits
  • Build a repro script for a UI bug using a headless browser
  • Bisect a bug across a set of git commits

Diagnose FAQ

When does Diagnose trigger?

When the user says "diagnose this" or "debug this", reports a bug, says something is broken, throwing or failing, or describes a performance regression.

What does the agent do if Diagnose cannot reproduce the bug?

It stops, lists what it tried, and asks the user for environment access, a captured artifact such as a HAR file or log dump, or permission to add temporary production instrumentation.

Does Diagnose change the code without asking?

It applies a fix only after a failing regression test is in place and a hypothesis has been tested. It also asks the user to review ranked hypotheses, though it proceeds if the user is unavailable.

What is required to use Diagnose?

The skill assumes a codebase the agent can run and a way to observe the bug, such as a test runner, a script or a browser. The skill itself is a SKILL.md with a bash helper template.

How do I install Diagnose in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/diagnose to use it in all your projects, or to .claude/skills/diagnose in one project.

Does Diagnose 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?

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?

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

Where this comes from

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

More from javimosch/supercli

  1. Makes the agent reply in terse, token-saving fragments without losing technical accuracy

    • Open source
    • 58 GitHub stars
    • AI models and LLM tooling
  2. Guides agents to index large codebases and long outputs through the context-mode MCP

    • Open source
    • 58 GitHub stars
    • Developer tools
  3. Makes the agent interview you one question at a time to stress-test a plan

    • Open source
    • 58 GitHub stars
    • Productivity
  4. Stress-tests a plan against your project's domain language and documented decisions

    • Open source
    • 58 GitHub stars
    • Developer tools
  5. Condenses the current conversation into a handoff document for a fresh agent

    • Open source
    • 58 GitHub stars
    • Developer tools
  6. Guides agents to fetch secrets from humanenv safely without logging or dumping them

    • Open source
    • 58 GitHub stars
    • Security