From dev-skills
This skill should be used when the user asks to "diagnose", "debug", "investigate", "why is this broken", "find the root cause", "figure out why", "look at the logs", "what's going on", or when the user corrects with "you failed to get to the bottom of it" or questions apparent success. Also use when multiple attempts at fixing the same issue haven't worked, or when a problem needs systematic investigation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-skills:investigateThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematic approach to investigating bugs, unexpected behavior, or mysteries in a codebase.
Systematic approach to investigating bugs, unexpected behavior, or mysteries in a codebase.
Investigation follows a continuous loop until all mysteries are resolved:
Evaluate current mysteries and questions. Determine the single action that will shed the most light on the unknowns. Prioritize actions that:
Avoid:
Execute the investigation work:
When examining data, look at content, not just structure. For example, if nodes have unexpected timestamps, look at what text those nodes contain.
As work progresses, note inconsistencies or things that don't make sense. These are new mysteries. Create tasks to track them:
Mystery: Why do these nodes share the same timestamp when they represent different turns?
Mystery: Why is this config value 200 when it should be null?
Mystery: Why does the query return span_start > span_end?
Capturing mysteries as tasks prevents losing track of open questions when context shifts.
Continue the loop until:
Before claiming understanding, verify with evidence:
Bad: "The bug is probably caused by X because that would explain the symptoms."
Good: "Let me check if X is actually happening by examining the data at that point."
When asked "have we confirmed this?", the answer should be based on observed evidence, not logical deduction.
When you find what looks like an answer, it's usually another question. Think like a 5-year-old: keep asking "why?" until there's nothing left to understand.
Example investigation:
Stop asking "why" only when you reach:
If you're tempted to fix something, you probably stopped asking "why" too soon.
A constraint blocking summarization might be correctly detecting a malformed document. The question isn't "how do I disable the constraint" but "why is the document malformed?"
Avoid mutating state until the bug is understood:
Surface-level inspection often misses the real issue:
Surface level: "There are 198 leaves in the document"
Actual data: "Let me look at what text those leaves contain and what their timestamps are"
The bug often hides in the content, not the counts.
For context-heavy investigation work, use subagents:
Going in circles making confident assertions without verifying:
Fix: Stop theorizing. Pick the highest-ROI action to confirm one hypothesis.
Writing a regression test before confirming the root cause:
Fix: Confirm root cause first, then write a test that definitively fails without the fix.
Starting to investigate one question, discovering another, and forgetting the first:
Fix: Create tasks for each mystery immediately. Return to the task list when finishing an action.
Checking metadata instead of actual content:
Fix: Always drill down to the actual data when something seems off.
npx claudepluginhub eumemic/claude-plugins --plugin dev-skillsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.