AGENT SKILL

debug-deep

Deep debugging using multi-agent analysis and error pattern matching. Use when user reports a bug, error, crash, or unexpected behavior. Triggers on "debug", "fix", "broken", "crash", "error", "bug".

适用职业开发工程师
License 许可
Apache-2.0
最近更新
2026-10-11
Stars
★ 7
Forks
8

01 前言 Front Matter

name
debug-deep
description
Deep debugging using multi-agent analysis and error pattern matching. Use when user reports a bug, error, crash, or unexpected behavior. Triggers on "debug", "fix", "broken", "crash", "error", "bug".
argument-hint
<error description or paste>

03 SKILL.md 正文

Deep Debug — Holographic Error Analysis

Error: $ARGUMENTS

[OPTIONAL INTEGRATIONS: this skill can cross-reference a project-local error-patterns log and an architecture-rules skill if either is installed. Both are optional — the skill works without them.]

Phase 0: Check Error Patterns (optional)

If the project maintains an error-patterns log (conventional paths: $PROJECT_ROOT/error-patterns.json or $HOME/.claude/memory/error-patterns.json), read it FIRST.

Check for matching patterns with frequency="recurring" or severity="critical". If match found — apply known fix immediately with note "Known pattern: [id]".

If no log exists, skip this phase.

Phase 0.5: Load Architecture Rules (optional)

If an architecture-rules skill is installed at $HOME/.claude/skills/architecture-rules/, read its references/antipatterns.md and references/stack-compat.md — the bug may be caused by a known anti-pattern or stack incompatibility.

If that skill is not present, skip this phase.

Phase 1: Parallel Diagnosis (3 agents)

Agent 1: Stack Trace Analyzer

  • Parse the error message/stack trace
  • Identify the exact file:line where error originates
  • Trace the call chain backwards
  • Read all relevant source files
  • Return: root cause hypothesis + files involved

Agent 2: Context Investigator

  • Check git history — what changed recently?
  • Check if similar errors in git log messages
  • Look at related tests — are they passing?
  • Check dependencies — version mismatches?
  • Return: timeline of changes + correlation

Agent 3: Pattern Matcher

  • Search codebase for similar patterns that work
  • Compare working vs broken code
  • Check if it's a known anti-pattern
  • Search web for this specific error message
  • Return: similar working patterns + external solutions

Phase 2: Root Cause Analysis

After agents return:

  1. Cross-reference all 3 analyses
  2. Identify ROOT cause (not symptom!)
  3. Rate confidence: X%
## Root Cause Analysis

### Error Chain:
[symptom] ← [intermediate cause] ← [ROOT CAUSE]

### Root Cause: [description]
Confidence: X%

### Evidence:
- Agent 1 found: [...]
- Agent 2 found: [...]
- Agent 3 found: [...]

### Why previous fixes failed (if applicable):
[They fixed symptoms, not root cause]

Phase 3: Fix Options

Present 2-3 fix approaches:

Fix A: Architectural (correct)

Changes the structure to prevent the class of error

Fix B: Targeted (quick)

Minimal change that fixes this specific instance

Recommendation: [A or B] with reasoning

Phase 4: Implement & Verify

  1. Apply chosen fix
  2. Run relevant tests
  3. Verify fix doesn't break other things
  4. Check for similar vulnerable patterns elsewhere

Phase 5: Log Error Pattern (optional)

If the project maintains an error-patterns log, append this fix to it.

Conventional path (create if it does not exist): $PROJECT_ROOT/error-patterns.json or $HOME/.claude/memory/error-patterns.json

Entry format:

{
  "id": "[category]-[number]",
  "name": "[short pattern name]",
  "trigger": "[when this happens]",
  "wrongApproach": "[what was tried incorrectly]",
  "correctApproach": "[actual fix]",
  "severity": "critical|high|medium",
  "frequency": "recurring|very-common|common|occasional",
  "occurrences": 1,
  "lastSeen": "[today's date]"
}

If you maintain a project development-learnings log, append a session entry there as well.

Rules

  • NEVER patch symptoms — find root cause
  • Architecture fix > external fix
  • Don't rebuild what works
  • Verify every fact — no hallucinations
  • Log the error pattern when you maintain such a log

04 同仓库更多 Skills

KeiSeiLab
KeiSeiLab/KeiSeiKit

wave-audit

3-wave parallel audit — Wave 1 discovery (4 agents), Wave 2 verification (4 agents), Wave 3 cross-optimization (1 synthesizer). Each wave runs agents in parallel. Combines security review, runtime analysis, quality check, and constructor pattern into one unified workflow with evidence grading and Go/No-Go verdict.

Skill与智能体开发
★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

vm-provision

End-to-end VPS provisioning — select provider → plan → provision → harden → verify (ssh-check + firewall-diff hard-gate) → handoff. 6 phases, ≥6 AskUserQuestion calls, defensive-only. Stops if either verification primitive fails.

★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

visual-explainer

Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.

数据分析师前端开发
★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

video-gen

Use when generating video from frame sequences — FFmpeg extraction, WebP/AVIF conversion, sprite sheets, scroll-synced playback, video encoding/transcoding. Covers the full pipeline from video source to web-ready frame sequence or optimized video.

图像与多媒体
★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

test-matrix

Use when a project needs testing BEYOND unit tests — fuzzing, property-based, load, E2E, or mutation. Five-phase hub-and-spoke pipeline composes the right mix per language × critical path × CI target, scaffolds configs + corpus + fixtures, wires CI jobs, and defines the crash/regression triage workflow. Pure-click: every decision except intake is an AskUserQuestion.

测试与质量
★ 7
KeiSeiLab
KeiSeiLab/KeiSeiKit

test-gen

Use when generating tests for untested code — happy path, edge cases, error handling

测试与质量
★ 7