← 返回
未分类

Debug Ultra

Combined debugging workflow: activates caveman mode, maps the relevant code area, builds a trusted feedback loop, runs falsifiable diagnosis, uses language-specific debugging tools, and ends with cleanup plus handoff. Use when starting a debugging or investigation session.
A disciplined debugging session skill that prevents AI from jumping to fixes before reproduction, feedback loops, and falsifiable hypotheses. 一个强约束调试工作流 Skill,专门防止 AI 在没有复现、没有反馈回路、没有可证伪假设的情况下乱改代码。适合复杂 Bug、性能回归、间歇性问题和跨会话排查。
ARK3
未分类 community v1.1.0 2 版本 100000 Key: 无需
★ 1
Stars
📥 102
下载
💾 0
安装
2
版本
#latest

概述

Run the following sequence.

Design principle

This skill is the debugging commander, not a reference note. Follow the workflow order strictly. Use the command toolbox only inside the relevant phase, especially Instrument and Feedback Loop. Do not run random commands before reproduction and hypotheses are clear.

Step 1 — Caveman mode on

Switch to caveman communication for this session: drop all filler, articles, and pleasantries. Keep full technical accuracy. Stay in caveman mode until the user says "stop caveman" or "normal mode".

Step 2 — Zoom out

Go up a layer of abstraction. Give a map of all relevant modules and callers in the area related to the current problem, using the project's domain glossary vocabulary. If no CONTEXT.md exists, infer domain terms from the codebase.

When relevant, identify:

  • Entry point
  • Caller chain
  • Data shape
  • State transition
  • External dependency
  • Test seam
  • Owner boundary

Step 3 — Diagnose

Run the full diagnosis discipline.

Phase 1 — Build a feedback loop first

Try in order:

  1. Failing test at the relevant seam
  2. curl/HTTP script against dev server
  3. CLI invocation diffing stdout against known-good snapshot
  4. Headless browser script
  5. Throwaway harness with mocked deps
  6. Property/fuzz loop for intermittent failures
  7. Bisection harness if bug appeared between two known states

Do not proceed to Phase 2 without a loop you believe in.

Phase 2 — Reproduce

Confirm the loop produces the exact failure the user described. Wrong bug = wrong fix.

Document:

  • Exact steps
  • Input data
  • Environment
  • Expected result
  • Actual result
  • Whether failure is deterministic or intermittent

Phase 3 — Hypothesise

Generate 3–5 ranked falsifiable hypotheses before testing any. Show ranked list to user before proceeding.

Format every hypothesis as:

> If X is the cause, then changing Y will make the bug disappear.

Phase 4 — Instrument

One variable at a time. Tag all debug logs [DEBUG-xxxx] for easy cleanup. Prefer debugger/REPL over log spam. For perf regressions: measure first, fix second.

Use the command toolbox below only when it matches the current hypothesis.

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()

# 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: 1px solid red !important; }
.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 bisection

git bisect start
git bisect bad
git bisect good abc1234
# Test checked-out commit, then mark it:
git bisect good
# or:
git bisect bad
git bisect reset

Quick diagnostic commands

# What's using this port?
lsof -i :PORT

# What's this process doing?
ps aux | grep PROCESS

# Watch file changes
fswatch -r ./src

# Disk space
df -h

# System resource usage
top -l 1 | head -10

Common error patterns

ErrorLikely causeFirst check
----------------------------------
Cannot read property of undefinedMissing null check or wrong data shapeValidate input shape and caller contract
ENOENTFile or directory does not existCheck path, working directory, and creation step
CORS errorBackend missing CORS headersCheck allowed origins and middleware order
Module not foundMissing dependency or wrong import pathCheck package install and path alias config
Hydration mismatchServer/client rendered different HTMLCheck client-only state and deterministic rendering
Segmentation faultMemory corruption or invalid pointerCheck array bounds, pointer validity, native dependency
Connection refusedService not running on expected portCheck process, port, host, container mapping
Permission deniedFile or network permission issueCheck ownership, chmod, sandbox, firewall

Phase 5 — Fix + regression test

Write the regression test before the fix, but only at a correct seam. If no correct seam exists, that is the finding; note it.

Apply the minimal correct fix. Do not refactor while debugging unless refactor is required to expose the correct seam.

Phase 6 — Cleanup

Remove all [DEBUG-...] logs. Confirm original repro no longer reproduces. State the winning hypothesis in the commit message or handoff note.

Step 4 — Handoff when session ends

When the user signals they are done or the session is wrapping up, generate a handoff document summarising:

  • What was reported
  • What was reproduced
  • Winning hypothesis
  • What was fixed
  • Regression coverage
  • What is still open
  • What the next session should focus on

Save the handoff document to the OS temp directory.

版本历史

共 2 个版本

  • v1.1.0 debug-session ├── 1. Caveman mode ├── 2. Zoom out ├── 3. Build feedback loop ├── 4. Reproduce ├── 5. Hypothesize ├── 6. Instrument │ ├── JS / TS commands │ ├── Python commands │ ├── Network commands │ ├── Git bisect │ └── Common error patterns ├── 7. Fix + regression test ├── 8. Cleanup └── 9. Handoff 当前
    2026-06-01 11:26 安全 安全
  • v1.0.0 Initial release
    2026-05-26 11:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Claude code 协同

user_dc515faf
This skill coordinates a safe dual-agent advisory workflow between WorkBuddy and Claude Code for architecture analysis,
★ 2 📥 86

Grill Pro

user_dc515faf
🔥 Grill — 让 AI 拷问你的设计 一句话: 在你动手之前,让 AI 追着你把每个设计决策想清楚。 它解决什么问题? 写代码前,大家都有过这些时刻: 方案只想了一半就开干,结果做到一半发现方向不对 术语含义模糊,"账户"到底指客
★ 1 📥 88

skill coach

user_dc515faf
做一个 AI Skill,或判断它好不好用 一套五步法,事前帮你给设计方向,事后帮你查好坏——决定能不能放心用、要不要先修、还是干脆别要。 用 R-V-C-E 心智模型为 AI skill 给方向、做审查、做优化(风险 Risk → 价值
★ 0 📥 46