Skip to content
Back to skills

Build Guard

ASecurity

Use when implementing features, refactors, or multi-file changes. Orchestrated plan-then-execute with subagent dispatch and regression checkpoints.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
developmentgorails

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add cukas/patrol --skill build-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Build Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Build Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cukas-build-guard/badge)](https://www.skillsdirectory.com/skills/cukas-build-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: build-guard
description: Use when implementing features, refactors, or multi-file changes. Orchestrated plan-then-execute with subagent dispatch and regression checkpoints.
---

# Build-Guard

Plan in isolation, implement with guardrails. Fully autonomous after approval.

## Phase 1 — PLAN (read-only)

1. **Enter plan mode** — call `EnterPlanMode`. No code changes until Phase 2
2. **Explore** — use Read, Grep, Glob to understand every file related to the task, plus their direct callers and dependents
3. **Write a numbered plan:**
   - Each file to change and what changes are needed
   - Dependencies between changes (order matters)
   - Potential regression risks per change
   - Estimated complexity: **small** (1-2 files), **medium** (3-5 files), **large** (6+ files)
4. **Present the plan** for user approval

```dot
digraph plan_decision {
    "Plan approved" [shape=diamond];
    "Small (1-2 files)" [shape=diamond];
    "Exit plan mode, implement inline" [shape=box];
    "Exit plan mode, dispatch subagents" [shape=box];
    "Context heavy?" [shape=diamond];
    "Handoff plan, clear context, resume" [shape=box];

    "Plan approved" -> "Small (1-2 files)";
    "Small (1-2 files)" -> "Exit plan mode, implement inline" [label="yes"];
    "Small (1-2 files)" -> "Context heavy?" [label="no"];
    "Context heavy?" -> "Handoff plan, clear context, resume" [label="yes"];
    "Context heavy?" -> "Exit plan mode, dispatch subagents" [label="no"];
}
```

**If context is heavy after planning** (exploration consumed significant context): run `/handoff` to save the plan, then the user can clear context and resume with full budget for implementation. If remembrall is not installed, save the plan to `docs/plans/` as a file instead.

## Phase 2 — IMPLEMENT

5. **Exit plan mode** — call `ExitPlanMode`

**Small plans (1-2 files):** implement directly, one file at a time.

**Medium/large plans:** dispatch subagents.
- One subagent per file or logical chunk (files that must change together)
- Each subagent receives: the plan, its specific task, and relevant file context
- Use `Agent` tool with a clear prompt describing exactly what to change and why

6. **After each file/subagent completes:**
   - Review the changes (read the modified files)
   - Run the project's type checker — fix errors before moving on
7. **After every 3 completed files**, or sooner if a change touches a shared interface:
   - Run the full test suite
   - If any test breaks: **stop immediately**, analyze root cause, explain before continuing
   - If the approach is fundamentally wrong: revise the plan, inform the user
8. **After all changes:** run the full test suite and type checker one final time

## Phase 3 — VERIFY

9. **Invoke `review-gate`** — execute the review-gate skill now. Do not declare done until review-gate has completed and all findings are resolved

## Rules

- Never skip the plan phase
- Never batch multiple file changes between verification steps
- If no test suite exists: state this, verify manually by reading affected code paths
- If no type checker exists: skip type checking, proceed with tests
- If patrol plugin is active: comply with its warnings. Read files before editing
- If remembrall nudges about context: run `/handoff` before continuing
- Never declare done without completing review-gate — non-negotiable

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.