diagnose

diagnose is a skill for Claude Code from jhlee0409/omni-harness-kit. It costs 77 tokens per session (408 once invoked), scanned A, original, MIT.

A step-by-step method for diagnosing difficult bugs or performance regressions. It reproduces the problem, reduces it to a minimal case, tests one hypothesis at a time, fixes the cause, and adds a regression test.

In plain words
What is it for?
Use it when code is broken, throwing errors, failing tests, or becoming slower. It guides reproduction, investigation, instrumentation, fixing, and verification.
Why use it?
It prevents guess-and-patch debugging and requires evidence that the problem is truly fixed. The regression test helps stop the same failure from returning.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the harness-kit plugin — 18 skills, 28 agents, 2 hooks shipped together

Good fit Use it when code is broken, throwing errors, failing tests, or becoming slower. It guides reproduction, investigation, instrumentation, fixing, and verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jhlee0409/omni-harness-kit/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 jhlee0409/omni-harness-kit --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/jhlee0409/omni-harness-kit

Made for: Claude Code.

Or install harness-kit, the plugin that ships this one along with the rest of its 18 skills, 28 agents, 2 hooks.

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/jhlee0409/omni-harness-kit/diagnose/github.svg)](https://agentmods.dev/skills/jhlee0409/omni-harness-kit/diagnose)
Your own site
<a href="https://agentmods.dev/skills/jhlee0409/omni-harness-kit/diagnose"><img src="https://agentmods.dev/badge/skills/jhlee0409/omni-harness-kit/diagnose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/jhlee0409/omni-harness-kit/diagnose"><img src="https://agentmods.dev/badge/skills/jhlee0409/omni-harness-kit/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 408 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.00077 $0.00408
Opus 5 $0.00039 $0.00204
Sonnet 5 $0.00015 $0.00082
Haiku 4.5 $0.00008 $0.00041

Measured 12d ago against content hash b4a1f3c65cee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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 · 36 lines

What it actually says

diagnose

Don't guess-and-patch. Find the real cause, then fix it.

Loop

  1. Reproduce — get a reliable, minimal repro. A bug you can't reproduce, you can't confirm you fixed. Capture the exact failing command + output.
  2. Minimize — strip the repro to the smallest input / path that still fails. The minimal case usually names the cause.
  3. Hypothesize — state ONE falsifiable hypothesis ("X is null because Y returns early when Z"), not a vibe — a claim a check can disprove.
  4. Instrument — add the cheapest probe (a log, an assert, a breakpoint) that confirms or kills the hypothesis. Let evidence decide, not intuition. Killed → back to step 3.
  5. Fix the cause, not the symptom. A narrow patch that hides the symptom while the cause remains is a stopgap — label it as one if you must ship it.
  6. Regression-test — write a test that fails before the fix and passes after, so the bug can't silently return.

Discipline

  • Verify against the REAL system (a real query / real run), never inferred from code alone.
  • One hypothesis at a time; record what you ruled out.
  • "Looks fixed" is not fixed — the regression test (red → green) is the proof.
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. 12d ago First seen · 36 lines · 77 tokens per session scan A b4a1f3c65cee

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository jhlee0409/omni-harness-kit (2 stars, last pushed 1mo ago), licensed MIT. It adds 77 tokens to every session and 408 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

javascriptcore-garbage-collector

JSC GC reference for Bun. Use for use-after-free, JS object leaks, "collected too early", or when touching WriteBarrier, visitChildren, visitAdditionalChildren, JSRef, JSC::Strong/Weak, hasPendingActivity, ensureStillAlive, addOpaqueRoot, reportExtraMemoryAllocated, IsoSubspace, HeapAnalyzer, finalize.

twaldin/hone · 80 tokens

diagnosing-bugs

Diagnosis loop for hard bugs and performance regressions. Builds a red-capable feedback loop and runs it before hypothesising — complements static code review (which finds bugs by reading) by running actual repros. Use when the user says 'diagnose'/'debug this', or reports something broken/throwing/failing/slow.

gtapps/claude-code-hermit · 72 tokens

ralphctl-debugging-and-error-recovery

Systematic root-cause debugging. Use when tests fail, builds break, or behaviour does not match expectations. Follow stop-the-line → reproduce → localize → reduce → root-cause → guard-with-regression-test → verify, not guessing; the reproduction and regression steps follow the same red-green discipline as…

lukas-grigis/ralphctl · 78 tokens

fix-bug

Run the Fix Validation pipeline to investigate, fix, and validate a bug. Ensures deterministic pipeline execution with IssueAnalyzer, FixWriter, TestWriter (conditional), TestAudit (conditional), and FixValidator stages.

QBall-Inc/the-bulwark · 46 tokens

debugging-workflows

Systematic troubleshooting for Falcon Foundry CLI errors, manifest validation failures, deploy failures, artifact runtime errors, and development server issues. TRIGGER when user encounters CLI errors, foundry ui run not working, deploy failures, authentication issues, function execution failures, "debug my function"…

CrowdStrike/foundry-skills · 90 tokens

ccc-systematic-debugging

Root-cause debugging via the Iron Law: no fix without confirmed root cause. Reproduce → hypothesize → verify → fix. Use when investigating bugs, test failures, or…

KevinZai/commander · 42 tokens