From patchy-bot
Master orchestration skill for systematic debugging, root cause analysis, and fix implementation. This skill should be used when the user says "fix this bug", "debug this", "something is broken", "this error", "not working", "investigate this failure", "troubleshoot", "fix this issue", "what's wrong", "crash", "exception", "traceback", "stack trace", "error message", "failing test", "regression", "debug-fix", "/debug-fix", or when any error, bug, failure, or unexpected behavior needs to be diagnosed and resolved. Sequences 22+ skills across 5 phases: diagnose → plan fix → implement fix → verify fix → close. Combines dual-debugger methodology (debugger + debugging-wizard) with TDD-driven fixes and full post-fix verification. NOT for greenfield implementation (use /code-changes) or read-only analysis (use /read-only-plans) or post-completion audits (use /post-changes-audit).
npx claudepluginhub kman182401/patchy-operationalThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
$ARGUMENTS
Execute debugging and fix implementation through five mandatory phases. The dual-debugger approach (debugger + debugging-wizard) is mandatory — both must run on every bug investigation.
Goal: Understand the bug completely before attempting any fix.
Sequential — diagnosis must be thorough before fixing.
/debug — First-pass debugging. Reproduce the issue, gather error output, identify the failing component, and narrow down the failure location./debugging-wizard — Second-pass systematic debugging. Apply hypothesis-driven methodology: reproduce → isolate → hypothesize → test each hypothesis → identify root cause. Both debugger skills are mandatory per project rules — they catch different classes of issues./researcher — If the bug involves external libraries, APIs, or unfamiliar patterns, research current known issues, changelogs, migration guides, and community reports. Check for known bugs in the specific versions involved./expert-analysis — If the root cause is unclear after initial debugging, perform deep evidence-first investigation. Analyze the surrounding code, data flow, state transitions, and failure modes./analyze — Review the broader context around the bug. Check for related issues, similar patterns elsewhere in the codebase, and second-order effects that may have contributed.Spawn domain agents in parallel where applicable:
error-detective agentperformance-engineer agentsecurity-engineer agentGoal: Design the fix before implementing it.
Sequential — plan must be complete before coding.
/plan-builder — Produce a focused fix plan: root cause summary, proposed fix approach, files to modify, risk of regression, and validation criteria./assumptions-audit — Audit assumptions in the fix plan. Verify that the root cause diagnosis is correct, that the proposed fix addresses it, and that no hidden dependencies will break./scope-guard — Lock the fix scope. Define exactly which files and functions will change. Flag any temptation to "fix nearby issues while we're here" as scope creep./reuse-check — Before implementing the fix, check if a solution pattern already exists in the codebase. Avoid reinventing existing error-handling, retry logic, or validation patterns./the-fool — Challenge the fix approach. Ask: "Is this fixing the symptom or the root cause?" "What could go wrong with this fix?" "Is there a simpler approach?"/subagent-driven-development — Identify which domain agents should implement the fix./dispatching-parallel-agents — Determine parallel vs. sequential dispatch for fix implementation.Goal: Implement the fix with TDD discipline and safety controls.
Mixed — follow dispatch decisions from Phase 2.
/tdd-workflow — Write a failing test that reproduces the bug FIRST. Confirm the test fails (RED). Then implement the minimal fix to make it pass (GREEN). Then refactor if needed. This is mandatory — no fix ships without a regression test./full-orchestration — Activate full orchestration to ensure domain agents and skills are properly dispatched for the fix implementation./plan-implementation — Execute the fix plan milestone by milestone./secure-code-guardian — If the fix touches security-sensitive code (auth, input handling, crypto, permissions), apply security controls during implementation./simplify — After the fix is implemented, review for unnecessary complexity introduced by the fix. Ensure the fix is minimal and clean./linter — Auto-lint every file modified during the fix.Task manager checkpoint:
19. /tm:update-task — Update task tracker with fix progress.
Goal: Prove the fix works and didn't break anything else.
Sequential — each step validates a different dimension.
/test-runner — Run the full test suite for all touched modules. The new regression test must pass. All existing tests must still pass. Report coverage./security-review — Scan all changed files for security issues. Fixes under pressure are prone to introducing new vulnerabilities./diff-review — Inspect the git diff for debug leftovers, accidental changes, and scope violations. Fixes often include temporary debugging code that shouldn't ship./verification-loop — Run the complete verification chain: build → typecheck → lint → test → security scan → diff review./analyze — Post-fix deep review. Verify the fix is correct, complete, and doesn't introduce second-order problems. Check that the root cause is actually addressed, not just the symptom.Goal: Clean handoff with evidence that the bug is resolved.
/tm:update-task — Final status update with: root cause summary, fix description, test evidence, and any remaining risks./requesting-code-review./finishing-a-development-branch.Both /debug AND /debugging-wizard must run on every bug investigation. This is a project rule, not a suggestion.
/debug provides rapid first-pass diagnosis and reproduction/debugging-wizard provides systematic hypothesis-driven methodologyStop execution and report if:
security-review flags CRITICAL findings introduced by the fixBefore claiming the bug is fixed, confirm every applicable skill was invoked: