Source profileQuality 86/100Review permissions

tobihagemann/turbo/claude/skills/investigate/SKILL.md

investigate

Systematically investigate bugs, test failures, build errors, performance issues, or unexpected behavior by cycling through characterize-isolate-hypothesize-test steps. Use when the user asks to "investigate this bug", "debug this", "figure out why this fails", "find the root cause", "why is this broken", "troubleshoot this", "diagnose the issue", "what's causing this error", "look into this failure", "why is this test failing", or "track down this bug".

Source repository stars
399
Declared platforms
0
Static risk flags
2
Last source update
2026-08-05
Source checked
2026-08-06

Decision brief

What it does—and where it fits

Systematic methodology for finding the root cause of bugs, failures, and unexpected behavior. Cycle through characterize-isolate-hypothesize-test steps, with oracle escalation for hard problems. Diagnose the root cause — do not apply fixes.

Best for

  • Use when the user asks to "investigate this bug", "debug this", "figure out why this fails", "find the root cause", "why is this broken", "troubleshoot this", "diagnose the issue", "what's causing this error", "look int…

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/tobihagemann/turbo --skill "claude/skills/investigate"
Safe inspection promptEditorial

Inspect the Agent Skill "investigate" from https://github.com/tobihagemann/turbo/blob/7365ff69ae8969f29d659c49e6d757c03b63ebde/claude/skills/investigate/SKILL.md at commit 7365ff69ae8969f29d659c49e6d757c03b63ebde. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Step 1: Characterize

    Gather the symptom and establish what is actually happening:

    Collect evidence — error message, stack trace, test output, log entries, or user description of unexpected behaviorClassify the problem type:Establish reproduction — run the failing command, test, or operation. If the problem cannot be reproduced (intermittent, environment-specific), document the constraints and proceed with historical evidence.
  2. 02

    Step 2: Isolate

    Narrow from "something is wrong" to "the problem is in this area." Read references/problem-type-playbooks.md for type-specific first moves and tool sequences.

    Stack traces: Read the throwing function and its callers — full functions, not just the flagged lineTest failures: Read both the test and the system under testBuild errors: Read the config file and the referenced source
  3. 03

    Step 3: Hypothesize

    Generate 2-4 hypotheses ranked by likelihood. Each hypothesis must be falsifiable — specify what evidence would confirm or refute it.

    Hypothesis Agent (one per hypothesis): Each receives the hypothesis, relevant file paths, what evidence to look for, and instructions to report confirmed / refuted / inconclusive with evidence. Budget: max 5 tool calls…Codex Agent: Launch one Agent whose prompt instructs the subagent to invoke /consult-codex via the Skill tool with a focused prompt describing the problem, reproduction, and files examined. The multi-turn conversation a…Generate 2-4 hypotheses ranked by likelihood. Each hypothesis must be falsifiable — specify what evidence would confirm or refute it.
  4. 04

    Step 4: Test

    Verify each hypothesis with minimal, targeted actions:

    Document what was learned — each refuted hypothesis eliminates a possibility and narrows the searchReturn to Step 2 with the new information to re-isolateGenerate new hypotheses in Step 3 based on updated understanding
  5. 05

    Git Archeology

    For all problem types, check what changed recently near the failure point:

    For all problem types, check what changed recently near the failure point:If a known-good state exists (e.g., "this worked yesterday"), consider git bisect to pinpoint the breaking commit.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 24

The documentation asks the agent to run terminal commands or scripts.

**Establish reproduction** — run the failing command, test, or operation. If the problem cannot be reproduced (intermittent, environment-specific), document the constraints and proceed with historical evidence.

Runs scripts

medium · line 37

The documentation asks the agent to run terminal commands or scripts.

git log --oneline -20 -- <file>

Reads files

low · line 47

The documentation asks the agent to read local files, directories, or repositories.

