debug

A step-by-step method for finding the cause of a bug, meaning code that runs but produces the wrong result. It uses reproduction, one hypothesis at a time, a failing test, and verification after the fix.

In plain words
What is it for?
Use it when a test fails or running code behaves incorrectly, including reproducing the issue and checking that other tests still pass.
Why use it?
It avoids random changes that can hide the real cause or make it unclear which change solved the problem.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/michaelycjo/specseal/debug
Any agent
npx skills add MichaelYcJo/SpecSeal --skill debug
Clone the repo
git clone --depth 1 https://github.com/MichaelYcJo/SpecSeal

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 433 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00077 $0.00433
Opus 5 $0.00039 $0.00217
Sonnet 5 $0.00015 $0.00087
Haiku 4.5 $0.00008 $0.00043

Measured yesterday against content hash 582acdb244ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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/debug/SKILL.md · 55 lines

What it actually says

debug — one hypothesis at a time, and a failing test before the fix

The code runs and produces the wrong answer, which means it can be reproduced — and a bug you cannot reproduce is a bug you cannot claim to have fixed. Changing several things at once destroys the only signal you have: which change mattered.

Phase 1: Understand (before touching code)

  • Read the FULL error message and stack trace
  • Reproduce the issue (write a failing test if possible)
  • Check recent changes that might have caused it
  • Collect evidence: logs, error output, state

Phase 2: Locate

  • Find working examples of similar code in the codebase
  • Compare working vs broken - what's different?
  • Binary search: narrow down the problem area
  • Check inputs and outputs at each boundary

Phase 3: Hypothesize

  • Form ONE hypothesis at a time
  • Design minimal test to confirm/deny
  • If denied → new hypothesis (don't patch the old one)

Phase 4: Fix

  • Write a failing test that reproduces the bug
  • Make the minimal change to fix it
  • Verify: failing test now passes
  • Verify: no other tests broke

Rules

  • Never guess-and-check randomly. Be systematic.
  • One change at a time. Verify after each.
  • If 3 fix attempts fail → STOP (3+ Fix Rule). The problem may be architectural.
  • Document what you tried and what you learned.

Output Format

Bug: [description]
Root cause: [why it happens]
Fix: [what was changed]
Test: [how it's verified]
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. yesterday First seen · 55 lines · 77 tokens per session scan A 582acdb244ae

Subscribe to this mod's changes

debug is a skill published in the GitHub repository MichaelYcJo/SpecSeal (1 stars, last pushed 2d ago), licensed MIT. It adds 77 tokens to every session and 433 once invoked, about $0.0004 per session on Opus 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-31.

Related

Other skills, from other repositories

gsd-audit-milestone

Audit milestone completion against original intent before archiving.

open-gsd/gsd-core · 17 tokens

spec-kitty-charter-doctrine

Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…

Priivacy-ai/spec-kitty · 135 tokens

spec-kitty-spdd-reasons

Drive REASONS Canvas authoring and review for Spec Kitty missions that opted in to Structured-Prompt-Driven Development (SPDD) via charter selection. Triggers: "use SPDD", "use REASONS", "generate a REASONS canvas", "apply structured prompt driven development", "make this mission SPDD". Does NOT handle: enforcing SPDD…

Priivacy-ai/spec-kitty · 118 tokens

conductor-implement

Executes the tasks defined in the specified track's plan. Use this to start or continue working on a feature, bug fix, or chore.

gemini-cli-extensions/conductor · 34 tokens

spec-kitty-runtime-review

Review runtime-owned outputs using the Spec Kitty review workflow surface, then direct approval or rejection with structured feedback. Triggers: "review this work package", "check runtime output", "approve this step", "review WP", "is this WP ready to approve", "check this implementation". Does NOT handle: setup-only…

Priivacy-ai/spec-kitty · 85 tokens

review

Review code changes for security, performance, bugs, and quality. Reviews staged changes, unstaged changes, specific commits, or PR-ready diffs.

open-gsd/gsd-pi · 32 tokens