skills/investigate/SKILL.md
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.
npx skillsauth add eumemic/dev-skills investigateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
testing
This skill should be used when the user asks to "test this feature", "verify this works", "run tests", "check if this is working", "test thoroughly", or mentions testing a specific feature or fix.
tools
Drive a GitHub `shovel-ready` issue queue end-to-end — pick highest-ROI, TDD, /ship, /retro, merge; when empty, audit closed work and unlabeled candidates to refill it; otherwise wait for new labels. Use when the user invokes `/shovel-ready`, asks to "work the shovel-ready queue", "drain shovel-ready", "drive issues to merge", "autopilot on labeled issues", "issue-label queue", or sets up an autonomous-development loop on a GitHub-labeled issue tracker. GitHub-specific (uses `gh` CLI); skip for GitLab/Jira.
development
Drive a code change from working tree to a green PR — runs project checks, /simplify, code-review subagent, commits, opens PR, monitors CI. Stops when CI is green; caller handles merge. Use when invoked as `/ship`, or when another skill (e.g., `/shovel-ready`, `/kaizen`, `/bughunt`) hands off a working tree of changes to be shipped. Project-agnostic; reads check commands from CLAUDE.md.
development
Reflect on a slice of the current session (a single iteration, the whole session, or a natural pause point) to identify durable, codifiable learnings about workflow OR dev infrastructure — and ship them only if they clear a quality bar. Most invocations produce nothing; that's the point. Use when the user asks to "run a retro", "do a retrospective", "reflect on the session", "what did you learn", "improve skills based on this session", "codify learnings"; when invoked from a loop driver (`/shovel-ready`, `/kaizen`, `/bughunt`) with `--scope=iteration`; or **proactively at pause points** when the agent is waiting on async work (CI, autodev runs, monitor events) and has cycles to think meta.