ported/20260310/all/skills-flat/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. This skill investigates and reports findings — it does NOT fix bugs.
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]
What this component does: Tests specific debugging hypotheses by gathering evidence through code tracing, diagnostic testing, git history analysis, and data inspection, then reports structured findings.
Capabilities needed:
Origin: Converted from agent bug-investigator — originally invoked as a sub-agent
Complexity hint: Originally ran on a sonnet model
Original tool scope: Read, Glob, Grep, Bash, SendMessage, TaskUpdate, TaskGet, TaskList
Adaptation guidance:
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.
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.
development
Prepare and execute a Python package release with verification steps. Use for releasing Python packages with uv and ruff.