debug-pro

A structured guide for finding and fixing software bugs, crashes, errors, and unexpected behavior. It moves from reproducing and isolating a problem through verification, a minimal fix, and a regression test.

In plain words
What is it for?
Debug JavaScript or TypeScript, Python, Swift, CSS, and network problems, using tools such as logging, breakpoints, browser inspection, and git bisect.
Why use it?
It replaces guesswork with a repeatable investigation and helps ensure that a fixed bug does not return.

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/craftos-dev/craftbot/debug-pro
Any agent
npx skills add CraftOS-dev/CraftBot --skill debug-pro
Clone the repo
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot

Made for: Claude Code, Codex.

Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 939 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin 88% copy Near-identical to another mod 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.00068 $0.00939
Opus 5 $0.00034 $0.00469
Sonnet 5 $0.00014 $0.00188
Haiku 4.5 $0.00007 $0.00094

Measured 2d ago against content hash 1ac9363d0c93, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

debug-pro scanned grade B with 2 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `Permission denied` | File/network permission issue | Check chmod, firewall, sudo |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -v https://api.example.com/endpoint
Origin

This is a copy

88% identical to debug-pro — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/debug-pro/SKILL.md · 129 lines

How it starts

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

debug-pro

Systematic debugging methodology and language-specific debugging commands.

The 7-Step Debugging Protocol

  1. Reproduce — Get it to fail consistently. Document exact steps, inputs, and environment.
  2. Isolate — Narrow scope. Comment out code, use binary search, check recent commits with git bisect.
  3. Hypothesize — Form a specific, testable theory about the root cause.
  4. Instrument — Add targeted logging, breakpoints, or assertions.
  5. Verify — Confirm root cause. If hypothesis was wrong, return to step 3.
  6. Fix — Apply the minimal correct fix. Resist the urge to refactor while debugging.
  7. Regression Test — Write a test that catches this bug. Verify it passes.

Language-Specific Debugging

JavaScript / TypeScript

# Node.js debugger
node --inspect-brk app.js
# Chrome DevTools: chrome://inspect

# Console debugging
console.log(JSON.stringify(obj, null, 2))
console.trace('Call stack here')
console.time('perf'); /* code */ console.timeEnd('perf')

# Memory leaks
node --expose-gc --max-old-space-size=4096 app.js

Python

# Built-in debugger
python -m pdb script.py

# Breakpoint in code
breakpoint()  # Python 3.7+

# Verbose tracing
python -X tracemalloc script.py

# Profile
python -m cProfile -s cumulative script.py

Swift

# LLDB debugging
lldb ./MyApp
(lldb) breakpoint set --name main
(lldb) run
(lldb) po myVariable

# Xcode: Product → Profile (Instruments)

CSS / Layout

/* Outline all elements */
* { outline: 1px solid red !important; }

/* Debug specific element */
.debug { background: rgba(255,0,0,0.1) !important; }

Network

# HTTP debugging
curl -v https://api.example.com/endpoint
curl -w "@curl-format.txt" -o /dev/null -s https://example.com

# DNS
dig example.com
nslookup example.com

# Ports
lsof -i :3000
netstat -tlnp

Git Bisect

git bisect start
git bisect bad              # Current commit is broken
git bisect good abc1234     # Known good commit
# Git checks out middle commit — test it, then:
git bisect good  # or  git bisect bad
# Repeat until root cause commit is found
git bisect reset

Read the full file on GitHub · 129 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 129 lines · 68 tokens per session scan B 1ac9363d0c93

Subscribe to this mod's changes

debug-pro is a skill published in the GitHub repository CraftOS-dev/CraftBot (376 stars, last pushed 2d ago), licensed MIT. It adds 68 tokens to every session and 939 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). It is 88% identical to debug-pro, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

turix-mac

Computer Use Agent (CUA) for macOS automation using TuriX. Use when you need to perform visual tasks on the desktop, such as opening apps, clicking buttons, or navigating UIs that don't have a CLI or API.

TurixAI/TuriX-CUA · 53 tokens

browser-control

Control web pages in an existing Chromium remote-debugging session with deterministic sagui commands or the browser-only AI Agent. Use when Claude Code needs to inspect tabs, observe semantic elements, navigate, click, type, send keys, scroll, or complete a browser goal through CDP without controlling native macOS UI…

NakaokaRei/SwiftAutoGUI · 72 tokens

agent-smoke-test

Run manual development checks for SwiftAutoGUI AI Agent actions through the local sagui CLI. Use when Claude or Codex needs to test app-control or Accessibility BasicAction generation on macOS.

NakaokaRei/SwiftAutoGUI · 43 tokens

macos-control

Control macOS GUI applications via mouse automation, keyboard input, screenshots, image recognition, and AppleScript execution. Use when you need to interact with macOS app UIs, take screenshots, click buttons, type text, scroll, drag, or locate images on screen.

NakaokaRei/SwiftAutoGUI · 58 tokens

open-record-replay

Record a user-demonstrated macOS workflow with the Open Record/Replay CLI, inspect the captured event stream, prepare a skill evidence package, and hand it to the host agent's native skill creator. Use when the user asks the agent to watch them perform a task, record a workflow, or create/refine a reusable Computer…

humblebanana/open-record-replay · 77 tokens

artifact-storage-policy

管理 Codex 交付物的專案識別、Google Drive/GitHub 路由、檔名、儲存位置與回讀驗證;凡工作報告、外部保存、交付成果或新 repository 選擇涉及遠端儲存時使用。.

a275618631/codex-antigravity-collaboration · 68 tokens