skills/woostack-commit/SKILL.md
Commit the current session-relevant changes, create a feature branch first when needed, push with Graphite, and update the current PR title/body with a goal, concise summary, and structured (automated + manual) test plan. Use for /woostack-commit, "commit this", "commit the current changes", "update the PR", or when finishing a woostack change before review.
npx skillsauth add howarewoo/woo-stack woostack-commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Commit only the changes relevant to the current session, then update the pull request so reviewers see the latest intent, summary, and test plan.
This skill is local-only. It mutates git state and PR metadata, but it never merges, force-pushes, or stages unrelated work.
/woostack-commit — Commit the session-relevant changes and update the current PR./woostack-commit <message> — Use <message> as the commit subject if it accurately describes the staged change.Consumers may add a commit hook command under .woostack/config.json:
{
"commit": {
"pre_commit": "pnpm format && pnpm test"
}
}
commit.pre_commit is a shell command run from the repo root after branch resolution and before staging. Use it for formatters, linters, test runners, or a repo-local script such as ./scripts/pre-commit.sh.
Rules:
.woostack/config.json or missing commit.pre_commit as no-op./woostack-commit invocation.Use a fast-tier subagent to draft commit and PR text when the host supports subagents with model routing. This is a cost optimization for the mechanical writing portion only; the main agent remains responsible for all git, Graphite, GitHub, staging, relevance, and final verification decisions.
Rules:
fast tier in
../woostack-review/prompts/_header.md for
provider-specific defaults, such as claude-haiku-4-5 for Anthropic,
gpt-5.3-codex-spark for OpenAI Codex, gemini-3-5-flash for Gemini, or
openrouter/deepseek/deepseek-v4-flash for OpenRouter. If the host cannot route a
subagent to a fast model, draft inline in the main session.Run read-only inspection:
pwd
gt status 2>/dev/null || git status --short --branch
gh pr view --json number,title,body,headRefName,baseRefName,url 2>/dev/null || true
Identify:
If relevance is ambiguous, stop and ask the user before staging.
Never commit directly to protected integration branches: main, staging, beta, or alpha. These branch names do not need to exist in every repo, but when the current branch is one of them, create a feature/* branch before staging or committing.
feature/*, continue.main, staging, beta, or alpha, create a new feature branch from the current branch before staging:gt create feature/<short-slug>
feature/* branch.Use a short slug based on the change, such as feature/review-model-defaults or feature/add-commit-skill. Prefer Graphite (gt) for branch creation. Fall back to raw git switch -c feature/<short-slug> only when Graphite is unavailable or clearly not initialized.
Never force-push. Never commit directly to main, staging, beta, or alpha.
If .woostack/config.json has commit.pre_commit, run it from the repo root before staging:
jq -r '.commit.pre_commit // empty' .woostack/config.json
If the value is non-empty, execute it with the user's shell:
<pre_commit command>
If the command fails, stop and report the failure. If the command succeeds and changes files, reassess relevance before staging.
Use targeted staging:
git add <file1> <file2>
When a file contains unrelated hunks, use interactive patch staging:
git add -p <file>
Do not stage generated files, secrets, .env*, unrelated dirty files, or user work from outside this session.
If a fast-subagent draft is available, use it only after validating that the proposed subject describes the staged diff accurately and follows the rules below.
Prefer Graphite:
gt modify -m "<type>: <concise subject>"
Use gt create -m "<type>: <concise subject>" only when creating the branch and committing in one Graphite flow is appropriate for the local stack state. Fall back to raw git only when Graphite is unavailable:
git commit -m "<type>: <concise subject>"
Commit message rules:
feat:, fix:, docs:, or chore:.Prefer Graphite:
gt submit
If a PR already exists, gt submit should update it. If Graphite is unavailable, push the branch and use gh pr create or gh pr edit as appropriate.
Do not merge. Do not force-push.
Update the PR after the commit/push so the PR reflects the latest branch state.
Use a validated fast-subagent draft for the PR title/body when available. The main agent must still preserve accurate existing context, remove stale generated content, and ensure the Goal, Summary, and Test plan mention only committed changes and real verification.
Resolve the PR:
gh pr view --json number,title,body,headRefName,baseRefName,url
If no PR exists after submit/push, create one targeting staging:
gh pr create --base staging --head "$(git branch --show-current)" --title "<concise title>" --body-file <tmp-body-file>
Set or update the body with this structure:
## Goal
<1-2 sentences: why this PR exists / the problem it solves>
## Summary
- <concise bullet describing a user-visible or reviewer-relevant change>
- <concise bullet describing another relevant change>
## Test plan
### Automated
- [ ] <command run and result, or "Not run (reason)">
### Manual
**Before merge**
- [ ] <step a reviewer can inspect or exercise on the branch or preview>
**After merge**
- [ ] <step only verifiable post-merge — deploy / migration / env-gated>
Rules:
commit.pre_commit command and result when it ran. Show this group whenever an automated check (test, lint, typecheck, pre_commit) could have run for the change: list results, or Not run with the reason when one was expected but skipped. Omit ### Automated entirely when no automated check applies to the change (for example a doc-only edit in a repo with no test harness) rather than emitting a Not run placeholder.Run /woostack-commit on a dirty feature branch and confirm the PR body shows Goal, Summary, and the Automated/Manual test plan. After-merge steps are verification only possible once the PR lands — staging/prod deploy behavior, migrations, env-specific config. Include the After-merge group only when such steps exist; this is the "if applicable".### Automated, ### Manual, or either before/after block — rather than leaving placeholder bullets.- [ ] ...) so reviewers can mark verification complete.Update with:
gh pr edit <number> --title "<concise title>" --body-file <tmp-body-file>
Return:
Do not claim tests passed unless you ran them and saw passing output.
development
Use to harden a plan, spec, or design by relentless interview — walk every branch of the decision tree, resolve each open question one at a time with a recommended answer, and amend the artifact in place until no new questions remain. This is the harden phase of the woostack build loop (woostack-build steps 3 and 6 — first the spec, then the plan); also usable standalone to stress-test or "grill me" on a design before committing to it.
development
Use to execute an approved woostack plan as a sequence of PR-sized, stacked increments via an inline or subagent-driven driver (--inline/--subagent, smart default) — implement each increment with TDD, tick the plan's checkboxes in place, commit via woostack-commit on its own Graphite branch, review each increment (woostack-review --fast inline; per-task spec+quality subagent loops in subagent mode), distill durable learnings, then continue. This is the execute phase of the woostack build loop (woostack-build step 8); also usable standalone via /woostack-execute <plan-path> [--inline|--subagent]. One plan per spec, multiple PRs per plan. Never merges.
development
Use when you want an HTML visualization of any source — a spec, plan, file, directory, or concept — tailored to a target audience (engineer, non-technical, investor, or any free-form reader). Reads the real source and writes one self-contained, offline-viewable HTML file; never the source of truth.
development
Use when initializing, scaffolding, or repairing the .woostack/ workspace — creates the memory store, specs and plans directories, config.json, and .gitignore from canonical templates, then runs the index builder and store linter. Invoke at project setup (brownfield) or from woostack-bootstrap (greenfield).