OmniDebug Autopilot
// TODO: split SKILL.md into smaller modules/components
Universal debugging skill for apps, services, libraries, and scripts across mainstream stacks.
Default mode is autonomous execution: find root cause and ship a verified fix without pausing for user input.
Quick Start
Use this skill when requests include:
- "debug this"
- "fix this bug"
- "why is this failing"
- "find root cause"
- "auto fix"
Execution contract:
- Detect language, framework, package manager, and test runner.
- Reproduce the failure with a single deterministic command.
- Collect evidence from logs, traces, network, and failing tests.
- Isolate the smallest root cause (code, config, env, data, dependency, race, permissions).
- Apply the minimum correct fix.
- Re-run verification gates until green.
Non-Interruption Policy
- Do not ask follow-up questions during normal debugging.
- Continue autonomously through analysis, patching, and verification.
- Only stop when blocked by missing secrets, unavailable infrastructure, or destructive action risk.
- If blocked, use the safest fallback and continue as far as possible.
Mainstream Debug Process
Phase 1: Triage
- Capture exact error text and failing command.
- Use debugging tools first: console logs and network requests before code edits.
- Identify regression window from recent diffs if available.
- Determine scope: runtime error, failing test, build failure, performance issue, or security defect.
Phase 2: Reproduction
- Create one reproducible command.
- Remove noise by disabling unrelated jobs and minimizing input.
- Prefer deterministic seeds and controlled timing.
- Confirm failure reproduces at least twice.
- Browser-specific reproducibility rules:
- Pin browser (
chromium/firefox/webkit), viewport, locale, and timezone.
- Freeze test data and seed values.
- Disable retries during repro.
- Persist traces, screenshots, videos, and HAR files.
Phase 3: Evidence Collection
Collect only relevant artifacts:
- Console and application logs
- Test output with stack traces
- Network failures and status codes
- Runtime metrics (latency, memory, CPU) when performance related
- Config/env differences between working and failing contexts
- Browser artifacts bundle:
- Devtools console log export
- Failed request waterfall with request/response metadata
- Reproduction trace and screenshot at failure frame
- Browser/version and OS metadata
Phase 4: Root Cause Analysis
Use this chain:
- Symptom statement
- Immediate fault location
- Underlying mechanism
- Trigger condition
- Why safeguards missed it
Root cause must be a single falsifiable statement tied to evidence.
Phase 5: Fix Strategy
- Prefer the smallest change that resolves cause, not symptom masking.
- Keep public API behavior stable unless the bug requires a behavior correction.
- Add or update tests that fail before and pass after fix.
- Avoid temporary bypasses (
@ts-ignore, disabled tests, silent catches).
Phase 6: Verification Gates
All applicable gates must pass:
- Unit, integration, and e2e tests
- Lint and static analysis
- Type checks
- Build and package
- Relevant runtime smoke check
If any gate fails, loop back to Phase 4.
Browser Reproduction Module
Use these scripts for browser bug reproduction and fix validation:
# 1) Reproduce failure deterministically (expected to fail)
python scripts/repro_browser_issue.py \
--project-root . \
--repro-cmd "pnpm exec playwright test tests/bug.spec.ts --project=chromium --workers=1 --retries=0" \
--expect fail \
--runs 2
# 2) Capture browser debugging artifacts into one bundle
python scripts/capture_browser_artifacts.py --project-root . --output-dir .debug/browser-artifacts
# 3) Verify fix deterministically (expected to pass)
python scripts/verify_browser_fix.py \
--project-root . \
--verify-cmd "pnpm exec playwright test tests/bug.spec.ts --project=chromium --workers=1 --retries=0" \
--runs 2 \
--signature-file .debug/browser-repro/repro_report.json
Supported frameworks: Playwright, Cypress, Selenium, WebdriverIO.
Use project-native commands first; scripts only orchestrate repeatable debug workflow.
Stack Detection and Default Commands
| Stack |
Detect Signals |
Verify Commands |
| Node.js / TypeScript |
package.json, tsconfig.json |
pnpm test, pnpm lint, pnpm typecheck, pnpm build |
| Python |
pyproject.toml, requirements.txt |
pytest -q, ruff check ., mypy . |
| Go |
go.mod |
go test ./..., go vet ./... |
| Rust |
Cargo.toml |
cargo test, cargo clippy -- -D warnings |
| Java/Kotlin |
build.gradle, pom.xml |
./gradlew test, ./gradlew build or mvn test |
| Ruby |
Gemfile |
bundle exec rspec, bundle exec rubocop |
| PHP |
composer.json |
composer test, vendor/bin/phpunit |
| .NET |
*.sln, *.csproj |
dotnet test, dotnet build |
| Swift (iOS/macOS) |
Package.swift, *.xcodeproj |
swift test or xcodebuild test |
Pick commands from project scripts first; use defaults only if scripts are missing.
Auto-Fix Heuristics
Prioritize fixes in this order:
- Incorrect logic or branching
- Null and undefined handling at source
- Async and concurrency ordering
- Contract and schema mismatch
- Config and environment mismatch
- Dependency incompatibility
- Resource, path, or permission issues
For each candidate fix:
- Estimate blast radius
- Choose the lowest-risk valid option
- Verify with targeted tests, then full gates
Guardrails
- Never claim success without passing verification.
- Never skip tests to make status green.
- Never introduce permanent production
console.log noise.
- Never hardcode secrets or private endpoints.
- Preserve existing style and architecture conventions.
Completion Criteria
A task is complete only when all are true:
- Reproduction exists for the original failure
- Root cause statement is evidence-backed
- Fix addresses root cause directly
- Verification gates pass
- Regression coverage is added or updated
Output Format
Return concise sections:
- Root cause
- Applied fix
- Verification commands and results
- Remaining risk (if any)
Resources
references/browser-repro-playbook.md
references/browser-artifact-checklist.md
scripts/repro_browser_issue.py
scripts/capture_browser_artifacts.py
scripts/verify_browser_fix.py
1---2name: omnidebug-autopilot3description: Autonomous end-to-end debugging skill for any codebase, language, and framework. Detects stack, reproduces failures, isolates root cause, applies minimal safe fixes, and verifies with tests/build/lint without user interruption.4license: MIT5---67# OmniDebug Autopilot89// TODO: split SKILL.md into smaller modules/components1011Universal debugging skill for apps, services, libraries, and scripts across mainstream stacks.12Default mode is autonomous execution: find root cause and ship a verified fix without pausing for user input.1314## Quick Start1516Use this skill when requests include:17- "debug this"18- "fix this bug"19- "why is this failing"20- "find root cause"21- "auto fix"2223Execution contract:241. Detect language, framework, package manager, and test runner.252. Reproduce the failure with a single deterministic command.263. Collect evidence from logs, traces, network, and failing tests.274. Isolate the smallest root cause (code, config, env, data, dependency, race, permissions).285. Apply the minimum correct fix.296. Re-run verification gates until green.3031## Non-Interruption Policy3233- Do not ask follow-up questions during normal debugging.34- Continue autonomously through analysis, patching, and verification.35- Only stop when blocked by missing secrets, unavailable infrastructure, or destructive action risk.36- If blocked, use the safest fallback and continue as far as possible.3738## Mainstream Debug Process3940### Phase 1: Triage4142- Capture exact error text and failing command.43- Use debugging tools first: console logs and network requests before code edits.44- Identify regression window from recent diffs if available.45- Determine scope: runtime error, failing test, build failure, performance issue, or security defect.4647### Phase 2: Reproduction4849- Create one reproducible command.50- Remove noise by disabling unrelated jobs and minimizing input.51- Prefer deterministic seeds and controlled timing.52- Confirm failure reproduces at least twice.53- Browser-specific reproducibility rules:54 - Pin browser (`chromium`/`firefox`/`webkit`), viewport, locale, and timezone.55 - Freeze test data and seed values.56 - Disable retries during repro.57 - Persist traces, screenshots, videos, and HAR files.5859### Phase 3: Evidence Collection6061Collect only relevant artifacts:62- Console and application logs63- Test output with stack traces64- Network failures and status codes65- Runtime metrics (latency, memory, CPU) when performance related66- Config/env differences between working and failing contexts67- Browser artifacts bundle:68 - Devtools console log export69 - Failed request waterfall with request/response metadata70 - Reproduction trace and screenshot at failure frame71 - Browser/version and OS metadata7273### Phase 4: Root Cause Analysis7475Use this chain:761. Symptom statement772. Immediate fault location783. Underlying mechanism794. Trigger condition805. Why safeguards missed it8182Root cause must be a single falsifiable statement tied to evidence.8384### Phase 5: Fix Strategy8586- Prefer the smallest change that resolves cause, not symptom masking.87- Keep public API behavior stable unless the bug requires a behavior correction.88- Add or update tests that fail before and pass after fix.89- Avoid temporary bypasses (`@ts-ignore`, disabled tests, silent catches).9091### Phase 6: Verification Gates9293All applicable gates must pass:94- Unit, integration, and e2e tests95- Lint and static analysis96- Type checks97- Build and package98- Relevant runtime smoke check99100If any gate fails, loop back to Phase 4.101102## Browser Reproduction Module103104Use these scripts for browser bug reproduction and fix validation:105106```bash107# 1) Reproduce failure deterministically (expected to fail)108python scripts/repro_browser_issue.py \109 --project-root . \110 --repro-cmd "pnpm exec playwright test tests/bug.spec.ts --project=chromium --workers=1 --retries=0" \111 --expect fail \112 --runs 2113114# 2) Capture browser debugging artifacts into one bundle115python scripts/capture_browser_artifacts.py --project-root . --output-dir .debug/browser-artifacts116117# 3) Verify fix deterministically (expected to pass)118python scripts/verify_browser_fix.py \119 --project-root . \120 --verify-cmd "pnpm exec playwright test tests/bug.spec.ts --project=chromium --workers=1 --retries=0" \121 --runs 2 \122 --signature-file .debug/browser-repro/repro_report.json123```124125Supported frameworks: Playwright, Cypress, Selenium, WebdriverIO.126Use project-native commands first; scripts only orchestrate repeatable debug workflow.127128## Stack Detection and Default Commands129130| Stack | Detect Signals | Verify Commands |131|------|----------------|----------------|132| Node.js / TypeScript | `package.json`, `tsconfig.json` | `pnpm test`, `pnpm lint`, `pnpm typecheck`, `pnpm build` |133| Python | `pyproject.toml`, `requirements.txt` | `pytest -q`, `ruff check .`, `mypy .` |134| Go | `go.mod` | `go test ./...`, `go vet ./...` |135| Rust | `Cargo.toml` | `cargo test`, `cargo clippy -- -D warnings` |136| Java/Kotlin | `build.gradle`, `pom.xml` | `./gradlew test`, `./gradlew build` or `mvn test` |137| Ruby | `Gemfile` | `bundle exec rspec`, `bundle exec rubocop` |138| PHP | `composer.json` | `composer test`, `vendor/bin/phpunit` |139| .NET | `*.sln`, `*.csproj` | `dotnet test`, `dotnet build` |140| Swift (iOS/macOS) | `Package.swift`, `*.xcodeproj` | `swift test` or `xcodebuild test` |141142Pick commands from project scripts first; use defaults only if scripts are missing.143144## Auto-Fix Heuristics145146Prioritize fixes in this order:1471. Incorrect logic or branching1482. Null and undefined handling at source1493. Async and concurrency ordering1504. Contract and schema mismatch1515. Config and environment mismatch1526. Dependency incompatibility1537. Resource, path, or permission issues154155For each candidate fix:156- Estimate blast radius157- Choose the lowest-risk valid option158- Verify with targeted tests, then full gates159160## Guardrails161162- Never claim success without passing verification.163- Never skip tests to make status green.164- Never introduce permanent production `console.log` noise.165- Never hardcode secrets or private endpoints.166- Preserve existing style and architecture conventions.167168## Completion Criteria169170A task is complete only when all are true:171- Reproduction exists for the original failure172- Root cause statement is evidence-backed173- Fix addresses root cause directly174- Verification gates pass175- Regression coverage is added or updated176177## Output Format178179Return concise sections:1801. Root cause1812. Applied fix1823. Verification commands and results1834. Remaining risk (if any)184185## Resources186187- `references/browser-repro-playbook.md`188- `references/browser-artifact-checklist.md`189- `scripts/repro_browser_issue.py`190- `scripts/capture_browser_artifacts.py`191- `scripts/verify_browser_fix.py`