debug

debug is a skill for Claude Code from bromso/metapowers. It costs 52 tokens per session (540 once invoked), scanned A, original, MIT.

A systematic bug investigation that reproduces a problem, traces where the bad data or behaviour begins, tests one possible cause at a time, and fixes the underlying cause. It adds a regression test so the same bug can be detected later.

In plain words
What is it for?
Use it when you have an error message, failing behaviour, or other symptom to investigate and repair.
Why use it?
It replaces guesswork and symptom-only fixes with evidence about what went wrong. This makes the fix more likely to address the real problem.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the development plugin — 4 skills shipped together

Good fit Use it when you have an error message, failing behaviour, or other symptom to investigate and repair.

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

Made for: Claude Code.

Or install development, the plugin that ships this one along with the rest of its 4 skills.

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 debug

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/bromso/metapowers/debug"><img src="https://agentmods.dev/badge/skills/bromso/metapowers/debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 540 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.00052 $0.00540
Opus 5.5 $0.00021 $0.00216
Sonnet 5.5 $0.00010 $0.00108
Haiku 4.5 $0.00005 $0.00054

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

Security

Grade A, and why

debug 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 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.

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.

plugins/development/skills/debug/SKILL.md · 75 lines

What it actually says

Debug

Investigate and fix the issue described in "$ARGUMENTS" using systematic root cause analysis. No guessing — find the cause before attempting fixes.

Prerequisites

None — this is a utility skill that can run anytime a bug is encountered.

Process

Phase 1: Investigation

  1. Read error messages carefully:

    • Read the full error output, stack trace, and any warnings
    • Note file paths, line numbers, and error codes
    • Don't skip past errors — they often contain the solution
  2. Reproduce the issue:

    • Identify the exact steps to trigger the bug
    • Can it be triggered reliably?
    • If not reproducible, gather more data before proceeding
  3. Check recent changes:

    • What changed recently that could cause this? (git log, git diff)
    • New dependencies, config changes, environment differences?

Phase 2: Analysis

  1. Trace the data flow:

    • Where does the bad value originate?
    • Trace backward through the call stack to the source
    • Fix at the source, not at the symptom
  2. Find working examples:

    • Is there similar code that works correctly?
    • What's different between working and broken?

Phase 3: Hypothesis

  1. Form a single hypothesis:

    • State clearly: "I think X is the root cause because Y"
    • Be specific, not vague
  2. Test minimally:

    • Make the smallest possible change to test the hypothesis
    • One variable at a time
    • If it doesn't work, form a NEW hypothesis — don't pile fixes

Phase 4: Fix

  1. Write a failing test that reproduces the bug

  2. Implement the fix — address the root cause, not the symptom

  3. Verify:

    • The failing test now passes
    • No other tests broke
    • The original issue is resolved
  4. Commit the fix with a clear message explaining what was wrong and why

Output

Present findings to the user:

  • What the root cause was
  • What was changed to fix it
  • The commit hash
  • Any related issues discovered during investigation
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 · 75 lines · 52 tokens per session scan A 0a26e6dc4d47

Subscribe to this mod's changes

debug is a skill published in the GitHub repository bromso/metapowers (2 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 540 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-10-21.