Skip to content
Back to skills

Apply

ASecurity

Build the chosen change, planning first if needed, then preview it from this host; or work a non-code to-do.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 27, 2026
ai-agentsgobashnodegit

Works with

  • claude code
  • cli

Security analysis

A100/100

Scanned November 26, 2026

npx -y skills add matthewwong525/WongStack --skill apply --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Apply?

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

Security grade badge for Apply
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/matthewwong525-apply/badge)](https://www.skillsdirectory.com/skills/matthewwong525-apply)

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: apply
description: Build the chosen change, planning first if needed, then preview it from this host; or work a non-code to-do.
user-invocable: true
---

# /apply

Build [the chosen plan](../../loop/references/rules.md). Run `node .claude/loop/step-title.mjs set APPLY --task "<plan or to-do title>"` before a build, to-do, or preview.

**No repo file** → [work the to-do](#work-that-changes-no-repo-file). Repo code or process, [mini apps](../../../wiki/stack/mini-apps.md) included → resolve the plan.

## Resolve the plan first

Build the change this chat is about, found by [the rungs](../save/references/checkpoint-evidence.md#selection-rungs). `/apply [name-or-PR] [instruction]`: a saved change or PR this chat hasn't loaded → [pick it up](references/pick-up.md) first. No change named and none in this chat → offer `openspec list` and the saved branches [`other-work.mjs`](../../loop/other-work.mjs) lists in [an ask](../explore/references/asking-the-user.md), each with task progress and `Status:` line; don't guess. A name found neither here nor on [a remote branch](references/pick-up.md#1-resolve-the-change-and-the-branch) is intent for a new plan. In `/ship`, an archive path is that change: skip status, add the failures as a task, and build.

Attached review notes → [apply them to the existing change](../plan/SKILL.md#review-notes) first, then keep building.

Check `applyRequires` in `openspec status --change "<name>" --json`:

- **All done** → apply-ready; continue.
- **The selected change is incomplete** → invoke the [`plan` skill](../plan/SKILL.md) to complete it in place.
- **No change, clear intent** → invoke `plan` with that intent.
- **Unclear intent** → ask before any plan or code.

`/apply` authorizes planning and building. After `/plan`, verify the `applyRequires` closure; paused/blocked → report and stop. Otherwise keep its **exact name** and [build in a helper](#build-in-a-helper).

At **all-tasks-complete**, even at invocation, [finish with a preview](#finish-with-a-preview), after [a second look](#a-second-look) when this run built. Final acceptance's saved CI preview skips upload, then joins steps 4 and 5. **Invoked by `/ship`**, return after the second look, with no upload or `/save`.

## Build in a helper

Use a fresh helper on the parent's model, free of the planning talk: Agent (`general-purpose`) in Claude Code, a sub-agent in Codex. Prompt: the exact change name, then *read `$(git rev-parse --show-toplevel)/.claude/skills/apply/references/build-helper.md`, then build*. Add `store <id>` when selected, and *inside `/ship`* if so. [The brief](references/build-helper.md) owns its work, its build order, and its return.

**Let it build unwatched**, with the longest host wait (the Agent call in Claude Code, `wait_agent` in Codex), waiting again on a timeout: don't narrate waits or read its files; message it only with an answer or a stop.

Act on reports:

- **A question** → ask the person in [the shared ask format](../explore/references/asking-the-user.md), log the answer as an `Asked` [Decision-log line](../plan/SKILL.md#explore-first), then start a new helper. Inside `/ship`, a [safe pick](../../loop/references/rules.md#inside-ship) is logged `Assumed`, not asked.
- **A blocker** → report it and stop, ending with [the ways to clear it](../explore/references/asking-the-user.md#end-every-reply-with-the-next-step).
- **Final acceptance** → once the build and its tests are written, run `/save` and the retained live acceptance. Tick only what you saw pass; a blocked or failed check stays unticked and stops.
- **All done** → confirm no unticked box, relay its `local checks:` line, then handle **all-tasks-complete** above.

No helper, or inside one → follow the brief inline.

## A second look

Start a fresh helper as above, prompted with the change name, then *read `$(git rev-parse --show-toplevel)/.claude/skills/apply/references/review-helper.md`, then review*. Route [its findings](references/review-helper.md) by [fix it or ask](../../loop/references/rules.md#fix-it-or-ask): `fix` → a new build helper, which may dispute one with a reason, then the reviewer rereads; two rounds at most. The rest → one question, as above. No helper → say no review ran.

## Finish with a preview

1. **Run CI's guards**, `DEFAULT_BRANCH=main bash .github/scripts/app-untouched.sh --worktree; DEFAULT_BRANCH=main node .github/scripts/loosened-checks.mjs --worktree`. `untouched=true` → skip the upload, in one line. Fix each file marked *needs a reason*: switch the check back on, or add [the `Check:` bullet](../../../wiki/development/the-change-loop.md#a-loosened-check-needs-a-reason) when the plan settles it, else ask. Rerun until it exits 0.
2. **Upload the preview** from this host, `bash scripts/cf-preview.sh --alias "<change-name>"`, with the credential from the primary worktree's `.env` ([secrets](../../../wiki/development/secrets.md)). Empty or can't run (no credential) → say why in one line.
3. **Show changed screens on a preview page**: capture each live and in this preview by [`/verify`'s plain checks](../verify/SKILL.md#plain-checks) at phone width (computer too if it differs), no `--full-page`, scout, save, or PR comment. Run `node "$(git rev-parse --show-toplevel)/.claude/skills/apply/scripts/preview-review.mjs" "<change-name>" --pair "<title>|<live>|<preview>" --link` (no live one for a new screen; `--approved` with a screenshot of the plan's approved *After* page or live card at 390 and 1280 px, in place of live); report its link. None to show, or a capture fails → say why; keep the link and the choice.
4. **Report and ask** in [plain words](../explore/references/asking-the-user.md#write-in-plain-words): what was built, what the review found and fixed, any can't-be-undone line, [the preview link](../explore/references/asking-the-user.md#print-the-previews-link), each `Check:` bullet under *Checks loosened* (what is no longer checked, why), and unfixed files. Ask [the next step](../explore/references/asking-the-user.md#end-every-reply-with-the-next-step) with the question tool: publish it *(Recommended)* via [`/ship`](../ship/SKILL.md), change it more, or save via [`/save`](../save/SKILL.md).

Repeat under the same alias for more edits; added tasks go to a new helper.

## Work that changes no repo file

Work the conversation's numbered to-do in order, writing one if missing ([verbs for any work](../../loop/references/rules.md#verbs-for-any-work)). Only an outward step asks, showing exactly what it will do (recipient, full text, amount, target) in [the shared ask format](../explore/references/asking-the-user.md): one confirmation, one action, unless the person asked for a batch. Skip and report a declined step. Report without `/save`. Done → `step-title.mjs set DONE`.

## Boundaries

- **Git stays with `/save`**, on either route, but for [pick-up's switch](references/pick-up.md#2-check-out-the-branch); the preview upload is not git and gates nothing.
- **Never save to stop or between parts** ([why](../../loop/references/rules.md#apply-never-saves-to-stop-but-may-save-to-finish-a-task)), but for final acceptance.

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 ai-agents →

Comments

Loading comments…

Newsletter

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