Skip to content
Back to skills

Feature Build

ASecurity

Builds a feature's PLAN.md task by task: a builder subagent implements, a reviewer subagent gates, and each task commits only on pass. Use once feature-plan has an ordered task list and it's time to write code.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 15, 2026
developmentgobashnodetestingdebugginggitapidatabasefrontendsecurity

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add mattbrailsford/umbraco-devkit --skill feature-build --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Feature Build?

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

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

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: feature-build
description: >-
  Builds a feature's PLAN.md task by task: a builder subagent implements, a reviewer
  subagent gates, and each task commits only on pass. Use once feature-plan has an ordered
  task list and it's time to write code.
user-invocable: true
argument-hint: "[feature slug or plan folder path, optional] [--task T<n>]"
---

# feature-build

> 🎯 **Design for change.** Each task's diff should be small, local, and behind a stable
> seam. The reviewer fails work that couples modules or bloats blast radius; the builder
> should pre-empt that.

Execute the task checklist in a feature's plan folder, one task at a time. You are the
orchestrator. You do **not** write or review feature code yourself. You dispatch to the
`builder` and `reviewer` subagents and gate on their verdicts.

**On the gate granularity:** review runs before every commit, not once at the end, so a bad
task is caught before it compounds into the next. This is the default, not optional. It
doesn't replace the whole-feature review (see "Finish"); the two catch different things.

## Scope

- IN: build each unchecked task, get it through review, commit it.
- OUT: planning, writing the task list, authoring specs — this **consumes** a plan, it
  doesn't author one.

## Preflight

1. Resolve the plan folder: the path or feature slug given in the argument; else, if the
   current branch/worktree name matches a plan folder under the project's convention (see
   `CLAUDE.md`'s "Finding the current feature's plan folder" rule; the normal case when
   resuming), use that match; else **stop and ask**. Don't guess. Its name is the feature slug
   used below for the branch/worktree.
2. Read `PLAN.md`. It must be a checklist (`- [ ]` / `- [x]`). If it has no checkboxes, stop
   and send the user to `feature-plan`.
3. **Resuming or first run?** If any task in `PLAN.md` is already `- [x]`, or `BUILD-LOG.md`
   has entries, an earlier run already cut the branch/worktree: skip to step 5. Otherwise
   continue to step 4.
