一键导入
remy-debug
Diagnose bugs via hypothesis loop with circuit breaker. Diagnosis only — produces evidence packets for /remy-patch without modifying code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Diagnose bugs via hypothesis loop with circuit breaker. Diagnosis only — produces evidence packets for /remy-patch without modifying code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Discover and run tests after code modification. Supports multi-angle defect prediction and coverage analysis. Recommended after large-scale edits or accumulated working tree changes.
Scan source files (Python, C/C++, TypeScript) and generate semantic logic index via LLM. Index is injected into CLAUDE.md and used by hooks/skills for dependency analysis. Run after repo init or major changes.
Deep repository analysis with multi-agent parallel perspectives. Requires /init + /remy-index as prerequisites. Produces structured research reports.
Audit architecture for risks, side effects, and ambiguities before writing code. Produces evidence packets for /remy-patch. Recommended for large or complex tasks.
Verify code changes via Intent/Log/Code triangulation. Independent blind audit without prior session context. Paired with /remy-changelog: generate log, rewind context, then audit.
Analyze CI/CD failure logs to diagnose build, test, and gate failures. Supports GitHub Actions (gh CLI), local log files, and pasted logs. Produces evidence packets for /remy-patch.
| name | remy-debug |
| description | Diagnose bugs via hypothesis loop with circuit breaker. Diagnosis only — produces evidence packets for /remy-patch without modifying code. |
| allowed-tools | Read, Grep, Glob, Bash, PowerShell, Write, AskUserQuestion |
| argument-hint | [error_description | test_command | file:line] [--since <ref>] |
| disable-model-invocation | true |
Diagnosis-only debugging skill. Produces a structured diagnosis report and an evidence packet compatible with /remy-patch. Does NOT modify source code.
| Environment Variable | Default | Description |
|---|---|---|
DEBUG_MAX_HYPOTHESES | 3 | Maximum hypothesis iterations before circuit breaker triggers. |
/remy-debug [symptom] [--since <git-ref>]
test_*.py, *.test.ts, *_test.go): treat as test command.<file>:<line> pattern: treat as location reference.--since <ref>: optional git revision to scope regression analysis.Goal: Obtain a concrete, actionable symptom description.
Use AskUserQuestion to collect:
Bash (or PowerShell on Windows).Record the user-provided text as the Symptom Record.
Read the specified file at the given line (±20 lines context).Phase 0 Exit: A Symptom Record exists. Proceed to Phase 1.
Goal: Identify suspect files and narrow the search space.
If the Symptom Record contains a stack trace or error with file paths:
If no parseable paths exist:
Grep for keywords from the error message (function names, error codes, unique strings).Bash("test -f .claude/logic_index.db && echo EXISTS || echo MISSING").Bash("python \"~/.claude/skills/remy-index/impact.py\" <suspect_file_1> <suspect_file_2> ...").
remy-index MCP server is active, query_impact / query_callers tools provide equivalent data without subprocess overhead.git log -5 --oneline -- <file>
--since <ref> was provided:
git diff <ref>..HEAD -- <suspect_files>
For each file in the Suspect Set:
Phase 1 Exit: Suspect Set, Dependency Map (if available), Change History, and suspect code are in context.
Goal: Iteratively form and test hypotheses until root cause is identified or circuit breaker triggers.
Initialize: _hypothesis_count = 0
Based on available evidence (Symptom Record, suspect code, Change History, Dependency Map), state:
Allowed probe types (read-only + test execution):
Read a specific code regionGrep for a patternBash/PowerShell: re-run a test, print environment variables, git blame, git log, execute diagnostic one-liners_hypothesis_count.If _hypothesis_count >= DEBUG_MAX_HYPOTHESES:
AskUserQuestion:
inconclusive.Return to 2.1 with updated evidence context.
Phase 2 Exit: Either a Root Cause Candidate is confirmed, or user chose to output current diagnosis.
Goal: Produce a structured, readable diagnosis report.
Read the template: skills/remy-debug/diagnosis_template.md.Bash("mkdir -p '.claude/temp_debug'").Bash("date +\"%Y%m%d_%H%M%S\"") → {TIMESTAMP}.Write the report to .claude/temp_debug/debug_{TIMESTAMP}.md.Goal: Produce an evidence packet compatible with /remy-patch.
Bash("git rev-parse HEAD 2>/dev/null || echo NO_GIT").Bash("mkdir -p '.claude/temp_task'").Write packet to .claude/temp_task/debug_{TIMESTAMP}.json:{
"v": "1.0.0",
"task": {
"id": "debug_{TIMESTAMP}",
"mode": "write",
"summary": "<one sentence: what to fix based on diagnosis>",
"read_only_until_evidence": true
},
"sender_payload": {
"plan": ["<proposed fix step 1>", "<proposed fix step 2>"],
"analysis": "<constraints and risks from diagnosis>",
"assumptions": ["<any unconfirmed hypothesis marked as assumption>"]
},
"evidence_packet": {
"source_revision": {
"type": "git",
"commit": "{COMMIT}",
"retrieved_at": "<ISO-8601 datetime>"
},
"evidence": [
{
"id": "E-001",
"file_type": "source",
"path": "<repo-relative path>",
"range": {"start": 1, "end": 50},
"why": "<why this evidence is relevant to the root cause>",
"status": "confirmed",
"confidence": 0.9,
"excerpt": "<verbatim text from that range>"
}
],
"proposed_changes": [
{
"id": "C-001",
"description": "<fix description derived from root cause>",
"evidence_refs": ["E-001"]
}
]
}
}
Strict Rules:
evidence[]: one item per file ACTUALLY READ during this session. Unread files MUST NOT appear.excerpt: MANDATORY verbatim text. Summaries are prohibited.status: "confirmed" for files read; "suspected" for inferred but unread files."type": "filesystem" and omit "commit".inconclusive: set "mode": "investigate" instead of "write" in the task object..active_packet: Bash("rm -f '.claude/temp_task/.active_packet' && echo 'debug_{TIMESTAMP}.json' > '.claude/temp_task/.active_packet'").After writing the report and packet:
📦 Report: debug_{TIMESTAMP}.md | Packet: debug_{TIMESTAMP}.json执行修复: /remy-patch debug_{TIMESTAMP}.json (only if mode = "write").