Agent skill

Bug Diagnosis

by mohitagw15856 in mohitagw15856/pm-claude-skills

Diagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause.

MITAuto-check passedDevelopment

Install Bug Diagnosis

skills CLI
$ npx skills add mohitagw15856/pm-claude-skills --skill bug-diagnosis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mohitagw15856/pm-claude-skills bug-diagnosis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mohitagw15856/pm-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bug-diagnosis .claude/skills/bug-diagnosis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bug-diagnosis
GitHub stars
1.4k
Token cost
~804 tokens
SKILL.md length
405 words
Files
1
Skills in repo
1,348
Repo updated
First seen
Licence
MIT

At a glance

Diagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause.

  • Chasing a defect
  • SKILL.md covers Required Inputs, Output Format, Quality Checks and Anti-Patterns, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • An intermittent failure

What it does

Bug Diagnosis is an agent skill from mohitagw15856/pm-claude-skills. Diagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause. Use when debugging, chasing a defect, an intermittent failure, or 'why is this happening?'. Produces a structured diagnosis: a reliable repro, the narrowed-down location, ranked hypotheses with how to test each, and the root cause + fix once found.

Its SKILL.md is about 800 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Root cause analysis, Failing and flaky tests and Debugging. The repository describes itself as: 1255 professional Agent Skills for Claude, ChatGPT, Gemini, Cursor & Codex — PRDs, postmortems, leases, medical bills, layoffs, go-bags, new countries. Plain markdown, MIT, in… The licence is MIT.

When your agent uses it

  • Chasing a defect
  • An intermittent failure
  • Why is this happening?

Example prompts

  • “why is this happening?”
  • “/bug-diagnosis”

What it can do on your machine

Read from SKILL.md and the folder at commit 1cbf1f0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bug Diagnosis loads about 804 tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 405 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~804

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mohitagw15856/pm-claude-skills at commit 1cbf1f0, republished under its MIT licence (© mohitagw15856). 405 words, ~804 tokens.