**Build errors**: Read the config file and the referenced source

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score86/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars399SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
tobihagemann/turbo
Skill path
claude/skills/investigate/SKILL.md
Commit
7365ff69ae8969f29d659c49e6d757c03b63ebde
License
MIT
Collected
2026-08-06
Default branch
main
View the original SKILL.md

Investigate

Systematic methodology for finding the root cause of bugs, failures, and unexpected behavior. Cycle through characterize-isolate-hypothesize-test steps, with oracle escalation for hard problems. Diagnose the root cause — do not apply fixes.

Optional: $ARGUMENTS contains the problem description or error message.

Step 1: Characterize

Gather the symptom and establish what is actually happening:

  1. Collect evidence — error message, stack trace, test output, log entries, or user description of unexpected behavior
  2. Classify the problem type:
SignalType
Stack trace / exceptionRuntime error
Test assertion failureTest failure
Compilation / bundler / build errorBuild failure
Type checker error (tsc, mypy, pyright)Type error
Slow response / high CPU / memory growthPerformance
"It does X instead of Y" / no errorUnexpected behavior
  1. Establish reproduction — run the failing command, test, or operation. If the problem cannot be reproduced (intermittent, environment-specific), document the constraints and proceed with historical evidence.

Record the exact reproduction command and its output for verification. For intermittent or long-running reproductions, use the Monitor tool to tail logs filtered for relevant signals (errors, stack traces, specific identifiers) so failures surface live while you work.

Step 2: Isolate

Narrow from "something is wrong" to "the problem is in this area." Read references/problem-type-playbooks.md for type-specific first moves and tool sequences.

Git Archeology

For all problem types, check what changed recently near the failure point:

git log --oneline -20 -- <file>
git blame -L <start>,<end> <file>

If a known-good state exists (e.g., "this worked yesterday"), consider git bisect to pinpoint the breaking commit.

Scope Narrowing

  • Stack traces: Read the throwing function and its callers — full functions, not just the flagged line
  • Test failures: Read both the test and the system under test
  • Build errors: Read the config file and the referenced source
  • Unexpected behavior: Trace the data flow from input to the unexpected output

Step 3: Hypothesize

Generate 2-4 hypotheses ranked by likelihood. Each hypothesis must be falsifiable — specify what evidence would confirm or refute it.

Format:

H1 (most likely): [description] — confirmed if [X], refuted if [Y]
H2: [description] — confirmed if [X], refuted if [Y]
H3: [description] — confirmed if [X], refuted if [Y]

Parallel Investigation

For complex problems with 3+ hypotheses and a non-obvious root cause, spawn parallel investigators simultaneously.

Spawn condition: 3+ hypotheses AND the problem is not a simple typo, missing import, or syntax error.

Skip when 1-2 hypotheses are obvious (e.g., stack trace points directly to the bug).

Before dispatching, read the project's test configuration and CI workflow to identify any test tier that resets a shared external resource between tests, such as a database, a fixed port, or a cache. Such tiers have no cross-process interlock, so agents running them concurrently wipe each other's state and return failures that look like real defects. Name any such tier to every agent as off-limits.

Use the Agent tool to launch all agents below in a single assistant message so they run concurrently. Run them in the foreground so all their results return in this turn. Each Agent call uses model: "opus" and no name. Expect (one Agent per hypothesis + one Codex Agent) total. State the count explicitly when emitting the calls. Every agent's prompt must direct it to treat the shared working tree and its git index as read-only and to gather evidence by reading and reasoning; experiments that mutate code wait for Step 4, where they run one at a time.

  • Hypothesis Agent (one per hypothesis): Each receives the hypothesis, relevant file paths, what evidence to look for, and instructions to report confirmed / refuted / inconclusive with evidence. Budget: max 5 tool calls per subagent.
  • Codex Agent: Launch one Agent whose prompt instructs the subagent to invoke /consult-codex via the Skill tool with a focused prompt describing the problem, reproduction, and files examined. The multi-turn conversation allows it to dig deeper into patterns the hypothesis-driven subagents miss. Run the /evaluate-findings skill on its output after the Agent returns.

