/deep-thought:investigatefrom deep-thought
Detective-style investigation that follows evidence trails to find root causes, bugs, and inconsistencies across code, performance, architecture, data, and systems.
Ships in deep-thought. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Detective-style investigation. Follow evidence trails, notice what's missing, connect what others overlook.
This skill MAY: read code, run diagnostic commands (read-only), trace evidence, present findings. This skill MAY NOT: edit code, fix issues, create PRs, deploy. The only Bash allowed is read-only diagnostics (git log, curl for status, kubectl get, etc.).
This is an investigation, not a fix. Present the case — the user decides what to do.
Three investigative lenses — reasoning frameworks that each unlock a different class of problems:
Sherlock Holmes — Deductive elimination. What MUST be true? Verify each premise. Catches: logic errors, broken invariants, impossible states, type mismatches.
Hercule Poirot — Psychological method. Study intent and mental model. The gap between what someone THOUGHT the system does and what it ACTUALLY does. Catches: misunderstood APIs, wrong assumptions, subtle misreads.
Columbo — Persistent nagging. Something doesn't sit right. "Just one more thing..." Catches what's MISSING — error handlers, edge cases, tests, cleanup.
| Shortcut | Why It Fails | The Cost |
|---|---|---|
| "Jump to Phase 5 — I already know the answer" | Skipping evidence gathering confirms biases, not bugs | Wrong diagnosis → wrong fix → problem persists |
| "This code looks fine, move on" | Dangerous bugs LOOK correct | The bug you didn't investigate ships |
| "Not my scope — skip it" | Evidence trails cross boundaries | Surface symptom fixed, root cause remains |
| "The tests pass, so it's correct" | Tests test what the author THOUGHT, not what it ACTUALLY does | False confidence |
Entry: User described a problem, pointed at code, or said "something's wrong."
Auto-detect polarity from context:
| Signals | Polarity | Focus |
|---|---|---|
| Diff, file path, error in code | Code | Bugs, logic errors, type mismatches |
| "Slow", latency, timeouts | Performance | Queries, memory, bottlenecks |
| "Is this the right structure" | Architecture | Patterns, coupling, design drift |
| "Data doesn't look right" | Data | Integrity, schema, migration risks |
| "Something is broken in prod" | System | Infrastructure, networking, runtime |
If unclear: Use AskUserQuestion with:
Auto-load relevant knowledge:
.py → Read ${CLAUDE_PLUGIN_ROOT}/knowledge/python-fastapi-patterns.md.ts/.tsx → Read ${CLAUDE_PLUGIN_ROOT}/knowledge/typescript-nextjs-patterns.md${CLAUDE_PLUGIN_ROOT}/knowledge/infrastructure-ops.md + ${CLAUDE_PLUGIN_ROOT}/knowledge/observability.md${CLAUDE_PLUGIN_ROOT}/knowledge/observability.md + relevant stack knowledge${CLAUDE_PLUGIN_ROOT}/knowledge/security-review.mdAlso: Search the project's docs/operators/runbooks/ for matching runbooks when investigating system issues.
Exit: Polarity determined, knowledge loaded, evidence available.
"I do not leap to the conclusions. First, I observe."
Entry: Evidence available (diff, files, error logs, system description).
Understand the full picture before analyzing:
Before investigating, search docs/solutions/ for matching symptoms or component names:
>> Known pattern: docs/solutions/{domain}/{topic}.md (high match) — verify if it applies hereIn autonomous mode: follow the evidence chain to its conclusion without intermediate check-ins. Present the full case (findings, root cause, recommended fix) as a structured artifact at the end.
See ${CLAUDE_PLUGIN_ROOT}/knowledge/active-memory-integration.md for retrieval patterns.
Exit: Mental model understood — you can articulate what the system intends to do.
"It is a capital mistake to theorize before one has data."
Entry: Mental model from Phase 1.
Apply deductive reasoning:
Follow the trail. When something catches your eye, trace it:
Eliminate the impossible: if a value can be null here and there's no null check, that's not suspicion — it's a deduction.
Exit: All premises listed and verified; trails followed to resolution or dead end.
"Every witness tells you something — even when they lie."
Entry: Trails identified from Phase 2.
Study surrounding context:
Exit: Tests, types, and callers reviewed — story is consistent or contradictions documented.
"Oh, I'm sorry to bother you again, but there's just one more thing..."
Entry: Core analysis complete.
The most important phase. Look for what's MISSING:
Keep nagging. The thing that seems minor is often the whole case.
Exit: "Missing things" catalog complete — every absence documented with a failure scenario.
"The game is afoot."
Entry: All phases 1-4 complete.
Synthesize. Problems hide at intersections:
Each finding must survive the Holmes test: given the evidence, is there any other explanation?
Exit: Findings synthesized with evidence.
Entry: Findings synthesized.
## Case: [Brief title]
### Scene Assessment
[2-3 sentences: what's happening, the mental model, initial impression]
### Findings
#### [CONCLUSIVE] Finding title
**Evidence:** [location] — [quote the evidence]
**Deduction:** [Why this IS a problem, with concrete failure scenario]
**Impact:** [What happens when this fails]
#### [SUSPICIOUS] Finding title
**Evidence:** [location] — [quote the evidence]
**Deduction:** [Why this looks wrong, what could go wrong]
**Recommendation:** [What to verify or fix]
#### [INVESTIGATE] Finding title
**Evidence:** [location] — [quote the evidence]
**Concern:** [What might be wrong but can't be proven from here]
**Question:** [What should be verified]
### Just One More Thing...
[Columbo's parting observations — what SHOULD be here but isn't.
Each with a concrete scenario of what goes wrong.]
### Case Summary
**Verdict:** CLEAN / MINOR CONCERNS / BUGS FOUND / CRITICAL ISSUES
**Confidence:** [How thoroughly investigated given the scope]
[1-2 sentence overall assessment]
Exit: Case report presented.
Entry: Case report presented.
Use AskUserQuestion with:
If user selects "Dig deeper": Use AskUserQuestion (header: "Finding", question: "Which finding to dig into?") with each finding as an option. Then return to Phase 2 focused on that trail.
Before delivering the case report, verify:
${CLAUDE_PLUGIN_ROOT}/knowledge/critical-evaluation.md — Evidence types, uncertainty flagging${CLAUDE_PLUGIN_ROOT}/knowledge/decision-frameworks.md — Prioritizing investigation depthWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
debugging, root-cause-analysis, investigation, deduction, code-analysis
npx claudepluginhub ondrej-svec/heart-of-gold-toolkit --plugin deep-thought11 skills in this plugin
/architectTurn brainstorm decisions into user stories, architecture doc, and ADRs. Use after brainstorming to define WHAT to build and HOW it fits together. Standalone or pipeline-aware via env vars. Triggers: architect, stories, architecture, design, ADR, define stories, write stories.
/architecture-reviewDeep architectural review of a platform or product — cross-references code against claims, maps failure modes, evaluates scaling bottlenecks, and produces a decision-grade handoff document with ADRs. Use when: reviewing an existing system for scaling readiness, performing a CTO handoff, evaluating platform architecture for enterprise readiness, or auditing a codebase before a major migration. Triggers: architecture review, scaling review, platform review, CTO handoff, system audit, scaling analysis, architecture assessment, production readiness.
/brainstormCollaborative discovery before planning. Explore the problem space, evaluate approaches, surface past work, and produce a structured brainstorm document. Triggers: brainstorm, explore, discovery, ideate, think through, what should we build, explore approaches.
/craft-skillMeta-skill that generates and refines SKILL.md files using the 12 prompting techniques as a quality checklist. The skill that writes skills. Triggers: craft skill, create skill, generate skill, write skill, skill template, meta prompt, improve skill, refine skill.
/ctoStrategic CTO advisor with structured sub-commands. Helps technical leaders navigate architecture decisions, organizational design, stakeholder communication, and AI-era challenges. Each sub-command applies a specific framework and produces a concrete artifact. Triggers: cto, pivot cost, hire case, decision map, tech strategy, team health, board prep, ai audit.
/expert-panelMulti-framework content review with convergent synthesis. Each lens applies a named analytical framework — grounded in published source material, not persona impersonation — to the target content. Parallel dispatch, web research or user-provided references, convergent synthesis, prioritized action list. Triggers: expert panel, expert review, expert audit, panel review, multi-lens review, framework review, content audit, workshop audit, strategy review, get expert feedback, advisory review.
Other plugins' skills for the same job