bug-root-cause-finder

bug-root-cause-finder is a skill for Claude Code from dykyi-roman/awesome-claude-code. It costs 36 tokens per session (2,138 once invoked), scanned A, original, MIT.

A set of methods for tracing a PHP bug back to its underlying cause instead of stopping at the error location.

In plain words
What is it for?
Use it with five whys, fault-tree analysis, git bisect, and stack-trace reading to investigate PHP bugs.
Why use it?
It helps separate the symptom users see from the earlier failure that caused it, reducing guesswork during debugging.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook shipped together

Good fit Use it with five whys, fault-tree analysis, git bisect, and stack-trace reading to investigate PHP bugs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder
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 dykyi-roman/awesome-claude-code --skill bug-root-cause-finder
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Made for: Claude Code.

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 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 bug-root-cause-finder

README.md
[![agentmods](https://agentmods.dev/badge/skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder/github.svg)](https://agentmods.dev/skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder)
Your own site
<a href="https://agentmods.dev/skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder"><img src="https://agentmods.dev/badge/skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder/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 bug-root-cause-finder

Your own site · 80×15
<a href="https://agentmods.dev/skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder"><img src="https://agentmods.dev/badge/skills/dykyi-roman/awesome-claude-code/bug-root-cause-finder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,138 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00036 $0.02138
Opus 5 $0.00018 $0.01069
Sonnet 5 $0.00007 $0.00428
Haiku 4.5 $0.00004 $0.00214

Measured 7d ago against content hash 5bc8fbe5f2fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

bug-root-cause-finder 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 7d 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/bug-root-cause-finder/SKILL.md · 316 lines

How it starts

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

Bug Root Cause Finder

Systematic methods for finding the true source of bugs, not just symptoms.

Core Principle: Symptom ≠ Cause

The location where an error manifests is rarely where the bug originates.

Error Location:     OrderController::show() - NullPointerException
Symptom Location:   OrderRepository::find() - returns null
Root Cause:         OrderCreatedHandler - failed to persist order
True Root Cause:    RabbitMQ message lost due to missing ACK

Method 1: 5 Whys Technique

Ask "why" repeatedly until you reach the root cause.

Example Analysis

Bug: "Customer sees wrong order total"

  1. Why? → The total displayed is $0
  2. Why?Order::getTotal() returns 0
  3. Why?OrderItem collection is empty
  4. Why? → Items weren't loaded from database
  5. Why? → Lazy loading failed due to closed EntityManager

Root Cause: EntityManager closed before accessing lazy-loaded collection

Fix: Eager load items in repository query, not lazy load

5 Whys Template

## 5 Whys Analysis

**Bug Description:** [What user sees]

1. Why does [symptom] occur?
   → [First-level cause]

2. Why does [first-level cause] happen?
   → [Second-level cause]

3. Why does [second-level cause] happen?
   → [Third-level cause]

4. Why does [third-level cause] happen?
   → [Fourth-level cause]

5. Why does [fourth-level cause] happen?
   → [ROOT CAUSE]

**Fix Location:** [File:line where fix should be applied]
**Fix Type:** [Category: logic/null/boundary/race/resource/exception/type/sql/infinite]

Method 2: Fault Tree Analysis

Build a tree of all possible causes for a failure.

Fault Tree Structure

[FAILURE: Order total is $0]
        │
        ├── [OR] Order has no items
        │       ├── [AND] Items not added during creation
        │       │       ├── Cart was empty
        │       │       └── Cart-to-Order mapping failed
        │       │
        │       └── [AND] Items were deleted
        │               ├── Cascade delete triggered
        │               └── Manual deletion bug
        │
        └── [OR] Items exist but total calculation wrong
                ├── Price is 0
                │       ├── Product price not set
                │       └── Currency conversion failed
                │
                └── Quantity is 0
                        ├── Validation missing
                        └── Type coercion (string "0")

Read the full file on GitHub · 316 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. 7d ago First seen · 316 lines · 36 tokens per session scan A 5bc8fbe5f2fe

Subscribe to this mod's changes

bug-root-cause-finder is a skill published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 25d ago), licensed MIT. It adds 36 tokens to every session and 2,138 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

sentry-php-sdk

Full Sentry SDK setup for PHP. Use when asked to "add Sentry to PHP", "install sentry/sentry", "setup Sentry in PHP", or configure error monitoring, tracing, profiling, logging, metrics, crons, or AI monitoring for PHP applications. Supports plain PHP, Laravel, and Symfony.

getsentry/sentry-for-ai · 71 tokens

php-quality-tooling

Use when setting up PHPStan, Rector, or PHP-CS-Fixer on a non-Laravel PHP project, incl. CI wiring. Do NOT use for Laravel (Pint/Larastan), tests, or syntax.

fusengine/agents · 51 tokens

phpstan-fixer

Fix PHPStan static analysis errors by adding type annotations and PHPDocs. Use when encountering PHPStan errors, type mismatches, missing type hints, or static analysis failures. Never ignores errors without user approval.

marcelorodrigo/agent-skills · 46 tokens

wp-phpstan-static-analysis

Run PHPStan static analysis on a WordPress plugin or theme using szepeviktor/phpstan-wordpress. Covers the composer dev-dependencies and what is pulled transitively (phpstan/phpstan ^2.0, php-stubs/wordpress-stubs), the optional phpstan/extension-installer that auto-registers the extension, the phpstan.neon.dist…

Lonsdale201/wp-agent-skills · 227 tokens

wp-phpstan

Use when configuring, running, or fixing PHPStan static analysis in WordPress projects (plugins/themes/sites): phpstan.neon setup, baselines, WordPress-specific typing, and handling third-party plugin classes.

WordPress/agent-skills · 47 tokens

benchmark-optimization-loop

Use when a goal is vague speed ("make it faster", "reduce p95", "cut query time") and you need a bounded, measured loop that promotes only verified, correctness-preserving wins instead of guessed micro-tweaks.

pekral/cursor-rules · 52 tokens