一键导入
systematic-debugging
4-phase debugging framework preventing "guess-and-check" fixing. Load when debugging fails or for complex bug investigation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
4-phase debugging framework preventing "guess-and-check" fixing. Load when debugging fails or for complex bug investigation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interview the user relentlessly about a plan or design until branch-level decisions are resolved for execution.
Access Figma designs, extract design systems, and retrieve component specifications. Use when implementing UI from Figma mockups, extracting design tokens, or analyzing design files.
Enforce cost-aware MCP usage. Use when a task might trigger heavy external tools, web search, or broad context expansion. Prevents token burn by ensuring MCPs are only used when local context is insufficient.
Navigate the Warmplane mcp0 facade efficiently. Use when the active config exposes provider capabilities through `mcp0_*` tools and you need to discover or call provider tools without brute-force describing large capability sets. Trigger on requests involving mcp0, Warmplane, or provider work through the facade such as Linear, Notion, Figma, New Relic, Context7, grep.app, or Storybook tools.
Use this when the user needs to control Chrome, navigate to a page, inspect a tab, click or fill elements, take screenshots, or automate a browser flow with aeroxy/chrome-devtools-cli.
Guidelines for creating and managing implementation plans with citations
| name | systematic-debugging |
| description | 4-phase debugging framework preventing "guess-and-check" fixing. Load when debugging fails or for complex bug investigation. |
THE IRON LAW: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST.
Goal: Trigger the bug reliably before any investigation.
1. Create minimal reproduction case
2. Document exact steps to trigger
3. Note: Does it happen 100% or intermittently?
4. If intermittent → add logging to catch it
STOP if you cannot reproduce. Never guess at bugs you can't see.
Goal: Find EXACTLY where bad data or behavior originates.
// Add instrumentation at boundaries
console.log('[Layer 1] Input:', JSON.stringify(data))
// ... processing ...
console.log('[Layer 1] Output:', JSON.stringify(result))
For issues spanning services/modules:
| Tool | Use For |
|---|---|
grep | Find all usages of the variable/function |
lsp_find_references | Trace call hierarchy |
git log -S "pattern" | Find when code was introduced |
git blame | Who changed this and why |
Goal: Form ONE specific theory, test minimally.
✅ GOOD: "The empty string comes from line 42 where we default to ''"
❌ BAD: "Maybe it's a caching issue? Let me try clearing the cache..."
If 3+ fix attempts fail, STOP and question fundamental assumptions.
Consider escalating: task(agent="oracle", prompt="Debug analysis...")
Goal: Confirm the fix works and doesn't break other things.
lsp_diagnostics clean on changed files# Run tests on affected areas
bun test src/affected-module/
| Anti-Pattern | Why It's Wrong |
|---|---|
| "Quick fix for now, investigate later" | Later never comes; tech debt compounds |
| "Just try changing X and see if it works" | Guess-and-check wastes time, hides root cause |
| "It works on my machine" | Environment differences ARE the bug |
| Fixing where error appears | Symptom ≠ Cause; trace backward |
| Multiple changes at once | Can't isolate which change fixed it |
| Deleting failing tests | Hiding the problem, not fixing it |
After fixing, consider adding guards to prevent recurrence:
// Layer 1: Parse at boundary
const validatedInput = parseInput(rawInput) // throws if invalid
// Layer 2: Runtime assertion
assert(value !== undefined, 'Value should never be undefined here')
// Layer 3: Type narrowing
if (!isValidState(state)) {
throw new Error(`Invalid state: ${JSON.stringify(state)}`)
}
Before claiming "fixed":
lsp_diagnostics clean? (Phase 4)