Agent skill

Debug

by gnomeria in gnomeria/usbtree

Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix.

MITAuto-check passedDevelopment

Install Debug

skills CLI
$ npx skills add gnomeria/usbtree --skill debug -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gnomeria/usbtree debug --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gnomeria/usbtree.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/debug .claude/skills/debug && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
debug
GitHub stars
688
Token cost
~715 tokens
SKILL.md length
377 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix.

  • Works in 5 steps: Reproduce → Shrink search space → Root cause → …
  • The user reports a bug
  • SKILL.md covers Step 1 — Reproduce, Step 2 — Shrink search space, Step 3 — Root cause and Step 4 — Fix, plus 2 more sections
  • Calls git and cargo

What it does

Debug is an agent skill from gnomeria/usbtree. Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix. Use when the user reports a bug, an error, a crash, flaky behavior, "this doesn't work", "why is this failing", or pastes a stack trace or failing test output.

Its SKILL.md is about 720 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging, Root cause analysis and Failing and flaky tests. It works with Rust and Git. The repository describes itself as: Live USB device tree in your terminal. Rust TUI, no root, no libusb. Full activity metrics on Linux; device tree on macOS/Windows. The licence is MIT.

When your agent uses it

  • The user reports a bug
  • This doesnt work
  • Why is this failing
  • Pastes a stack trace

Example prompts

  • “this doesn”
  • “why is this failing”
  • “/debug”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Reproduce
  2. Shrink search space
  3. Root cause
  4. Fix
  5. Prove it

What it can do on your machine

Read from SKILL.md and the folder at commit 8ba6a5e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Debug loads about 715 tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 377 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~715

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gnomeria/usbtree at commit 8ba6a5e, republished under its MIT licence (© gnomeria). 377 words, ~715 tokens.

