udebug
Use on any bug, test failure, or unexpected behavior before proposing a fix.
Skill by btseytlin
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/btseytlin-udebug
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/udebug
What's inside
- Skill name
udebug- Description
- Use on any bug, test failure, or unexpected behavior before proposing a fix. Enforces four-phase root-cause investigation — reproduce, pattern-match, hypothesize, fix — with a hard rule against symptom patches.
- License
- WTFPL
- Instructions
- 110 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Debug
Reproduce the failure before claiming a fix. A controlled repair experiment may establish the cause of an uncertain numerical or learning failure.
## When to invoke
Any technical issue: test failure, production bug, unexpected behavior, performance regression, build break, integration failure. Especially when:
- Under time pressure (makes guessing tempting)
- You already tried 1+ fixes
- The problem "seems simple" (simple-looking bugs still have root causes)
## Phase 1 — Reproduce the problem and trace the data
You cannot fix what you cannot observe. Start by making the bug happen on demand, then follow the bad value back to where it came from.
<required>
1. Read the error completely — stack trace, file, line, error codes. No skimming.
2. Reproduce it — exact steps. Every time? Sometimes? If you can't reproduce: gather more data, don't guess.
3. Check recent changes — `git diff`, recent commits, new deps, config drift, env differences.
4. Instrument component boundaries (multi-component systems) — log what enters and exits each boundary, run once to see *where* it breaks before deciding *what* to fix.
5. Trace data flow backward — where does the bad value originate? What called this with the bad value? Keep tracing up until you find the source. Fix at source, not symptom.
</required>
## Phase 2 — Pattern analysis against a working example
Bugs rarely occur in isolation. Find similar code that works, understand *why* it works, then enumerate every difference.
<required>
1. Find working examples in the same codebase. What works that's similar?
2. Read reference implementations completely — don't skim, don't adapt something you didn't fully understand.
3. List every difference between working and broken. Don't assume "that can't matter."
4. Enumerate dependencies and assumptions — configs, env vars, adjacent components.
</required>
## Phase 3 — Single hypothesis, minimal test
One cause at a time. Stacked guesses turn fixes into guesses about guesses.
<required>
1. Form a single hypothesis. Write it: "I think X is the root cause because Y."
2. Isolate variables when distinguishing explanations. A complete repair may change coupled components. Compare it against the existing method under matched conditions.
3. Verify or discard. Confirmed → Phase 4. Not confirmed → new hypothesis.
4. If you don't know, say so. Research, ask. Don't pretend.
</required>
## Phase 4 — Implement one fix, verify, stop at three failed attempts
Use the reproduced failure and controlled experiments to select a coherent repair.
<required>
1. Create a failing reproduction — automated test if possible; one-off script in `tmp/` otherwise. Must fail *now*.
2. Implement the coherent repair within the requested scope. Test its known remaining failure mode before building extensive verification around it. A smaller diff is not better if it retains that failure. No "while I'm here" refactors.
3. Verify — reproduction passes; nothing else broke.
4. If three fixes have failed, stop. This is an architecture problem, not a hypothesis problem. Discuss with the user before a fourth attempt.
</required>
## Condition-based waiting — never use `sleep(N)` for timing bugs
A sleep that "seems long enough" is a bomb on a fuse. Poll for the actual condition with a bounded timeout:
```python
deadline = time.time() + timeout
while time.time() < deadline:
if condition():
break
time.sleep(0.1)
else:
raise TimeoutError(f"condition not met in {timeout}s")
```
## Defense in depth — validate one or two layers past the fix
Once the root cause is fixed, add validation at the next layer so the same class of bug can't re-enter silently:
- Validate inputs at component boundaries
- Crash loudly on contract violations
- Log state transitions in long-running processes
Don't scatter defensive code everywhere. One or two layers past the fix is enough.
## Anti-whack-a-mole — find the pattern before closing
Before marking the fix done, name the failure pattern and check the relevant code for the same cause. Fix matches only when they belong to the approved request. Report unrelated matches without editing them. A small fix is not permission to expand scope.
## Red flags — STOP, return to Phase 1
<system-reminder>
These thoughts mean you're about to patch a symptom:
- "Quick fix for now, investigate later"
- "Just try changing X and see if it works"
- "It's probably X, let me fix that"
- "Pattern says X but I'll adapt it differently"
- Proposing solutions before tracing data flow
- "One more attempt" when 2+ have already failed
</system-reminder>
## When root cause really is environmental
After systematic investigation, if the issue is timing, external, or truly non-deterministic:
- Document what you investigated
- Implement appropriate handling (retry, timeout with condition polling, loud error)
- Add logging / monitoring for future occurrences
But most "no root cause" verdicts are incomplete investigations. Double-check before settling for this.
## Terminal state
Fix verified with reproduction → return to `up:uverify` if in a task workflow, or commit and move on.From btseytlin/ultrapack, WTFPL.
More from btseytlin/ultrapack
- 0.658score
uverify
btseytlin
Use after execute to attack the change and demonstrate how it's broken.
SkillAFreshness: A★ 46Claude Code +9 - 0.658score
uexecute
btseytlin
Use to implement an approved plan.
SkillAFreshness: A★ 46Claude Code +9 - 0.658score
expand
btseytlin
Turn one user criticism into a principle-level fix: find the violated principle, every similar occurrence, and fix the shared cause.
SkillAFreshness: A★ 46Claude Code +9 - 0.658score
make
btseytlin
Orchestrate the full Ultrapack workflow in Codex and Pi: create or resume a task file, design, plan, execute, verify, review, and validate the observable goal.
SkillAFreshness: A★ 46Claude Code +9 - 0.655score
udesign
btseytlin
Use before any creative work — features, components, behavior changes.
SkillAFreshness: A★ 46Claude Code +9 - 0.618score
git-worktrees
btseytlin
Use when a task needs an isolated checkout.
SkillBFreshness: B★ 46Claude Code +9 - 0.618score
handsoff
btseytlin
Contract for hands-off mode — the ultrapack workflow variant that minimizes user prompts after Design, takes the safest reversible path, and logs every…
SkillBFreshness: B★ 46Claude Code +9 - 0.618score
udocument
btseytlin
Use when writing or editing documentation — project docs, CLAUDE.md, READMEs, SKILL.md, docstrings, inline comments.
SkillBFreshness: B★ 46Claude Code +9 - 0.618score
ureview
btseytlin
Use after verify passes for the future maintainer's audit — sit in the chair of the person who'll touch this code in 3-6 months and ask "what will bite us…
SkillBFreshness: B★ 46Claude Code +9 - 0.618score
attack-loop
btseytlin
Run a bounded implement-attack-repair loop for a user-specified task.
SkillBFreshness: B★ 46Claude Code +9 - 0.618score
qplan
btseytlin
Quickly design and plan, wait for plan approval, then execute sequential phases with focused verification and a manual try.
SkillBFreshness: B★ 46Claude Code +9 - 0.615score
uplan
btseytlin
Use after design to turn a validated spec into a lean implementation plan.
SkillBFreshness: B★ 46Claude Code +9
Signals
- Stars
- 46
- Forks
- 12
- Open issues
- 1
- Last commit (this folder)
- Sep 13, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- WTFPL
- Repository
- github.com/btseytlin/ultrapack
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from btseytlin
- 0.658score
uexecute
btseytlin
Use to implement an approved plan.
SkillAFreshness: A★ 46Claude Code +9 - 0.658score
expand
btseytlin
Turn one user criticism into a principle-level fix: find the violated principle, every similar occurrence, and fix the shared cause.
SkillAFreshness: A★ 46Claude Code +9 - 0.658score
make
btseytlin
Orchestrate the full Ultrapack workflow in Codex and Pi: create or resume a task file, design, plan, execute, verify, review, and validate the observable goal.
SkillAFreshness: A★ 46Claude Code +9 - 0.658score
uverify
btseytlin
Use after execute to attack the change and demonstrate how it's broken.
SkillAFreshness: A★ 46Claude Code +9 - 0.655score
udesign
btseytlin
Use before any creative work — features, components, behavior changes.
SkillAFreshness: A★ 46Claude Code +9 - 0.618score
handsoff
btseytlin
Contract for hands-off mode — the ultrapack workflow variant that minimizes user prompts after Design, takes the safest reversible path, and logs every…
SkillBFreshness: B★ 46Claude Code +9
Cite this page
udebug skill. Agent Mart. https://agentmart.dev/skills/btseytlin-udebug (last updated 2026-10-24)