# Diagnose

> Diagnose is an open-source agent skill for developer tools. Walks the agent through a structured six-phase loop for diagnosing hard bugs. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/javimosch/supercli/tree/master/.agents/skills/diagnose
- **Repository:** https://github.com/javimosch/supercli
- **GitHub stars:** 58
- **License:** MIT
- **Skill name:** diagnose
- **Collection:** https://github.com/javimosch/supercli
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-05

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell scripts](https://github.com/javimosch/supercli/tree/HEAD/.agents/skills/diagnose)
- [No network calls found in its scripts](https://github.com/javimosch/supercli/tree/HEAD/.agents/skills/diagnose)
- [License: MIT](https://github.com/javimosch/supercli/tree/HEAD/.agents/skills/diagnose)

## Features

- **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

## Install

### Claude Code

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
gemini skills install https://github.com/javimosch/supercli.git --path .agents/skills/diagnose
```

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

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [Debug](https://ai-powered.com/skills/debug-evist0): Debug is an open-source agent skill for developer tools.
- [Diagnose loop](https://ai-powered.com/skills/diagnose-loop): Diagnose loop is an open-source agent skill for developer tools.
- [Diagnosing bugs](https://ai-powered.com/skills/diagnosing-bugs): Diagnosing bugs is an open-source agent skill for developer tools.
- [Debug issue](https://ai-powered.com/skills/debug-issue): Debug issue is an open-source agent skill for developer tools.
- [Debug hypothesis](https://ai-powered.com/skills/debug-hypothesis): Debug hypothesis is an open-source agent skill for developer tools.
- [Debug](https://ai-powered.com/skills/debug-tansuasici): Debug is an open-source agent skill for developer tools.
- [Debugging](https://ai-powered.com/skills/debugging): Debugging is an open-source agent skill for developer tools.
- [Debugging and error recovery](https://ai-powered.com/skills/debugging-and-error-recovery): Debugging and error recovery is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/diagnose-javimosch
