diagnosing-bugs

diagnosing-bugs is a skill for Claude Code, Codex from tozhax/plumbwork. It costs 89 tokens per session (2,938 once invoked), scanned B, original, MIT.

A step-by-step method for finding the real cause of bugs, regressions, and failing or flaky tests before changing code. It first separates code problems from environment, tools, and outside services.

In plain words
What is it for?
Use it to investigate defects, performance slowdowns, regressions, and unreliable tests by searching logs and code, forming a testable explanation, and verifying the result.
Why use it?
It prevents guesswork and fixes that only hide symptoms. It establishes a repeatable way to reproduce the problem and check whether a fix worked.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md; mentions Gemini CLI.

Good fit Use it to investigate defects, performance slowdowns, regressions, and unreliable tests by searching logs and code, forming a testable explanation, and verifying the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tozhax/plumbwork/diagnosing-bugs
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 tozhax/plumbwork --skill diagnosing-bugs
Clone the repo
git clone --depth 1 https://github.com/tozhax/plumbwork

Made for: Claude Code, Codex.

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 diagnosing-bugs

README.md
[![agentmods](https://agentmods.dev/badge/skills/tozhax/plumbwork/diagnosing-bugs/github.svg)](https://agentmods.dev/skills/tozhax/plumbwork/diagnosing-bugs)
Your own site
<a href="https://agentmods.dev/skills/tozhax/plumbwork/diagnosing-bugs"><img src="https://agentmods.dev/badge/skills/tozhax/plumbwork/diagnosing-bugs/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 diagnosing-bugs

Your own site · 80×15
<a href="https://agentmods.dev/skills/tozhax/plumbwork/diagnosing-bugs"><img src="https://agentmods.dev/badge/skills/tozhax/plumbwork/diagnosing-bugs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,938 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00089 $0.02938
Opus 5.5 $0.00036 $0.01175
Sonnet 5.5 $0.00018 $0.00588
Haiku 4.5 $0.00009 $0.00294

Measured 2d ago against content hash 5868e2e49dc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

diagnosing-bugs scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

* Formulate a single, deterministic command, script, or test case that triggers the failure reliably. Where a test can express the defect, that test is the loop: it becomes the regression test of Phase 5, failing (RED) n
skills/diagnosing-bugs/SKILL.md · 105 lines

How it starts

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

Diagnosing Bugs & Root-Cause Analysis

Use this skill whenever investigating, reproducing, or fixing defects, regressions, or failing or flaky tests in any codebase.

Proportion (Tier 1 Fast Path): A defect already reproduced by a failing command with an obvious single-line root cause (Tier 1) may merge Phases 2 through 4 into one stated hypothesis and its verification check; Phases 0, 1, 5, 6, and (when triggered by Rule 10) 7 always run.

Zero-Speculation Rule

NEVER propose speculative fixes, wrap code in superficial try/catch blocks, or modify code based on guessing before establishing a deterministic feedback loop that proves the defect.

Context Hygiene & Think in Code

  • Computational Scanning: When debugging across multiple logs or source files, do not read entire files one by one into conversation context. Execute targeted shell one-liners (run_command via Bash, Python, grep, awk, jq), structural dataflow queries (plumb-guard code-map callers <symbol>, plumb-guard code-map flow <symbol>; or python3 ~/.local/share/plumbwork/runtime/scripts/code_map.py), or ranked log searches (plumb-guard code-map fts-search "<query>" <paths...>) to filter and pull only focal defect lines.
  • Output Filtering: Use runner flags (--silent, -q, --tb=short) to suppress passing test chatter, but never pipe failing test or compiler output through head or tail (if a failure trace exceeds 500 lines, route it to build-error-resolver per GEMINI.md Rule 11, or redirect to a scratch file and read the complete failing block).
  • Accuracy Priority: Failing test logs, stack traces, and compiler error output must never be artificially synthesized or truncated; preserve exact failure text.

The Seven-Phase Investigation Discipline

Phase 0: Classify the Failure (before touching any source)

Label the failure with one or more of: CODE (application logic is wrong), ENVIRONMENT (tool/runtime/path/dependency/configuration), TOOL (an agent tool call failed, timed out or was rejected), EXTERNAL (a remote service or network endpoint), UNKNOWN (evidence is insufficient: reproduce and gather traces before changing anything). A failure can carry several labels (code that relies on an Application Programming Interface (API) the installed runtime lacks is CODE + ENVIRONMENT): fix each part where it lives. Never modify working application code to get around an environment, tool or external failure.

Read the full file on GitHub · 105 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. 2d ago First seen · 105 lines · 89 tokens per session scan B 5868e2e49dc6

Subscribe to this mod's changes

diagnosing-bugs is a skill published in the GitHub repository tozhax/plumbwork (33 stars, last pushed 2d ago), licensed MIT. It adds 89 tokens to every session and 2,938 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-02.

Related

diagnosing-bugs compared with skills from other repositories

diagnosing-bugs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagnosing-bugstozhax/plumbworkSkill332d agoMITB89Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9kyesterdayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill343yesterdayApache-2.0A112Claude Code
performance-verificationvalkor-ai/loomSkill1.6k2d agoApache-2.0A45Claude Code, Codex
loop-engineeringhuytieu/COG-second-brainSkill1.6kyesterdayMITA63Claude Code