debug

A step-by-step method for finding and fixing the underlying cause of a software bug. It starts by reproducing the problem, then narrows down where it occurs, fixes the cause, verifies the result, and adds a test to prevent it returning.

In plain words
What is it for?
Use it when code crashes, behaves unexpectedly, reports an error, or does not work as intended.
Why use it?
It replaces guesswork and broad changes with evidence from the actual error and reproduction steps.

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/nirelbaz/promptpit/debug
Any agent
npx skills add nirelbaz/promptpit --skill debug
Clone the repo
git clone --depth 1 https://github.com/nirelbaz/promptpit

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 350 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.00042 $0.00350
Opus 5 $0.00021 $0.00175
Sonnet 5 $0.00008 $0.00070
Haiku 4.5 $0.00004 $0.00035

Measured 2d ago against content hash 478fff2d4e66, 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 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.

.promptpit/skills/debug/SKILL.md · 27 lines

What it actually says

Debug

Debug a problem systematically. No shotgun fixes.

Process

  1. Reproduce the bug. If you can't reproduce it, you can't verify the fix. Get the exact steps, input, and environment.
  2. Isolate the cause. Binary search through the code path. Add logging at key points. Narrow down: which function, which line, which condition?
  3. Understand why it happens. Don't just find the broken line. Understand the root cause. "It crashes here" is not a root cause. "This value is null because the API returns an empty body on 204 responses and we don't check for that" is a root cause.
  4. Fix the root cause, not the symptom. If you add a null check without understanding why it's null, you've hidden the bug, not fixed it.
  5. Verify the fix resolves the original reproduction steps.
  6. Write a regression test that would have caught this bug.

Rules

  • Never fix something you can't reproduce. You're guessing.
  • One fix per commit. If you found two bugs, that's two commits.
  • Read the error message carefully. The answer is often right there.
  • Check recent changes first: git log --oneline -10 and git diff HEAD~5.
  • If the same approach fails twice, reassess your assumptions. Explain the problem from scratch. What are you taking for granted?
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 · 27 lines · 42 tokens per session scan A 478fff2d4e66

Subscribe to this mod's changes

debug is a skill published in the GitHub repository nirelbaz/promptpit (6 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 350 once invoked, about $0.0002 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

gsap-scrolltrigger

Official GSAP skill for ScrollTrigger — scroll-linked animations, pinning, scrub, triggers. Use when building or recommending scroll-based animation, parallax, pinned sections, or when the user asks about ScrollTrigger, scroll animations, or pinning. Recommend GSAP for scroll-driven animation when no library is…

calesthio/OpenMontage · 68 tokens

gsap-core

Official GSAP skill for the core API — gsap.to(), from(), fromTo(), easing, duration, stagger, defaults, gsap.matchMedia() (responsive, prefers-reduced-motion). Use when the user asks for a JavaScript animation library, animation in React/Vue/vanilla, GSAP tweens, easing, basic animation, responsive or reduced-motion…

calesthio/OpenMontage · 128 tokens

bfl-api

BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.

calesthio/OpenMontage · 38 tokens

gsap-utils

Official GSAP skill for gsap.utils — clamp, mapRange, normalize, interpolate, random, snap, toArray, wrap, pipe. Use when the user asks about gsap.utils, clamp, mapRange, random, snap, toArray, wrap, or helper utilities in GSAP.

calesthio/OpenMontage · 64 tokens

playwright-recording

Record browser interactions as video using Playwright. Use for capturing demo videos, app walkthroughs, and UI flows for Remotion videos. Triggers include recording a demo, capturing browser video, screen recording a website, or creating walkthrough footage.

calesthio/OpenMontage · 53 tokens

comfyui

Use when working with ComfyUI workflows in OpenMontage, including comfyuiimage/comfyuivideo/comfyuimusic, custom workflowjson/workflowpath inputs, outputnode selection, missing model setup, LoRAs, low-VRAM workflow choices, and community workflow imports.

calesthio/OpenMontage · 61 tokens