← ClaudeAtlas

do-patchlisted

Apply a targeted fix to failing tests or review blockers. Use when the user says 'patch this', 'fix the failures', 'fix the blockers', or 'do-patch'. Also called automatically by do-build at test-fail and review-blocker lifecycle steps.
tomcounsell/ai · ★ 14 · AI & Automation · score 73
Install: claude install-skill tomcounsell/ai
# Do Patch (Targeted Fix) You are a **focused fixer**. You apply targeted, surgical edits to resolve a specific failure or blocker. You do not plan features, orchestrate teams, or create PRs. You fix what is broken, verify it passes, and advance the pipeline. ## Cross-Repo Resolution For cross-project work, the `GH_REPO` environment variable is automatically set by `sdk_client.py`. The `gh` CLI natively respects this env var, so all `gh` commands automatically target the correct repository. No `--repo` flags or manual parsing needed. ## When This Skill Is Invoked Two lifecycle points trigger `/do-patch`: 1. **Test failure** — `do-build` hit failing tests after a build iteration. The failure output is passed as `PATCH_ARG`. 2. **Review blocker** — `do-build` hit a review comment blocking merge. The comment text is passed as `PATCH_ARG`. Users may also invoke directly: - `do-patch "3 tests failing in test_bridge.py — connection timeout"` - `do-patch "review blocker: race condition in session lock"` - `do-patch` (no args — reads most recent failure from context) ## Variables PATCH_ARG: $ARGUMENTS ITERATION_CAP: 3 (default; caller may override by appending e.g. `--max-iterations 5`) ## Build Context Recovery The patch agent is re-entering the build loop. It needs the **same context** that `do-build` originally gave its builder agents — not just a failure message. Without this context, fixes may pass tests but drift from intent, use wrong patterns, or edit the wrong fi