4. **Cut the feature's branch/worktree.** The one point in the pipeline that touches git
   before feature code exists (see `git-workflow`'s "Branch/worktree per feature" section).
   **Already in a worktree made for this feature** (`git rev-parse --git-dir` differs from
   `--git-common-dir`, the branch isn't trunk, and the branch name with its `vN/` and type
   prefix stripped is exactly `<feature-slug>`, as `git-workflow`'s "Already in a worktree
   made for this work" says): that worktree is the feature's, so don't cut another. In a
   linked worktree whose branch names other work, stop and ask: don't commit the plan there,
   and don't cut a worktree from inside it. Run 4.1, then ask only whether to push the branch and open a draft PR (with
   any waiting review comments, as 4.3 says), commit the plan folder on the current branch as
   4.4 does, and go to step 5. Nothing touches trunk on this path. Otherwise, in order:
   1. Confirm the working tree is clean *except* for the plan folder and any new or refreshed
      mockup starters in `docs/mockups/starters/` (`feature-explore`/`feature-design`/`feature-plan` never
      commit them). Any *other* uncommitted change is unrelated work; stop and report.
   2. Confirm you're on the project's trunk branch (see `CLAUDE.md`'s Feature workflow
      section). If not, stop and ask. Don't guess which branch to fork from.
   3. **Ask the user to confirm before running any of this.** It commits to trunk, which the
      "always ask before touching main" rule covers however small the change. The same
      question asks to push the branch and open a draft PR once it's cut (step 8). First
      check the plan folder for unresolved review comments (`markdown-preview`'s "Comments before moving
      on"), and put any that are waiting on the user into this same question, so a plan with
      an open question isn't committed and built without them knowing.
   4. Commit the plan folder as-is, on trunk, with any changed project starters: `git add
      <plan-folder> docs/mockups/starters && git commit -m "docs: add plan folder for
      <feature-slug>"`.
   5. Create the branch/worktree named after `<feature-slug>`, off that commit. Prefer Claude
      Code's native worktree mechanism (`isolation: "worktree"` on the `Agent` tool, or the
      project's `WorktreeCreate` hook) so the project decides the real branch name and
      location; else fall back to `git checkout -b <feature-slug>` off trunk. Never invent a
      separate worktree/branch mechanism.
5. Before touching code, confirm `pwd` and the current branch match `<feature-slug>` (or
   whatever the project's hook named it), and that the plan-folder commit is in the new
   branch's history (`git log --oneline -5`). A `WorktreeCreate` hook that branches from
   `origin/<trunk>` instead of local trunk silently leaves out a commit that was never pushed.
   If it's missing, remove the worktree, ask the user before pushing trunk, then create it
   again.
6. **Check the demo/test site is worktree-safe, if one exists.** Check its `.csproj`
   references `Umbraco.Community.WorktreeDevPort`. Without it, the site runs on a fixed port
   (two worktrees smoke-testing at once collide, and it looks like a broken build) or on a
   random `:0` port nothing can find. If missing, **stop and flag it** and suggest re-running
   `project-init`; its "Demo site ports" step adds the package and fixes anything that finds the
   site by a hardcoded port. No demo/test site: this step is a no-op.
7. **Start the demo site once, if there is one.** From the worktree, run the start command in
   `CLAUDE.md`'s "Build & test" in the background, its output going to a log file outside the
   repo, and wait until the site answers. The port comes from `git wdp-port`. Put a
   `Demo site:` line at the top of `BUILD-LOG.md` with its URL, the start command and the log
   path. That one site serves the whole build: every `builder` and `smoke-tester` in the loop
   gets the line, and none starts another. On a resumed run, read the line back, and start the
   site the same way if it doesn't answer.
8. **Open the draft PR**, if the user said yes in step 4: push the branch and invoke
   `pr-describe --start` with the plan folder, as `git-workflow`'s "Draft PR while a build
   runs" says. Its `PR:` line goes at the top of `BUILD-LOG.md`. On a resumed run, read the
   line back; a log with no `PR:` line means the user said no, so push nothing until Finish.

## The loop

For each task still unchecked (`- [ ]`) in `PLAN.md`, in order, top to bottom. With a draft
PR open, first read its new comments, as `git-workflow`'s "Draft PR while a build runs" says:
a comment asking for a change stops the loop here, before the next task starts.

**One runner per task.** This session doesn't run a task's steps itself. It dispatches one
`general-purpose` agent (Agent tool, model sonnet) per task, told to invoke `feature-build`
with `<plan folder> --task T<n>`, and waits for it before the next task. Never two at once.
A task's builder, checks, review rounds and smoke reports then stay in the runner, and this
session keeps one short report per task, so the last task costs no more than the first.

The runner returns one of these, in under ten lines:

- **Done:** the task commit's SHA and the `--verified` line.
- **Stopped:** the task, why (a gate still failing after the rethink round, a design that's
  wrong, a check that can't run), its findings, and what's committed.
- **Question:** what it needs the user to decide, and where it left the task.

On a question, ask the user, then send the answer to the same runner with `SendMessage` to
its agent ID, so it carries on with its builder and findings intact. Start a new runner only
when that one can't be reached; the "Resuming mid-task" rule picks up its uncommitted
changes. On stopped, stop the loop and report. If the Agent tool can't start a runner here,
run the steps below in this session instead. A skill that follows this loop over its own file
rather than a plan folder (`change-build`, `major-upgrade`) dispatches its runners the same
way, told to invoke itself with its own argument and `--task <n>`.

**Where a runner is at.** A task can run for a long time with nothing to show in this session.
So tell each runner to keep one status line in `.umbraco-devkit/runners/<task>.md` (`T3.md`,
or `<n>.md` for a task list), in this worktree, creating `.umbraco-devkit/.gitignore` holding
`*` if it isn't there. It overwrites the file, never appends, as each step starts: the step
and what it's doing in a few words, such as `review round 2: builder fixing 3 findings` or
`smoke: running the e2e test`. The file's modified time says since when.

- **Asked where things are at**, or prompted to say what it's doing while a runner works,
  this session reads that file and the modified time, and answers from them:
  `T3: review round 2, builder fixing 3 findings (since 10:42)`, with the tasks already done.
  Never just "waiting on background work".
- **Only that file.** Never read the runner's transcript, its diff or its agents' reports to
  answer; they're what the runner exists to keep out of this session.
- **No timer.** Don't check on a runner unasked. It reports when it's done.
- **Stuck?** A line unchanged for 30 minutes is worth saying so; the user decides whether to
  stop it.
- **When it reports,** delete its file. `BUILD-LOG.md` holds the outcome.

### Running one task (`--task T<n>`)

With `--task`, run Preflight steps 1, 2 and 5 only: the branch, site and draft PR already
exist. Read the `Demo site:` and `PR:` lines from `BUILD-LOG.md`. Then run steps 1 to 6 below
for that task alone, and return the report above. Never ask the user anything yourself: the
loop's session is the one they're talking to, so return a question instead. The "Rules" below
apply to the runner as they would to this session.

1. **Build.** If the task changes an existing screen, first dispatch a `smoke-tester` to
   capture it as `screenshots/<screen>-before.png`, with the screen's click path. Once the
   builder starts, the old screen is gone, and the PR needs before and after.

   Then dispatch a `builder` subagent (Agent tool, `subagent_type: builder`, model
   sonnet). Give it: the exact task text, the relevant sections of `ARCHITECTURE.md` and
   `SPEC.md`, the path to any mockup for a screen the task touches, the files/extension points
   it owns, and an instruction to invoke the project's
   stack skills (`umbraco-extensibility`, `umbraco-package-conventions`, `ef-core-data`,
   `umbraco-backoffice-conventions`, etc. as relevant) and run the existing specs before
   reporting back. Ask it to start its report with the skills it loaded, so a skipped one
   shows. If the project has e2e tests and none covers the task's path, tell the builder to
   add one (the smoke step runs it). Give it the `Demo site:` line, for the task's e2e test.
   Give it the pre-review check command below, to run and fix before it reports. The builder
   does not commit.

2. **Pre-review checks.** Run `node "${CLAUDE_PLUGIN_ROOT}/checks/run.mjs"` in the task's
   worktree. It checks the uncommitted changes for slips a script can catch: a file that
   isn't UTF-8, a link into a plan folder, `unsafeHTML` with no `sanitizeHTML`, a new file
   git doesn't track, and shortcuts to a green build (a test switched off, a warning
   suppressed with no reason, an empty `catch`, a fixed wait in a test). Exit 1 prints one
   finding per line: send them to the task's `builder` as the round's findings, as step 4's
   "Same builder" says, and run the checks again, before any review. A finding the builder kept, with its reason, goes to the
   `reviewer` to judge instead of another round. Exit 2 means the
   checks couldn't run: note it in `BUILD-LOG.md` and go on to review. A project adds its own
   checks as `.mjs` files in `.claude/checks/`, and turns one off by name in
   `.claude/checks/config.json` (`{ "disabled": ["untracked"] }`); see the header of
   `run.mjs` for the shape.

3. **Review.** Dispatch a `reviewer` subagent (Agent tool, `subagent_type: reviewer`, model
   opus, must be ≥ builder). It invokes `umbraco-security` (when the diff
   touches security) and the relevant stack skills, reads the builder's diff, and returns `PASS` or
   `FAIL` with specific findings. Ask it, too, to start its report with the skills it loaded.

4. **Recurse.** If `FAIL`: send the findings to the task's `builder`, then run the
   pre-review checks (step 2) and review again. Nothing reaches git history before
   `PASS`. If a finding is a repeatable mistake a future `builder` would likely make on
   another task, write it to `.claude/memory/` (type: `gotcha`) once fixed.
   - **Same builder.** Send each fix round to the builder that built the task, with
     `SendMessage` to its agent ID, not a new `builder`. It already holds the task, the
     files it read and why it chose what it did; a new one loads its skills and reads it all
     again. The message gives the round's findings and asks for the same report as before.
     Dispatch a new `builder` only when that one can't be reached (the session restarted, or
     the agent is gone), with the task text, the plan sections and the findings.
   - **Re-review the round, not the task.** Before each fix round, snapshot the tree
     (`git add -A && git write-tree`, which stages but doesn't commit). After it, give the
     `reviewer` the previous round's findings and the round's diff
     (`git add -A && git diff --cached <tree>`), so it runs its "Re-review rounds" mode.
     Reviewing the whole task again each round mostly finds older code, not the fix, and
     the loop stops converging.
   - **Three rounds, then rethink.** After the third `FAIL` on one task, don't send a fourth
     patch. Dispatch one fresh `builder` with every round's findings, told to reconsider the
     approach rather than patch the last finding, and review its result in full. If that
     fails too, stop and report the task and its findings. If the findings show the design
     is wrong, not the code, hand off to `feature-design`.

5. **Smoke the real entry point.** Before commit, exercise the deployed artifact. Use the
   first of these the project has:
   - **An end-to-end (e2e) test suite.** Run the e2e test covering the task's path. If none
     covers it, the builder adds one as part of the task. A suite passing without touching
     the new code proves nothing.
   - **A demo site.** Drive the backoffice UI (Playwright or equivalent) through the change,
     or send one real request through the Management API controller for a change with no
     screen.
   - **Neither**, because you're building the host itself (like Umbraco CMS), not a package
     installed into one: a thorough integration test that boots the real hosting/DI pipeline
     (not a unit test through an internal seam) is the equivalent gate.

   Fakes for external services are fine in all three; the request must travel through the
   real entry point, not an internal function that bypasses it. A green unit test suite is
   not enough to ship.

   First make sure the demo site runs this task's code. If the task changed server code and
   the builder's report doesn't say it restarted the site after its last change, restart it
   once: stop the process on the site's port, start it with the same command, and wait until
   it answers. A change to client code alone needs only the frontend build the builder ran.

   Dispatch a `smoke-tester` subagent (Agent tool, `subagent_type: smoke-tester`) to run it.
   Give it: the task text, which of the three smokes to run, the `Demo site:` line (it uses
   that site and never starts, rebuilds or stops one), the click path to each screen
   the task renders, the path to each screen's mockup and `-before.png`, the departures from
   the mockup the builder's report flagged as deliberate, whether the task adds or changes a
   migration, whether the project has a committed seed, and the full paths to this skill's
   `references/recording-gifs.md` and to `pr-demo`'s `SKILL.md` (for realistic demo content). It takes, compares, crops and
   saves the screenshots and GIFs, so you never open an image. It returns `PASS` or `FAIL`,
   what it ran and on which database providers, the files it saved with their click paths,
   and any demo setup. Put those in the task's `BUILD-LOG.md` entry. On `FAIL`, recurse to
   step 4 with its findings. If it reports content a committed seed should hold, have the
   builder add it there as part of this task.

6. **Commit, tick and log, in one call.** On `PASS` + smoke green, run the task-done script
   from the task's worktree, with the commit message on stdin:

   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/skills/feature-build/scripts/task-done.mjs" \
     --plan <plan folder> --task T<n> --verified "<what was verified>" \
     [--decision "<one line>"]... [--push] <<'EOF'
   <commit message>
   EOF
   ```

   `change-build` and `major-upgrade` run it with `--file <their file> --task <n>` instead.

   It commits every change outside the plan folder as the task's one commit, ticks
   `- [ ] **T<n>**` in `PLAN.md`, adds a `- **T<n>**` line with the commit SHA and the
   `--verified` text to `BUILD-LOG.md`, adds
   each `--decision` to `DECISION-LOG.md` with today's date, then commits the plan folder
   (with any `screenshots/` the task saved) using the task commit's trailers, and pushes with
   `--push`. It prints one line. On exit 1 the line says what stopped it and what's already
   committed: fix that and finish the rest by hand. Don't do these steps as separate calls;
   each one rereads this whole session.

   - **The message** names the task and follows the project's commit conventions (see
     `git-workflow`). If the task's code makes a pending spec pass for the first time, that
     spec file is in the tree and goes in the same commit, never a later cleanup commit.
   - **`--verified`:** what was verified, from the builder, reviewer and smoke-tester reports:
     test summary lines, review rounds, what the smoke ran, and each saved screenshot with its
     click path. `pr-describe` links screenshots by commit, so the plan commit must carry them.
   - **`--decision`:** one per decision the builder's report named that the plan left
     implicit (step 6 of its workflow): an assumption, spec deviation, or workaround.
     `decision-review` depends on it being on disk. Say who decided: `(feature-build, task 3,
     agent)` for a call the builder made, `(…, user)` for one the user made, such as an
     answer to a question the task raised. The whole-feature review and `decision-review`
     treat the two differently.
   - **`--push`** only with a draft PR open.

7. **Report** to the loop, as "One runner per task" says.

## Finish

When every box is checked: run the full test suite once more. If `BRIEF.md` has a `Repro`
section, run it through the real entry point, as step 5 does, and see it pass; a failure goes
to a fresh `builder` like a review finding. Then run the whole-feature review below, then
report a summary (tasks completed, commits, anything still red, and the review's "Needs
sign-off" list).

**Whole-feature review.** The per-task `reviewer` sees one task's diff, so it misses what
builds up across tasks: duplicated logic, a class that took on a second job, a component that
started calling a repository directly, drift from `ARCHITECTURE.md`. Dispatch one `reviewer`
subagent in whole-feature mode with the full branch diff (`git diff <base>...HEAD`),
`ARCHITECTURE.md`, `SPEC.md` and `DECISION-LOG.md`.

- On `FAIL`, send the findings to a new `builder`, then review again. Repeat until `PASS`,
  sending later rounds to that same builder, with the same round diffs and three-round limit
  as the loop's "Recurse" step; here the
  round diff is the round's own `refactor:` commit. Commit each round as its own `refactor:`
  commit and add a `BUILD-LOG.md` line for it. With a draft PR open, push each round.
- If a finding means the design itself is wrong, not just the code, stop and hand off to
  `feature-design`.

A human still reviews the PR; this pass means they aren't the first to see cross-task
problems. If this feature is (or completes) a standalone package ready to publish, invoke
`umbraco-marketplace` before tagging a release; it's not part of this loop.

**Open the PR, or fill in the draft: invoke `pr-describe` directly (via the Skill tool). Don't
write the body yourself.** A draft opened in Preflight stays a draft; tell the user to mark it
ready once they've looked. Claude Code's built-in `gh pr create --body "$(cat <<'EOF' ... EOF)"` recipe does
**not** apply here. Per `git-workflow`, the PR body is always `pr-describe`'s job, no
exceptions: never `--body` at all. `pr-describe` handles branch/push via `git-workflow` and
runs `decision-review`, so the assumptions, deviations, and workarounds in `DECISION-LOG.md`
reach a human in the PR. (`decision-review` is also user-invocable on its own, read-only, for
an earlier look.)

Stop the demo site the build started: a site left running keeps files in the worktree open.
If this feature built inside a worktree, don't remove it here. That's post-merge cleanup (the
project's `WorktreeRemove` hook, or `git worktree remove`). Archiving the plan folder is
post-merge too: `feature-close`, once the PR is merged.

To click through the finished feature on the demo site before merging, use `pr-demo`.

## Rules

- Sequential, dependency-ordered. This is a pipeline, not a parallel team.
- Builder owns code; reviewer owns the gate; this loop owns sequencing, `PLAN.md` checkbox
  state, `BUILD-LOG.md`, and `screenshots/`. Never collapse these roles. It never edits
  `README.md`: the index links `BUILD-LOG.md` from its footer, and `PLAN.md`'s checkboxes show
  progress.
- **Keep this session small.** It runs every task, so whatever it reads stays in context
  for every later turn, and a long build fills it. That's why each task goes to a runner.
  Between tasks, read the runner's report and the PR's new comments, nothing more. Inside a
  runner, read the plan folder's files, the agents' reports and short command output. Never open an image, a diff or a full build or test log
  here: the agents read those and report back. Ask each agent for a short report that points
  at files and lines instead of pasting code or output.
- The orchestrator may investigate directly: read docs, call an endpoint, read a few lines of
  a log. Anything bigger goes to a subagent that reports what it found: a `smoke-tester` for
  anything that drives the running app (a smoke, a live check, a look at a screen, a
  round trip through another product such as Deploy), a `general-purpose` one for the rest
  (many files, a whole log). A `general-purpose` agent driving a browser misses the
  smoke-tester's rules for keeping that cheap. The moment a fix touches code,
  dispatch a builder, even for one line you already know. This is easiest to break
  mid-debugging against a live system, where each small tweak feels too small to hand off.
- **Resuming mid-task.** A run can stop between a task's build and its commit. On resume, if
  the next unchecked task has uncommitted changes on the branch, don't rebuild it: send them
  to a `reviewer` as a fresh review of the whole task, then carry on from step 4.
- If a gate still fails after the rethink round, stop and report the task + findings rather
  than committing degraded code.

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.

View all in development →

Comments

Loading comments…

Newsletter

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