Download SKILL.mdSave it as .claude/skills/debug/SKILL.md (or your agent's skills folder).
name
debug
description
Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix. Use when the user reports a bug, an error, a crash, flaky behavior, "this doesn't work", "why is this failing", or pastes a stack trace or failing test output.

Debug

Find root cause before touching code. Fix without understood cause = guess wearing fix's clothes.

Step 1 — Reproduce

  • Deterministic repro first: failing test, --demo --dump diff, exact key sequence in TUI. Can't trigger = can't prove fixed.
  • Read actual error verbatim — full message, full backtrace (RUST_BACKTRACE=1). Answer often in the line the eye skips.
  • Capture repro as failing #[test] now when feasible — becomes regression test in Step 5 for free.
  • Flaky: loop it (while cargo test bad_test; do :; done or -- --test-threads=1 to expose ordering) — establish failure rate before changing anything.

Step 2 — Shrink search space

Cheapest checks first:

  1. Recent changes: git log --oneline -15, git diff HEAD~5 on touched area. Most bugs days old, not years. git bisect when known-good commit exists and repro is scriptable.
  2. Boundaries: bad value born here or delivered here? Probe at boundary (sysfs read in, nusb descriptor in, tree flatten out) to decide which side owns bug.
  3. Binary search: instrument midpoint, pick wrong half, repeat. No shotgunning ten prints — each probe answers one question.
  4. One assumption per probe: "this sysfs path exists", "this branch runs", "usb.ids actually loaded". Verify, don't assume.

Step 3 — Root cause

  • Ask "why" past first plausible answer. Symptom: panic on unwrap. Cause: field None. Root cause: scan skips devices without that descriptor. Fix the scan.
  • Fixing shared fn? Grep callers first. Bug can bite them too → fix belongs in shared path, not the one caller from the report.
  • State root cause in one sentence. Can't = haven't found it — back to Step 2.
Show full SKILL.md (123 more words)Show less

Step 4 — Fix

  • Smallest change removing root cause. No drive-by refactors (see refactor skill).
  • Real fix large + something bleeding? Guard + TODO acceptable — say it's mitigation, name real fix, don't call bug closed.

Step 5 — Prove it

  • Step 1 repro now passes. cargo test green. cargo clippy -- -D warnings clean.
  • Remove every temp probe/eprintln!.
  • Report: root cause (one sentence), fix, verification. Tests still fail → say so.

Rust probes

  • RUST_BACKTRACE=1 (or =full) on any panic.
  • cargo test bad_test -- --nocapture — isolate one test, see prints.
  • dbg!(expr) over println! — shows file:line + expression, greppable to remove.
  • TUI eats stdout: probe with eprintln! + 2>/tmp/probe.log, or drop to --dump path where prints are visible.
  • No hardware / weird topology: reproduce in --demo, or fake sysfs dir if bug is linux-path parsing.

© gnomeria, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/debug of gnomeria/usbtree.

Open the folder on GitHubat commit 8ba6a5e

Compare with similar skills

Debug next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Debug compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Debug this skillgnomeria/usbtree688—~715Automated safety check: PassMIT
Debugging and Error Recoveryaddyosmani/agent-skills102k1 repos~2.6kAutomated safety check: PassMIT
Investigateblueberrycongee/termcanvas406—~562Automated safety check: PassMIT
Regression Root Cause AnalyzerArabelaTso/Skills-4-SE253—~3.4kAutomated safety check: PassApache-2.0
TiDB Test Diff Triagepingcap/tidb41k—~498Automated safety check: PassApache-2.0
OpenLogi macOS Permissions TriageAprilNEA/OpenLogi23k—~2.5kAutomated safety check: NotesApache-2.0

Similar skills

  • Debugging and Error Recovery

    addyosmani/agent-skills

    Applies a stop-the-line rule and a step-by-step triage when tests fail, builds break or something stops working, aiming at the root cause instead of guesses.

    102k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed
  • Investigate

    blueberrycongee/termcanvas

    Systematic debugging skill. An agent skill from blueberrycongee/termcanvas.

    406 GitHub stars~562 tokensUpdated 4 mo ago
    DevelopmentAuto-check passed
  • Regression Root Cause Analyzer

    ArabelaTso/Skills-4-SE

    Locate root causes of failing regression tests by analyzing code changes, error messages, and test dependencies.

    253 GitHub stars~3.4k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Investigates TiDB plan or test-result diffs that the change does not explain, ruling out failpoint setup and merge effects before expected outputs are updated.

    41k GitHub stars~498 tokensUpdated today
    Testing & QAAuto-check passed
  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 3 days ago
    DevelopmentAuto-check: notes
  • Systematic Debugging

    ChrisWiles/claude-code-showcase

    Applies a four-phase debugging routine that finds the root cause of a bug or failing test before any fix is written.

    6.1k GitHub starsUsed in 3 repos~1.2k tokens
    DevelopmentAuto-check passed

More from gnomeria/usbtree

  • Knowledge Graph

    gnomeria/usbtree

    Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every…

    688 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • CI GitHub Actions

    gnomeria/usbtree

    GitHub Actions CI pipeline conventions — job shape, caching, permissions, and action pinning.

    688 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Refactor

    gnomeria/usbtree

    Behavior-preserving restructuring done safely — test net first, small verified steps, no mixed-in feature changes.

    688 GitHub stars~669 tokensUpdated 1 mo ago
    Auto-check passed
  • Write Tests

    gnomeria/usbtree

    Author tests that match the repo's stack and existing test style, at the cheapest level that catches the regression.

    688 GitHub stars~622 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Debug

What does Debug do?

Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix. Debug is an agent skill from gnomeria/usbtree. Systematic root-cause debugging — reproduce, isolate, fix at the source, prove the fix.

When should I use Debug?

Debug fits situations like: the user reports a bug; this doesnt work; why is this failing; pastes a stack trace.

How do I install Debug in Claude Code?

Run `npx skills add gnomeria/usbtree --skill debug -a claude-code`. Or copy the skill folder (.agents/skills/debug in gnomeria/usbtree) into .claude/skills/debug in your project. Claude Code loads it when a task matches its description.

How do I install Debug in Codex?

Run `npx skills add gnomeria/usbtree --skill debug -a codex`. Or copy the skill folder (.agents/skills/debug in gnomeria/usbtree) into .agents/skills/debug in your project. Codex loads it when a task matches its description.

Can I use Debug in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gnomeria/usbtree --skill debug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/debug, .gemini/skills/debug, .github/skills/debug and .opencode/skills/debug in your project.

What does Debug need to run?

Going by SKILL.md and its folder, Debug needs the command-line tools its instructions call (git and cargo).

Does Debug access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Debug safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Debug use?

Debug is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Debug use?

About 715 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Debug?

Skills that share tags, products or a category with Debug: Debugging and Error Recovery (addyosmani/agent-skills, 102k stars), Investigate (blueberrycongee/termcanvas, 406 stars), Regression Root Cause Analyzer (ArabelaTso/Skills-4-SE, 253 stars) and TiDB Test Diff Triage (pingcap/tidb, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Debug?

gnomeria (a GitHub user) maintains it in gnomeria/usbtree, which has 688 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on August 20, 2026.

Source: gnomeria/usbtree on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.