/fw:commitfrom fw
Finish a branch cleanly. Use to verify readiness, make logical commits, push, and create or refresh a PR with evidence.
Ships in fw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
$fw:commit closes Flywheel's compact project loop between "the repo
change is ready enough to finish" and "the branch is pushed with an open or
refreshed PR."
It is the finishing workflow for:
Use it after $fw:work or after $fw:review reaches a clean
enough verdict. For runtime-risky changes, use it after $fw:rollout
sets the activation, validation, and rollback posture. If the user invokes
$fw:commit directly, treat that as permission to run the finish-stage
workflow rather than as a reason to reject the request because earlier stages
were skipped.
Follow ../references/host-interaction-contract.md.
Call the exact host question tool named in
../references/host-interaction-contract.md when that tool is available. Do
not ask for raw 1/2/3 replies when the host already offers a choice surface.
When the workflow spans multiple material steps, use the host task-tracking
tool named in ../references/host-interaction-contract.md to create and
maintain a short task list.
Ask one question at a time. When multiple finish paths are viable, present a short predicted choice list with the recommended label first and rely on the host's native freeform final path when it exists.
<commit_input> #$ARGUMENTS </commit_input>
Parse optional tokens before interpreting any remainder:
local-only - explicitly opt out of the default publish path; create local
commit(s) but do not push or create or refresh a PRplan:<path> - use this plan as finish-stage context and update it to
status: completed when appropriatepr:<url> - target this existing PR explicitlyrefresh-description - update the current PR description without changing
branch or commit stateDo not preload every support file. Load only what the current phase needs:
references/pr-body-template.md only when composing or refreshing the
PR bodyreferences/evidence-bundle.md when a shared evidence bundle exists or
when a proof-producing stage already created reusable evidence for this
branch../rollout/references/rollout-template.md only when a rollout
artifact already exists and its staged-release summary should be reflected in
the PR story../observability/references/service-readiness-matrix.md only when the
change is runtime-risky and the monitoring or validation section needs a
grounded readiness frame../references/workflow-gates.md before final readiness checks and when
closing the finish stage.flywheel/config.local.yaml when present for repo-local commit gates
such as browser proof, review-before-commit, and runtime validation$fw:commit-message for each logical unit
being committed. If the helper is unavailable, draft the conventional header
directly and ask before marking breaking changes.local-only, continue from
commit through push and PR creation or refresh instead of stopping at a
clean local branch.Post-Deploy Monitoring & Validation section, even if the answer is a
no-impact rationale.spin before staging and committing so the solution doc
can land in the same logical change.local-only request.Collect the smallest useful context in one pass:
printf '=== STATUS ===\n'; git status --short --branch
printf '\n=== BRANCH ===\n'; git branch --show-current
printf '\n=== DIFF ===\n'; git diff HEAD
printf '\n=== LOG ===\n'; git log --oneline -10
printf '\n=== DEFAULT_BRANCH ===\n'; git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || echo 'DEFAULT_BRANCH_UNRESOLVED'
printf '\n=== PR_CHECK ===\n'; gh pr view --json url,title,state,baseRefName,headRefName 2>/dev/null || echo 'NO_OPEN_PR'
If GitHub CLI is unavailable or unauthenticated, continue only as far as local
git truth allows and report PR creation or refresh as a publish blocker. Do not
silently downgrade the default finish path to local-only unless the user passed
local-only.
If .flywheel/config.local.yaml exists, read only the finish-stage-relevant
keys before classifying the path:
review.require_review_before_commitbrowser.require_proof_for_browser_visible_changescommit.require_browser_proof_for_browser_visible_changesruntime.require_operational_validation_for_runtime_changesIf .context/flywheel/evidence/ exists, inspect only the newest summary.md
that clearly matches the current branch, plan, or task. Treat the shared
bundle as the primary reusable proof source for finishing.
If .context/flywheel/rollout/ exists, inspect only the newest rollout.md
that clearly matches the current branch, plan, or task. Treat it as the source
of truth for activation sequence, validation window, and rollback trigger.
Choose the path from branch truth. The default non-local path is publish complete: commit what is needed, push the branch, then create or refresh the PR.
refresh-description or only wants
to update the existing PR textlocal-onlyIf the current branch is the default branch and finishing would create commits, create a feature branch first unless the user explicitly approves committing on the default branch.
If a clean isolated checkout is preferable before finishing, use
$fw:worktree instead of switching the shared checkout ad hoc.
Read ../references/workflow-gates.md and apply the Commit-Ready gate while
running the checks below. If the gate is not satisfied, stop with the missing
items instead of committing, pushing, or creating a PR.
Before creating commits or a PR, confirm:
$fw:work or local setup$fw:browser-test, repo-native browser tests, or an explicit user
decision to continue without that proof$fw:rollout before continuingReview handling:
$fw:review already ran and the latest verdict is clean enough,
reuse it$fw:review now instead of blocking only because the user skipped itP0 or P1 gated or manual findings remain after review, stop
instead of continuing into commit or PR creationIf the branch is not actually ready, stop and say what remains.
Before building the final commit payload or staging files, infer at most 3 candidate spin lessons from:
ideate, brainstorm, or
plan when they materially changed the repo workflow or project directionOnly keep candidates that look durable and project-specific. If nothing non-trivial surfaced, continue without forcing a spin offer.
If one or more candidates are worth preserving, call the host question tool with a small choice surface. Put the recommended option first:
$fw:spin with the selected candidate summaryRecommend the strongest candidate explicitly when capture is warranted. Recommend
Skip only when the value is marginal.
If the user wants to continue, launch $fw:spin with the selected candidate
summary and the selected capture depth instead of calling it blank. For quick
capture, pass a lightweight-mode hint with the summary. When $fw:spin creates
or updates docs/solutions/, treat those files as part of the same finish
payload and include them in the commit plan.
Assemble one finish summary from repo truth that will be reused in the PR
Summary section and in the final user report. Keep it concise: what changed,
why it matters, and any material architecture, code-quality, testing, decision,
or operational caveat.
Assemble the payload for commit, push, and PR steps from:
docs/solutions/ changes created by the pre-commit spin checkpointplan:<path> is availableWhen the change is runtime-risky, read
../observability/references/service-readiness-matrix.md so the PR's
monitoring section covers the real contract, state, rollout, and recovery
surface instead of generic "watch the logs" language.
If a shared evidence bundle exists, prefer it first. Include only items marked
clean or redacted with PR Use: yes. Turn summary-only items into short
prose instead of pasting raw artifacts. Keep local-only items out of the PR
body.
If the change affects observable behavior and the repo or host already exposes evidence such as screenshots, CLI transcripts, request examples, generated artifacts, or a shared evidence bundle, offer three choices:
Do not block finishing on evidence capture when the repo has no practical capture path.
Only include evidence in the PR description when you are above 90% confident it contains no secrets and no meaningful PII. Do not paste raw auth headers, cookies, tokens, passwords, or unredacted sensitive request or response bodies into the PR body. When the raw artifact is too sensitive but the shape matters, prefer a redacted or dummy-substituted example.
When a shared evidence bundle exists, cite the bundle-backed summary or the sanitized artifact path rather than re-explaining the proof from scratch.
When a rollout artifact exists, reuse its activation sequence, validation window, owner, and rollback trigger instead of rebuilding those decisions from memory during PR preparation.
If the change is browser-visible and fresh proof is still missing, route
through $fw:browser-test before final PR preparation unless the user
explicitly wants to continue without it.
Read references/pr-body-template.md and fill it with concrete repo facts.
If the worktree is dirty:
$fw:commit-message for each conventional header, plus body or
footers when usefulIf the most honest message would be breaking, ask before using ! or
BREAKING CHANGE:.
Default to one commit unless there are clearly separate concerns worth splitting.
If the path is local-only, skip this phase and say so explicitly.
Otherwise publish the branch safely:
git push --set-upstream origin HEAD
If the branch already has an upstream, use git push.
If push fails, stop before PR creation or refresh and report the exact blocked state. Do not claim the branch is published unless the push succeeded.
If the path is local-only, skip this phase and report that no PR work was
requested.
If GitHub CLI is available:
Required PR body sections:
If there is truly no runtime impact, the monitoring section must still contain:
No additional operational monitoring required.
Reason: <one line grounded in the actual change>
When plan:<path> is available and the plan frontmatter contains
status: active, update it to status: completed.
Then report:
../references/workflow-gates.md with readiness,
evidence, and any open follow-upDo not make a normal post-commit spin offer. If push, PR creation, CI, or reviewer feedback after commit reveals a new durable lesson, treat that as a new follow-up change and capture it in a later commit.
If the branch finished from a .worktrees/ checkout and no longer needs that
checkout, suggest $fw:worktree cleanup <branch> as the cleanup path.
@./references/evidence-bundle.md
@./references/pr-body-template.md
@../rollout/references/rollout-template.md
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mopeyjellyfish/flywheel --plugin flywheel32 skills in this plugin
/architecture-strategyAssess repo-grounded architecture choices and improvements. Use for boundaries, service splits, dependency direction, or distributed posture./brainstormExplore requirements and approaches. Use for a fuzzy idea, open scope, or one direction that needs sharper behavior before planning./browser-testRun browser acceptance checks with playwright-cli. Use when browser-visible behavior needs fresh proof before review or commit./commit-messageDraft Conventional Commit messages. Use when choosing a commit header, body, footer, or breaking-change marker.