一键导入
systematic-debugging
Enforce root-cause investigation before any fix. Use when encountering a bug, test failure, or unexpected behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Enforce root-cause investigation before any fix. Use when encountering a bug, test failure, or unexpected behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Periodic repository cleanup sweep (Tierward repo variant) - finds orphaned/merged git branches, orphaned worktrees and unregistered worktree directories, stale `.claude/session/*.md` files, stale `.claude/initiatives/*.md` files, and (target:full / target:reviews) orphaned documentation and stale `docs/reviews/` snapshots (archive-only moves, never deletion). Reports every finding with evidence, then executes only the branches/worktrees/session-files the user explicitly confirms via a single AskUserQuestion batch. Never deletes docs/*.md itself - those are always report-only, evidence-based, human-decided. Distinct from the Phase 8 cleanup gate (which tears down one specific block at closure) - this is the periodic sweep that catches what block-by-block cleanup misses.
Unified accessibility audit - axe-core WCAG 2.2 scan, APCA contrast measurement, static a11y checks (aria-label, tabindex, form labels, focus visibility, onClick on non-interactive). Static and live modes.
Performance audit: bundle size, lazy loading, data fetching, caching, N+1 queries, image optimization. Native mode checks memory, I/O, launch weight, energy.
Responsive audit: test pages at 375/768/1024px breakpoints via Playwright. Checks overflow, tap targets, sidebar collapse, text reflow, WCAG 1.4.4 zoom.
Security audit: auth/authz on API routes, input validation, row-level access control (RLS in Postgres, ORM scopes or app-level guards elsewhere), response shape review, secret exposure, HTTP headers. Native mode checks entitlements and Keychain. MCP-aware (v1.20+): when `mcp-nvd` server is wired, Step 3c queries live CVE data instead of static `npm audit` / `pip-audit` snapshots; falls back to local audit commands when MCP unreachable.
Database audit: schema quality, index coverage, row-level access-control completeness, FK cascades, query patterns. Runs live SQL verification (PostgreSQL instance in PATTERNS.md; other engines verify the equivalent guard). Migration file safety → /migration-audit.
| name | systematic-debugging |
| description | Enforce root-cause investigation before any fix. Use when encountering a bug, test failure, or unexpected behavior. |
| user-invocable | true |
| model | opus |
| context | fork |
| allowed-tools | Read Glob Grep Bash Edit |
The Iron Law: no fix without completing Phase 1.
Any technical issue: test failures, runtime bugs, unexpected output, build errors.
Write the hypothesis before touching any code:
"The root cause is [X] because [Y]."
Verify it against the Phase 1 evidence.
* STOP — hypothesis written and verified. Wait for confirmation before Phase 3. *
| Temptation | Why it fails |
|---|---|
| Proposing a fix before Phase 1 | Root cause unconfirmed |
| Multiple changes in one attempt | Cannot isolate what worked |
| 3+ fixes failed, one more | Architectural problem, not a patchable bug |