diagnose

diagnose is a skill for Claude Code from MCKRUZ/claude-code-sdlc. It costs 62 tokens per session (444 once invoked), scanned A, original, MIT.

A bug-fixing procedure that first reproduces a problem with a test, then applies a minimal fix and checks that the test passes.

In plain words
What is it for?
Use it for reported bugs: create a failing test, find the cause, fix it, run related tests, and keep the test to prevent the bug returning.
Why use it?
It prevents guessed fixes by showing the bug before code changes and proving that it is gone afterward.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the claude-code-sdlc plugin — 10 skills, 32 commands, 21 agents, 1 hook shipped together

Good fit Use it for reported bugs: create a failing test, find the cause, fix it, run related tests, and keep the test to prevent the bug returning.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mckruz/claude-code-sdlc/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 MCKRUZ/claude-code-sdlc --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/MCKRUZ/claude-code-sdlc

Made for: Claude Code.

Or install claude-code-sdlc, the plugin that ships this one along with the rest of its 10 skills, 32 commands, 21 agents, 1 hook.

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/mckruz/claude-code-sdlc/diagnose/github.svg)](https://agentmods.dev/skills/mckruz/claude-code-sdlc/diagnose)
Your own site
<a href="https://agentmods.dev/skills/mckruz/claude-code-sdlc/diagnose"><img src="https://agentmods.dev/badge/skills/mckruz/claude-code-sdlc/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/mckruz/claude-code-sdlc/diagnose"><img src="https://agentmods.dev/badge/skills/mckruz/claude-code-sdlc/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 444 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.00062 $0.00444
Opus 5.5 $0.00025 $0.00178
Sonnet 5.5 $0.00012 $0.00089
Haiku 4.5 $0.00006 $0.00044

Measured 3mo ago against content hash d4a6a6d563ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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.

harness/skills/diagnose/SKILL.md · 34 lines

What it actually says

Diagnose (bug-fix procedure)

A fix isn't done when the code changes — it's done when a test that failed because of the bug now passes. This procedure is mandatory for bug fixes; it makes the fix provable, not asserted.

Procedure

  1. Reproduce as a failing test FIRST. Write the smallest test that fails because of the bug, and watch it fail. Do not touch the production code yet. A bug you can't reproduce, you can't prove you fixed.
  2. Find the root cause. If it's obvious, name it. If it isn't, hand off to the debugger agent — it works in an isolated context, eliminates hypotheses, and returns the root cause + repro without burning your main context.
  3. Fix the cause, minimally. The smallest change that addresses the root cause — not the symptom, not a refactor the bug didn't require. If the real fix needs a gated path, stop and escalate (it's a new spec).
  4. Prove it. Run the failing test — it must now pass. Run the surrounding suite — nothing else went red. The Stop hook will block the turn on red tests anyway; beat it to the check.
  5. Guard against recurrence. Keep the reproducing test in the suite so the bug can't silently return; if the bug class is broad, add the obvious sibling cases.

Done when

  • A test existed that failed because of the bug, and now passes.
  • The fix is the minimal change at the root cause, inside the spec's bounds.
  • The full suite is green and the reproducing test is committed.
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. 3mo ago First seen · 34 lines · 62 tokens per session scan A d4a6a6d563ec

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository MCKRUZ/claude-code-sdlc (8 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 444 once invoked, about $0.0002 per session on Opus 5.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

diagnose compared with skills from other repositories

diagnose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagnoseMCKRUZ/claude-code-sdlcSkill81mo agoMITA62Claude Code
testinggarrytan/gbrainSkill34ktodayMITA63Claude Code
verifyYeachan-Heo/oh-my-claudecodeSkill41ktodayMITA12Claude Code
detect-static-dependenciesdotnet/skillsSkill6.4ktodayMITA135Claude Code
experiment-iterative-coderEvoScientist/EvoSkillsSkill492yesterdayApache-2.0A145Claude Code
dart-downstream-fixdartsim/dartSkill1.2k2d agoBSD-2-ClauseA25Claude Code
compiler-11897630FuRongJun-1999/dsh-memorySkill771todayMITA83Claude Code