بنقرة واحدة
investigate
Use when debugging errors, unexpected behavior, or root-cause analysis
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when debugging errors, unexpected behavior, or root-cause analysis
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when a vague idea needs Socratic requirements discovery, topology confirmation, ambiguity scoring, and an approval-gated spec before execution
Use when a prompt asset keeps causing the same PDCA gate failure and you want to evolve it against a maintainer-authored structural check
Use when running a PDCA cycle across research, production, review, and refinement
Use when iteratively improving a draft until it meets a review target
Use when reviewing content, strategy, or code with parallel specialized reviewers
Use when a fetched URL returns 4xx/blocked, hits a WAF or captcha, or when a JS-heavy SPA returns no usable body. Escalates through public APIs, Jina Reader, header-diverse curl, TLS impersonation, headless browsers, and free archive mirrors until validated content is returned. Zero API keys.
| name | investigate |
| description | Use when debugging errors, unexpected behavior, or root-cause analysis |
| effort | medium |
No fixes without root cause investigation first.
Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, fix.
Investigate — Gather evidence before forming any opinion.
git log --oneline -20 and git diff HEAD~5 --stat.Analyze — Classify the pattern.
| Pattern | Symptoms | Check |
|---|---|---|
| Race condition | Intermittent failure | Timing/ordering dependency |
| State corruption | Wrong values | Trace state mutation points |
| Nil/undefined | TypeError | Missing optional chaining |
| Import/dep conflict | Module errors | node_modules, version mismatch |
| MCP protocol error | Tool invocation failure | Request/response schema mismatch |
| Hook execution order | Unexpected side effects | Hook registration sequence |
| Skill file parsing | Routing mismatch | YAML frontmatter + pattern match |
| Schema drift | Type errors at boundaries | Schema vs handler comparison |
| Stale cache | Works after clear | Cache invalidation path |
| Config drift | Works locally, fails elsewhere | Environment variable differences |
Hypothesize & Test — State each hypothesis explicitly before testing.
Fix & Verify — Only after root cause is confirmed.
During investigation, do NOT modify files unrelated to the bug. Resist refactoring temptation — this session is for the bug only.
| Flag | Values | Default | Description |
|---|---|---|---|
--scope | <path> | auto-detected | Restrict investigation to directory |
--depth | shallow|deep | shallow | shallow=recent changes, deep=full history |
evidence-gatherer: { model: sonnet, constraint: "Read logs, grep codebase, list recent commits — evidence only, no fixes", tools: [Read, Bash, Glob, Grep] }
root-cause-analyst: { model: opus, constraint: "Given evidence, determine the single root cause with confidence score" }
.captures/investigate-{slug}-{YYYY-MM-DD}.md{slug} = error type lowercased, spaces to hyphens, max 40 charsA structured debug report:
## Debug Report
### Symptom
{Original error/behavior}
### Root Cause
{Confirmed cause with evidence}
### Fix
{Changes made — file:line}
### Verification
- [ ] Original scenario no longer reproduces
- [ ] Regression test written and passing
- [ ] Test fails without fix, passes with fix
- [ ] Related tests passing
### Risk: {LOW|MEDIUM|HIGH}
### Confidence: {1-10}/10