Download SKILL.mdSave it as .claude/skills/bug-diagnosis/SKILL.md (or your agent's skills folder).
name
bug-diagnosis
description
Diagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause. Use when debugging, chasing a defect, an intermittent failure, or 'why is this happening?'. Produces a structured diagnosis: a reliable repro, the narrowed-down location, ranked hypotheses with how to test each, and the root cause + fix once found.

Bug Diagnosis Skill

The slowest way to fix a bug is to start changing code and hope. This skill runs a disciplined diagnostic loop: reproduce it reliably, isolate where it happens, hypothesize why, and test the cheapest hypothesis first — narrowing until the root cause is proven, not guessed. It produces a fix and an explanation of why the bug existed.

Required Inputs

Ask for these only if they aren't already provided:

  • The symptom — what's wrong: expected vs. actual behavior, error/stack trace, when it started.
  • Repro steps — how to trigger it (or "can't reliably reproduce yet").
  • Context — recent changes, environment, frequency (always / intermittent / specific inputs).
  • What's been tried — so we don't repeat dead ends.

Output Format

Diagnosis: [bug]

1. Reproduce — the minimal, reliable steps to trigger it. If it's intermittent, the plan to make it deterministic (fixed input/seed, added logging, narrowed conditions). No fixing until it reproduces.

2. Isolate — narrow where it happens: bisect (git bisect / comment-out / binary search the input), check the boundaries (what's the last known-good point vs. first bad). State the smallest scope that still shows the bug.

3. Hypotheses (ranked) — likely causes, most-probable-and-cheapest-to-test first:

HypothesisWhy plausibleHow to test it (the cheap check)Verdict

Test them in order; record what each rules in or out.

4. Root cause — the proven cause (not a symptom), with the evidence that confirms it.

5. Fix & guard — the fix, a test that fails before it and passes after (lock the bug out), and any nearby instances of the same mistake.

Show full SKILL.md (155 more words)Show less

Quality Checks

  • A reliable reproduction exists before any fix is attempted
  • The location is isolated by bisection/narrowing, not guessed
  • Hypotheses are ranked by likelihood × cheapness and tested in order
  • The stated cause is the root cause with evidence — not just the surface symptom
  • A regression test is added that fails before the fix and passes after

Anti-Patterns

  • Do not start changing code before the bug reliably reproduces
  • Do not fix the symptom and stop — trace to the underlying cause
  • Do not change several things at once — you won't know what fixed it (or hid it)
  • Do not skip the regression test — an unguarded bug comes back
  • Do not ignore "what's been tried" — re-running dead ends wastes the loop

Based On

Systematic debugging method (reproduce → isolate → hypothesize → verify) — Zeller's Why Programs Fail / scientific-method debugging.

Example Trigger Phrases

  • "Help me debug this."
  • "Why is this happening?"
  • "This test fails intermittently."
  • "Find the root cause of this defect."

© mohitagw15856, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/bug-diagnosis of mohitagw15856/pm-claude-skills.

Open the folder on GitHubat commit 1cbf1f0

Compare with similar skills

Bug Diagnosis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bug Diagnosis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bug Diagnosis this skillmohitagw15856/pm-claude-skills1.4k—~804Automated safety check: PassMIT
Systematic DebuggingChrisWiles/claude-code-showcase6.1k3 repos~1.2kAutomated safety check: PassNone
Debugging and Error Recoveryaddyosmani/agent-skills105k1 repos~2.6kAutomated safety check: PassMIT
Minimal Code Fixcobusgreyling/loop-engineering11k1 repos~671Automated safety check: NotesMIT
Systematic Debugginged3dai/ed3d-plugins2503 repos~2.4kAutomated safety check: PassNone
Debugging And Error Recoveryabashev/vfs-s31066 repos~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Systematic Debugging

    ChrisWiles/claude-code-showcase

    Applies a four-phase debugging routine that finds the root cause of a bug or failing test before any fix is written.

    6.1k GitHub starsUsed in 3 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Debugging and Error Recovery

    addyosmani/agent-skills

    Applies a stop-the-line rule and a step-by-step triage when tests fail, builds break or something stops working, aiming at the root cause instead of guesses.

    105k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed
  • Minimal Code Fix

    cobusgreyling/loop-engineering

    Makes the smallest code change that fixes one well-scoped problem, such as a CI failure, review comment or typo, without refactoring anything unrelated.

    11k GitHub starsUsed in 1 repo~671 tokens
    DevelopmentAuto-check: notes
  • Systematic Debugging

    ed3dai/ed3d-plugins

    A skill your agent uses when encountering any bug, test failure, or unexpected behavior, before proposing fixes - four-phase framework (root cause investigation, pattern analysis, hypothesis…

    250 GitHub starsUsed in 3 repos~2.4k tokens
    DevelopmentAuto-check passed
  • Guides systematic root-cause debugging. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 6 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Veomni Debug

    ByteDance-Seed/VeOmni

    A skill your agent uses for ANY bug, error, crash, wrong output, loss divergence, gradient explosion, test failure, CUDA error, distributed training hang, checkpoint load failure, or unexpected…

    2.2k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed

More from mohitagw15856/pm-claude-skills

All 1,348 skills in this repo
  • Car Tco

    mohitagw15856/pm-claude-skills

    Compare the total cost of car ownership across buy-new, buy-used, lease, and keep-your-current-car — depreciation, insurance, maintenance ramp, and fuel over a real horizon, not just the monthly…

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Cs Health Scorecard

    mohitagw15856/pm-claude-skills

    Build a customer health scorecard for a specific account. An agent skill from mohitagw15856/pm-claude-skills.

    1.4k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Exit Waterfall

    mohitagw15856/pm-claude-skills

    Compute who gets what at each exit price from a cap table — liquidation preferences, conversion points, and where the founders' share collapses.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Feature Prioritisation

    mohitagw15856/pm-claude-skills

    Apply prioritisation frameworks (RICE, MoSCoW, Kano, ICE, Opportunity Scoring) to rank features and backlog items.

    1.4k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Fire Number

    mohitagw15856/pm-claude-skills

    Compute a financial-independence (FIRE) target and years-to-reach with every assumption labeled as an assumption — plus a sensitivity table instead of a single false-precision answer.

    1.4k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Freelance Rate

    mohitagw15856/pm-claude-skills

    Derive a freelance day/hourly rate backwards from target income, honest billable utilization, overhead, and the self-employment tax premium — the arithmetic that proves a rate is not salary÷2000.

    1.4k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Bug Diagnosis

What does Bug Diagnosis do?

Diagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause. Bug Diagnosis is an agent skill from mohitagw15856/pm-claude-skills. Diagnose a bug systematically instead of guessing — reproduce, isolate, form hypotheses, and test them to root cause.

When should I use Bug Diagnosis?

Bug Diagnosis fits situations like: chasing a defect; an intermittent failure; why is this happening?.

How do I install Bug Diagnosis in Claude Code?

Run `npx skills add mohitagw15856/pm-claude-skills --skill bug-diagnosis -a claude-code`. Or copy the skill folder (skills/bug-diagnosis in mohitagw15856/pm-claude-skills) into .claude/skills/bug-diagnosis in your project. Claude Code loads it when a task matches its description.

How do I install Bug Diagnosis in Codex?

Run `npx skills add mohitagw15856/pm-claude-skills --skill bug-diagnosis -a codex`. Or copy the skill folder (skills/bug-diagnosis in mohitagw15856/pm-claude-skills) into .agents/skills/bug-diagnosis in your project. Codex loads it when a task matches its description.

Can I use Bug Diagnosis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mohitagw15856/pm-claude-skills --skill bug-diagnosis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bug-diagnosis, .gemini/skills/bug-diagnosis, .github/skills/bug-diagnosis and .opencode/skills/bug-diagnosis in your project.

What does Bug Diagnosis need to run?

SKILL.md names no scripts, command-line tools or credentials: Bug Diagnosis is instructions for the agent only.

Does Bug Diagnosis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bug Diagnosis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bug Diagnosis use?

Bug Diagnosis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bug Diagnosis use?

About 804 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bug Diagnosis?

Skills that share tags, products or a category with Bug Diagnosis: Systematic Debugging (ChrisWiles/claude-code-showcase, 6.1k stars), Debugging and Error Recovery (addyosmani/agent-skills, 105k stars), Minimal Code Fix (cobusgreyling/loop-engineering, 11k stars) and Systematic Debugging (ed3dai/ed3d-plugins, 250 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bug Diagnosis?

mohitagw15856 (a GitHub user) maintains it in mohitagw15856/pm-claude-skills, which has 1,434 GitHub stars. The repository holds 1,348 skills in this directory. The repository was last updated on October 9, 2026.

Source: mohitagw15856/pm-claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.