debugging

debugging is a skill for Claude Code from nasrulhazim/claude. It costs 267 tokens per session (2,969 once invoked), scanned A, original, MIT.

A structured debugging guide for Laravel and PHP projects that moves from reproducing a failure to locating its cause, fixing it, and adding a regression test. A regression test checks that a fixed bug does not return.

In plain words
What is it for?
Use it to triage errors, create small reproducers, find the commit that introduced a regression, investigate flaky tests, and add tests that protect the fix.
Why use it?
It separates symptoms from root causes and provides a repeatable way to investigate exceptions, flaky tests, regressions, and environment-specific failures.

Skill for Claude Code

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is git bisect run ./vendor/bin/pest --filter=OrderTotalTest.

Part of the claude-toolkit plugin — 41 skills, 12 commands, 23 agents shipped together

Good fit Use it to triage errors, create small reproducers, find the commit that introduced a regression, investigate flaky tests, and add tests that protect the fix.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nasrulhazim/claude
agentmods
npx agentmods add skills/nasrulhazim/claude/debugging

Made for: Claude Code.

Or install claude-toolkit, the plugin that ships this one along with the rest of its 41 skills, 12 commands, 23 agents.

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 debugging

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nasrulhazim/claude/debugging"><img src="https://agentmods.dev/badge/skills/nasrulhazim/claude/debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 267 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,969 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.00267 $0.02969
Opus 5.5 $0.00107 $0.01188
Sonnet 5.5 $0.00053 $0.00594
Haiku 4.5 $0.00027 $0.00297

Measured 1mo ago against content hash f8c36383c82b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debugging 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 1mo 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/debugging/SKILL.md · 271 lines

How it starts

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

Debugging and Error Recovery

A bug report names a symptom. Your job is the cause. The gap between them is where most wasted debugging time lives — patching the path the ticket names, while every sibling caller stays broken.

Command Reference

Command Description
/debug triage Run the five-step triage on a reported failure
/debug reproduce Build the smallest reliable reproducer
/debug bisect Find the commit that introduced a regression
/debug flaky Diagnose a test that passes and fails without code changes
/debug guard Write the regression test that locks the fix in

When to Use

  • Something throws, returns the wrong value, or silently does nothing
  • A test is flaky — passes alone, fails in the suite, or fails one run in ten
  • Behaviour differs between local, staging and production
  • A regression appeared and nobody knows which change caused it
  • An exception's message and its actual cause do not match
  • A queued job, scheduled command or event listener never runs

Do not use this skill to add features, refactor, or "clean up while I'm in here". A debug session ends when the bug is fixed and guarded, not when the file looks nicer.


The Five-Step Triage

Never skip a step. Steps 1 and 2 are where the answer actually is; steps 3–5 are mechanical.

Step 1: Reproduce

You have not started debugging until the failure happens on demand.

  • Get the exact input: the request payload, the user, the tenant, the record ID, the time
  • Reproduce it in the cheapest environment that still fails — a Pest test beats tinker, tinker beats clicking through the UI
  • If it only fails in production, capture the difference: php artisan about, the .env keys that differ, the queue/cache drivers, the PHP version, the data volume
php artisan tinker --execute="dd(App\Models\Order::find(1234)->total());"

If you cannot reproduce it, say so plainly and stop. A fix for a bug you never saw fail is a guess wearing a diff.

Read the full file on GitHub · 271 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 271 lines · 267 tokens per session scan A f8c36383c82b

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository nasrulhazim/claude (25 stars, last pushed yesterday), licensed MIT. It adds 267 tokens to every session and 2,969 once invoked, about $0.0011 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-09-04.