diagnose

diagnose is a skill for Claude Code from Adit-Jain-srm/skill-forge. It costs 71 tokens per session (707 once invoked), scanned A, original, MIT.

A step-by-step method for debugging broken or unexpected software behaviour.

In plain words
What is it for?
Investigating intermittent bugs, unknown failures, unsuccessful fixes, and requests to diagnose or debug code.
Why use it?
It replaces guesswork with evidence by requiring the problem to be reproduced, narrowed down, tested against one explanation, and checked with a regression test.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skill-forge plugin — 19 skills shipped together

Good fit Investigating intermittent bugs, unknown failures, unsuccessful fixes, and requests to diagnose or debug code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adit-jain-srm/skill-forge/diagnose
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Adit-Jain-srm/skill-forge --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/Adit-Jain-srm/skill-forge

Made for: Claude Code.

Or install skill-forge, the plugin that ships this one along with the rest of its 19 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/adit-jain-srm/skill-forge/diagnose.svg)](https://agentmods.dev/skills/adit-jain-srm/skill-forge/diagnose)
Your own site
<a href="https://agentmods.dev/skills/adit-jain-srm/skill-forge/diagnose"><img src="https://agentmods.dev/badge/skills/adit-jain-srm/skill-forge/diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 707 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.00707
Opus 5 $0.00036 $0.00353
Sonnet 5 $0.00014 $0.00141
Haiku 4.5 $0.00007 $0.00071

Measured 8d ago against content hash 68c7aceba47c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

diagnose scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/diagnose/SKILL.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

Systematic debugging that produces evidence at every step — not guesswork, not shotgun fixes.

Process

Do NOT guess. Follow the loop. Every step produces evidence.

The Loop

1. REPRODUCE — make it fail on demand. If you can't reproduce, you can't fix.
2. MINIMISE — strip everything until only the bug remains. Smallest failing case.
3. HYPOTHESISE — ONE theory. Not three. One. State it clearly.
4. INSTRUMENT — add the ONE measurement that proves/disproves your hypothesis.
5. EVALUATE — run it. Was hypothesis correct?
   YES → go to step 6
   NO  → back to step 3 with new information
6. FIX — minimal change that addresses root cause (not symptoms)
7. REGRESSION TEST — write a test that would have caught this. Run it red then green.

Rules

  • Never skip REPRODUCE. "I think it fails when..." is not reproducing.
  • Never fix without a hypothesis. Shotgun debugging = wasted time.
  • One hypothesis at a time. Changing two things = you learn nothing.
  • The fix must address ROOT CAUSE. If you're fixing symptoms, you're not done.
  • The regression test must FAIL without the fix applied.

Anti-Patterns (stop yourself)

  • "Let me try adding a null check here" → NO. Where's your hypothesis? What evidence?
  • "It's probably a timing issue" → Probably? REPRODUCE it. PROVE it's timing.
  • "I'll add some console.logs" → WHICH log proves WHICH hypothesis? Be specific.
  • "Fixed! (without running the test)" → NO. Prove it. Run it. Evidence.

Common Mistakes

  • Changing two things at once — you learn nothing about which fixed it
  • "Probably" without evidence — reproduce it or it's speculation
  • Fixing symptoms (adding null checks) instead of root causes (why was it null?)
  • Declaring "fixed" without a regression test proving it

Example

Bug: "Login button sometimes doesn't respond"

1. REPRODUCE: Click login 20 times → fails on attempts 7, 14, 19 (pattern?)
2. MINIMISE: Remove all other UI. Just the button + handler. Still fails.
3. HYPOTHESISE: "Event listener is being attached multiple times on re-render"
4. INSTRUMENT: Add counter in useEffect → logs show 3 listeners after 3 renders
5. EVALUATE: Hypothesis confirmed. Missing cleanup in useEffect.
6. FIX: Add return () => btn.removeEventListener(...) in useEffect
7. REGRESSION TEST: test('login handler attaches exactly once after re-renders')

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 72 lines · 71 tokens per session scan A 68c7aceba47c

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository Adit-Jain-srm/skill-forge (2 stars, last pushed 2mo ago), licensed MIT. It adds 71 tokens to every session and 707 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

git-advanced-workflows

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

wshobson/agents · 54 tokens

systematic-debugging

A step-by-step method for finding the underlying cause of technical problems before changing code. It covers reading errors, reproducing failures, checking recent changes, and tracing data across system components.

jnMetaCode/superpowers-zh · 24 tokens

diagnose-backend-bug

Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…

QoderAI/better-harness · 87 tokens

debug-live

Guides root-cause investigations with debugging capabilities by setting breakpoints, starting a debug session, stepping through execution, inspecting variables, and tracing symptoms back to their origin. Prefer it for runtime bugs, failing tests, exceptions, crashes, hangs, wrong/null values, and unexpected output…

microsoft/DebugMCP · 84 tokens

mongodb-query-optimizer

Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query…

fcakyon/claude-codex-settings · 98 tokens

user-research-cookiy

End-to-end user research assistant — qualitative and quantitative. Use this skill whenever the user mentions user research, user interviews, discussion guides, interview guides, research plans, qualitative research, quantitative research, user surveys, survey design, usability studies, participant recruitment…

cookiy-ai/user-research-skill · 154 tokens