ported/20260304-102613/dev-tools/skills/bug-investigator/SKILL.md
Executes diagnostic investigation tasks to test debugging hypotheses. Runs tests, traces execution, checks git history, and reports evidence. (converted from agent)
npx skillsauth add sequenzia/agent-alchemy bug-investigatorInstall 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.
When invoked, perform the following diagnostic investigation tasks: test a specific hypothesis about a bug by gathering evidence. Do NOT fix bugs — investigate them and report findings.
No external skills are required. This skill operates independently.
Given a hypothesis about a bug's root cause:
Follow the execution path to understand what actually happens:
Run targeted commands to observe behavior:
# Run the specific failing test in isolation
pytest -xvs path/to/test_file.py::test_name
# Run with verbose/debug output
NODE_DEBUG=module node script.js
# Check exit codes
command; echo "Exit code: $?"
Use version control to understand when and why:
# Who last changed the relevant code
git blame path/to/file.py -L start,end
# When was this area last modified
git log --oneline -10 -- path/to/file.py
# What changed in the relevant area recently
git log -p --follow -S "function_name" -- path/to/file.py
# Find the commit that introduced the bug
git bisect start
git bisect bad HEAD
git bisect good <known-good-commit>
Verify the runtime environment:
# Check environment variables
env | grep RELEVANT_PREFIX
# Verify file permissions
ls -la path/to/file
# Check running processes
ps aux | grep process_name
# Verify dependency versions
pip show package_name
npm list package_name
Examine actual vs expected data:
Report your findings in this format:
## Investigation Report
### Hypothesis Tested
[Restate the hypothesis you were asked to test]
### Verdict: Confirmed / Rejected / Inconclusive
### Evidence
#### Supporting Evidence
- [Concrete observation 1 with file:line references]
- [Concrete observation 2 with command output]
#### Contradicting Evidence
- [Any evidence that weakens the hypothesis]
### Key Findings
1. [Most important finding]
2. [Second finding]
3. [Third finding]
### Code References
| File | Lines | Observation |
|------|-------|-------------|
| path/to/file.py | 42-58 | Description of what this code does wrong |
### Recommendations
- [Suggested next investigation step if inconclusive]
- [Suggested fix direction if confirmed]
- [Related areas to check for similar issues]
This skill requires the ability to read files, search for files and content, and execute shell commands (for running tests, git commands, and diagnostic checks). It is a read-only investigation skill and does not modify source code.
This skill was converted from the bug-investigator agent in the dev-tools plugin package. It is typically delegated to by the bug-killer skill during Phase 3 (Root Cause Analysis, deep track) to test specific debugging hypotheses in parallel.
development
Systematic, hypothesis-driven debugging workflow with triage-based track routing. Use when asked to "fix this bug", "debug this", "why is this failing", "this is broken", "investigate this error", "track down this issue", or any debugging situation. Supports --deep flag to force full investigation.
development
Executes diagnostic investigation tasks to test debugging hypotheses. Runs tests, traces execution, checks git history, and reports evidence. (converted from agent)
content-media
Provides architectural pattern knowledge for designing feature implementations including MVC, event-driven, microservices, and CQRS patterns. Use when designing system architecture or choosing implementation patterns.
documentation
Provides Mermaid diagram syntax, best practices, and styling rules for technical visualizations. Use when creating diagrams, flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, architecture diagrams, C4 diagrams, or any visual documentation in markdown.