After all investigators complete, merge results. Codex findings that overlap with a subagent's confirmed hypothesis reinforce confidence. Novel codex findings become additional hypotheses to test in Step 4.

Step 4: Test

Verify each hypothesis with minimal, targeted actions:

Action TypeTool
Find usage or patternGrep
Read surrounding codeRead
Check recent changesBash (git log, git blame, git diff)
Run isolated testBash (specific test command)
Check dependency versionBash (npm ls, pip3 show, etc.)
Inspect runtime stateBash (add temporary logging, run, check output)

Record each result:

HypothesisVerdictEvidence
H1confirmed / refuted / inconclusive[what was found]
H2confirmed / refuted / inconclusive[what was found]

Iteration

If all hypotheses are refuted or inconclusive:

  1. Document what was learned — each refuted hypothesis eliminates a possibility and narrows the search
  2. Return to Step 2 with the new information to re-isolate
  3. Generate new hypotheses in Step 3 based on updated understanding

Cycle budget: maximum 2 full cycles (hypothesize → test → learn → repeat) before escalating.

Escalation

After 2 failed hypothesis cycles, offer escalation to /consult-oracle via AskUserQuestion:

Investigation stalled after [N] hypothesis cycles.

Tested: [summary of hypotheses and evidence]
Remaining unknowns: [what is still unclear]

Escalate to Oracle? (consults external model with full context)

Proceed only if the user approves.

Investigation Report

Output results as text:

Investigation Report:

Problem: [one-line description]
Type: [runtime error | test failure | build failure | type error | performance | unexpected behavior]
Root cause: [confirmed cause, or "unresolved" with best hypothesis]

Evidence:
- [what confirmed the root cause]

Suggested fix: [description of what to change, or "needs further investigation"]
Reproduction command: [command to verify the fix once applied]

Hypotheses tested:
1. [hypothesis] — [confirmed/refuted/inconclusive] — [evidence]
2. [hypothesis] — [confirmed/refuted/inconclusive] — [evidence]

Escalation: [none | oracle]

Then use the TaskList tool and proceed to any remaining task.

Rules

  • If the problem turns out to be environmental (wrong Node version, missing dependency, OS-specific), report that clearly — it may not require a code fix.
  • If the problem is in a dependency (not the project's code), document the dependency issue and suggest workaround options rather than patching the dependency.

Alternatives

Compare before choosing

Computed 911,472

GCWing/BitFun

investigate

Systematic debugging with root cause investigation. Four phases: investigate, analyze, hypothesize, implement. Iron Law: no fixes without root cause. Use when asked to "debug this", "fix this bug", "why is this broken", "investigate this error", or "root cause analysis". Proactively invoke this skill (do NOT debug directly) when the user reports errors, 500 errors, stack traces, unexpected behavior, "it was working yesterday", or is troubleshooting why something stopped working. (gstack)

Computed 86399

tobihagemann/turbo

investigate

Systematically investigate bugs, test failures, build errors, performance issues, or unexpected behavior by cycling through characterize-isolate-hypothesize-test steps. Use when the user asks to "investigate this bug", "debug this", "figure out why this fails", "find the root cause", "why is this broken", "troubleshoot this", "diagnose the issue", "what's causing this error", "look into this failure", "why is this test failing", or "track down this bug".

Computed 9024

Borda/AI-Rig

investigate

Systematic diagnosis for unknown failures — local environment, tool setup, CI vs local divergence, hook misbehavior, and runtime anomalies. Gathers signals broadly, ranks hypotheses, uses adversarial review (Codex or foundry:challenger) for ambiguous cases, probes each, and reports root cause with a recommended next action. NOT for known code bugs (/develop:debug (requires `develop` plugin)) or config quality (/foundry:audit). TRIGGER when: unknown failure with no Python traceback — hook not fir

Computed 88126,505

garrytan/gstack

investigate

Systematic debugging with root cause investigation. (gstack)