debug-bug

debug-bug is a skill for Claude Code, Codex from edimuj/tokenlean. It costs 57 tokens per session (623 once invoked), scanned A, original, MIT.

A step-by-step bug-fixing workflow that reproduces a problem, finds where it starts, follows the relevant code path, applies a small fix, and checks the result.

In plain words
What is it for?
Use it to investigate errors, debug unexpected behavior, and verify that a bug fix does not break related code.
Why use it?
It prevents guessing at fixes and limits how much code must be read before identifying the cause.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate errors, debug unexpected behavior, and verify that a bug fix does not break related code.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/edimuj/tokenlean/debug-bug"><img src="https://agentmods.dev/badge/skills/edimuj/tokenlean/debug-bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 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.00057 $0.00623
Opus 5.5 $0.00023 $0.00249
Sonnet 5.5 $0.00011 $0.00125
Haiku 4.5 $0.00006 $0.00062

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

Security

Grade A, and why

debug-bug 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/claude/debug-bug/SKILL.md · 82 lines

How it starts

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

Debug Bug

Systematically find and fix bugs while reading as little code as possible.

Workflow

Reproduce → Localize → Trace → Fix → Verify

1. Reproduce

tl run "<repro command>"   # Capture the actual error output

No fix without reproduction. If no repro command is given, ask for one. If the bug is in tests, run the failing test. This step is non-negotiable.

2. Localize

Narrow down where the bug lives:

tl parallel \
  "errors=tl errors" \
  "blame=tl blame <file>" \
  "history=tl history <file>"

If the error includes a stack trace, start with the top frame. If it's vague, use tl search "<error message>" to find where the error originates.

3. Trace

Understand the code path without reading entire files:

tl parallel \
  "flow=tl flow <function> <file>" \
  "deps=tl deps <file>" \
  "snippet=tl snippet <function> <file>"

4. Fix

Apply the minimal fix. Then check for side effects:

tl parallel "guard=tl guard" "impact=tl impact <file>"

5. Verify

tl parallel "repro=tl run '<repro command>'" "tests=tl run '<test command>'"

Decision tree

Bug report → Can you reproduce it?
  ├─ Yes → What layer does the error come from?
  │   ├─ Stack trace points to a file → tl blame + tl snippet on that file
  │   ├─ Error is vague / no stack → tl errors + tl search for the error message
  │   └─ Happening in dependency → tl deps to confirm, check dep version
  ├─ No → Ask for reproduction steps before proceeding
  └─ Intermittent → tl history on suspect files, look for recent changes

Tips

  • Use tl parallel to run context-gathering commands simultaneously
  • Use tl search "<error message>" to find where errors are thrown
  • Check tl diff for recent regressions — the bug may be in the last few commits
  • If a file is under 150 lines, just read it directly — tokenlean overhead isn't worth it
  • After fixing, run tl impact to ensure dependents aren't affected by the change

Read the full file on GitHub · 82 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. 1mo ago First seen · 82 lines · 57 tokens per session scan A 1e0a4f956016

Subscribe to this mod's changes

debug-bug is a skill published in the GitHub repository edimuj/tokenlean (13 stars, last pushed 3mo ago), licensed MIT. It adds 57 tokens to every session and 623 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-30.

Related

Other skills, from other repositories

wireshark-analysis

This skill should be used when the user asks to "analyze network traffic with Wireshark", "capture packets for troubleshooting", "filter PCAP files", "follow TCP/UDP streams", "detect network anomalies", "investigate suspicious traffic", or "perform protocol analysis". It provides comprehensive techniques for network…

zebbern/claude-code-guide · 79 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

vs-search-tuning-partial-case

Use when the user provides 1-50 concrete bad-case search queries for one Viking Search app and wants local deterministic fixes. This skill only verifies request-level fine-operation interventions against a read-only baseline scene and delivers a console-ready configuration sheet, validated payloads, and a replay…

volcengine/SearchCLI · 85 tokens

vs-search

Search runtime and scene management: verify queries, inspect scenes, debug app readiness, and diagnose recall or scene-config issues.

volcengine/SearchCLI · 27 tokens

weed

Weed the Allium garden. Find where Allium specifications and implementation code have diverged, and help resolve the divergences. Use when the user wants to check spec-code alignment, compare specs against implementation, audit for spec drift or violations, sync specs with code or code with specs, or verify whether…

juxt/allium · 71 tokens

graph-it-live

Analyze code dependencies, call graphs, and architecture using the graph-it CLI. Use this skill whenever the user wants to understand how their code is connected — even if they don't say "dependency graph" explicitly. Trigger for: "what calls this function", "who uses this class", "is it safe to delete X", "what…

magic5644/Graph-It-Live · 165 tokens