Install
openclaw skills install shadows-bug-hunterStructured debugging with 4 techniques — Log Injection, Screenshot Analysis, Manual Trace, Test-Driven Fix. Use when facing errors, broken UI, regressions, or runtime issues.
openclaw skills install shadows-bug-hunterVersion: 1.1.0 | Author: Shadows Company | License: MIT
Required:
git — Used in Triage step to inspect recent changes via git log --oneline -10. Detection: which git or git --version.Optional (auto-detected per project):
pytest — Python test runner, used in Technique 4. Detected via python -m pytest --version or presence of pytest.ini / pyproject.toml [tool.pytest].jest — JavaScript test runner, used in Technique 4. Detected via npx jest --version or presence of jest.config.*.vitest — Vite-based test runner, used in Technique 4. Detected via npx vitest --version or presence of vitest.config.*.If no test runner is detected, Technique 4 (Test-Driven Fix) is limited to writing the test file — execution must be deferred.
Before choosing a technique, run Triage first:
git log --oneline -10Based on triage, select the most appropriate technique:
console.log / print() at key decision points[LOG] function_name() called with: {params}
[LOG] function_name() returned: {result}
[LOG] condition_check: variable = {value}
WARNING: This technique temporarily modifies source files. All injected debug code MUST be removed before any commit. See CLEANUP GUARANTEE below.
python -m pytest {test_file} -x -q or npx jest {test_file} or npx vitest run {test_file}python -m pytest -x -q or npx jest or npx vitest runNOTE: Technique 4 executes the project's test suite, which runs repository code. Only use on trusted repositories or within a sandboxed environment.
TRIAGE → SELECT TECHNIQUE → INVESTIGATE → HYPOTHESIZE → FIX → VERIFY → CLEANUP
After every fix, the agent MUST perform a final verification pass:
grep -n "\\[LOG\\]\|console\\.log\|print(\|debugger\|# DEBUG\|// DEBUG" {modified_files}This step is non-negotiable and applies to all techniques, not just Technique 1.
git log (read-only). Technique 4 runs project test suites (pytest, jest, vitest) which execute repository code.## Bug Report
- **Error**: [exact error message]
- **Severity**: [Crash/Wrong Result/Visual/Performance]
- **Reproducible**: [Yes/No + steps]
## Root Cause
[Explanation of why the bug occurs]
## Fix Applied
[Description of the fix with file:line references]
## Verification
- [x] Original bug resolved
- [x] Tests pass
- [x] No debug artifacts remain
Published by Shadows Company — "We work in the shadows to serve the Light."