.claude/skills/commit/SKILL.md
Commit staged changes using Graphite. Checks if on trunk and creates a new branch if needed. Updates PR title and summary after each commit.
npx skillsauth add howarewoo/woo-stack 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.
Commits changes using Graphite, ensuring proper branch management and PR metadata.
Invoke with /commit or /commit <message>.
/commit — auto-generates a conventional commit message from the diff/commit fix: resolve auth redirect loop — uses the provided message/commit --new-branch — forces creation of a new branch even if already on a feature branch/commit --new-branch fix: resolve auth redirect loop — combines bothThis skill runs fully autonomously without user interaction. When invoked:
Determine the current branch:
git branch --show-current
If the --new-branch flag was passed, always create a new branch regardless of the current branch. Proceed to Step 2a.
If the current branch is main or staging (a trunk branch), you are on trunk and must create a new branch before committing. Proceed to Step 2a.
If already on a feature branch (and --new-branch was not passed), skip to Step 3.
Create a new feature branch. First, examine the staged and unstaged changes to determine an appropriate branch name:
git diff --stat
git diff --staged --stat
Generate a descriptive kebab-case branch name based on the changes (e.g., fix/auth-redirect-loop, feat/add-user-avatar, chore/update-dependencies).
Create the branch with Graphite:
gt create <branch-name>
gt create automatically stacks the new branch on top of the current branch. This means:
main/staging), the new branch's parent is trunk--new-branch), the new branch stacks on top of that feature branchIf the new branch was created from main or staging (i.e., NOT via --new-branch from a feature branch), ensure it targets staging:
gt track --parent staging
Skip this step when --new-branch was used from a feature branch — the branch is already correctly stacked on the current branch by gt create.
Check for unstaged changes:
git status
If there are unstaged changes, stage all of them:
gt add .
If the user specified specific files, stage only those files instead.
Get the full diff of staged changes:
git diff --staged
Analyze the diff to understand:
Run formatting and tests on changed files:
pnpm pre-commit
If pre-commit fails:
gt add .pnpm pre-commitGenerate a conventional commit message if one was not provided. The message format:
type(scope): concise description
Optional body with more detail if the change is complex.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Type: feat, fix, refactor, docs, chore, test, style, perf
Scope: The affected package or area (e.g., landing, web, mobile, orpc, ui)
Create the commit:
gt modify -c -m "$(cat <<'EOF'
type(scope): concise description
Co-Authored-By: Claude Opus 4.6 <[email protected]>
EOF
)"
Use a HEREDOC to preserve multi-line formatting.
Create or update the PR with Graphite:
gt submit
This will create a new PR if one doesn't exist, or update the existing one.
After submitting, get the full commit history for this branch:
gh pr view --json number,title,body,headRefName,commits
And get the full diff against the base branch:
gh pr diff
Analyze ALL commits and the full diff to generate:
PR Title — conventional commit format covering the overall change:
feat(scope): description for new featuresfix(scope): description for bug fixesrefactor(scope): description for refactoringdocs(scope): description for documentationchore(scope): description for maintenancePR Summary — structured markdown body:
## Summary
<1-3 bullet points describing what this PR does>
## Changes
<Bulleted list of specific changes made>
## Test Plan
<How to verify the changes work>
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Update the PR:
gh pr edit --title "type(scope): description" --body "$(cat <<'EOF'
## Summary
...
## Changes
...
## Test Plan
...
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Output a summary to the user:
✓ Committed: type(scope): description
✓ PR #<number> updated: <title>
<PR URL>
git status shows no changes, report "Nothing to commit" and stopgt create fails because the branch exists, use gt branch checkout <name> insteadgt submit fails, report the error — the commit was still made successfullygt commands for branch/commit operations (never raw git commit)pnpm pre-commit before committingCo-Authored-By trailer in commit messagesfeat/thing, fix/bug)gt track --parent stagingtesting
Use to curate the .woostack/ knowledge store. Reflects over the static memory store + docs (no session mining), then proposes a gated changeset that merges duplicate notes, replaces stale/contradicted ones, drops dead/orphaned notes, resolves conflicts, surfaces consolidated insights, and recommends evidence-guarded documentation edits. Nothing mutates before explicit approval; ends on a summary + iterate loop. Local-only memory (no commit); doc edits land in the working tree. Never commits or merges. Invoke via /woostack-dream [instructions].
development
woostack's canonical test-driven-development home and on-demand test-adder. The single source for the TDD kernel — Red→Green→Refactor, test-first, cover happy/error/edge/success+failure, framework-aware, no-runner→concrete verification — that woostack-plan, woostack-execute, woostack-debug, and bootstrap patterns.md §7 should link to instead of restating. Also the 14th public command: /woostack-tdd <target> adds appropriate tests to an existing code block, PR, spec, or plan — one verb, target-routed (code→colocated *.test files, PR→tests for the gh pr diff surface, spec→strengthen §7 acceptance criteria, plan→fill failing-test steps) — with a characterization carve-out for existing code (new code is red-first; existing code pins current behavior). Writes tests to the working tree and hands to woostack-commit; never commits, merges, or authors status:/branch:; owns no approval gate.
development
Use to resolve small technical issues (bugs, hotfixes, refactors) through a unified execution loop — diagnose root cause with woostack-debug, author a fix plan under .woostack/fixes/, harden, get explicit user approval, then delegate execution to woostack-execute (TDD per task, task review, commit via woostack-commit, distill).
development
Use to execute an approved woostack plan UNATTENDED overnight — one autonomous run with no user input after launch that drives every increment to a reviewed stack, swapping woostack-execute's stop-and-ask gates for resolve-or-log-and-continue (woostack-debug on stuck verifications; bounded auto-address on a blocking review; halt-the-track on anything unsafe or ambiguous), honoring optional `## Track:` grouping in the plan (independent, fault-isolated tracks run sequentially), and writing a morning report under .woostack/overnight/ for a human to test in the morning. It is the third choice at woostack-build's execution-handoff gate (Go / Hand off / Run overnight); also usable standalone via /woostack-execute-overnight <plan-path> [--inline|--subagent]. One plan per spec, multiple PRs per plan. Never merges; never relaxes safety for autonomy.