Workflow Commit
Create a safe, intentional git commit from the current worktree.
Trigger Phrases
workflow:commitcommit workflowmake a commitcreate a commitstage and commit thiscommit these changes
Process
-
Inspect repository state:
- Run
git status --short --branch. - Run
git diff --staged. - If nothing is staged, inspect
git diffandgit status --short, then propose what should be staged.
- Run
-
Protect user work:
- Never revert, reset, discard, or overwrite user changes.
- If unrelated changes are present, leave them untouched and stage only the files needed for the commit.
- If the intended commit scope is ambiguous, ask before staging.
-
Honor main-branch policy:
- Run
git branch --show-currentandgit rev-parse --show-toplevel. - If on
mainormasterand.claude/allow-main-commitsis absent at the repo root, stop and create a feature branch before committing. - If on
mainormasterand.claude/allow-main-commitsexists, allow content-only commits but block commits touching.claude/or06-system/. - Check both already staged files and any files being staged for this commit before deciding.
- If protected paths are involved, stop and create a feature branch before committing.
- Run
-
Run pre-commit checks:
- Always run
git diff --check. - If
package.jsonexists, inspect scripts before choosing checks. - Prefer existing repo scripts in this order when present: lint, typecheck, test.
- Do not invent missing scripts. If no check command is discoverable, say so clearly.
- If checks fail, stop and help fix the issue before committing.
- Always run
-
Review security gates:
- Read the bundled
security.mdin this skill's directory before proposing the commit. - If the checklist reveals a blocker, stop and help resolve it.
- Read the bundled
-
Propose the commit:
- Choose one conventional commit type:
feat,fix,docs,style,refactor,perf,test, orchore. - Use a concise subject:
<type>: <description>. - Add a body only when the change is complex or the why is not obvious.
- Suggest splitting into multiple commits when the staged changes contain unrelated concerns.
- Choose one conventional commit type:
-
Ask for approval before creating the commit:
- Offer to use the message as-is, modify it, add a body, or stage different files.
- After approval, create the commit.
- Show the resulting commit hash and subject.
-
Offer the next step:
- Ask whether to push, open a PR, or ship the branch.
Command Notes
- Follow the active agent and project shell rules.
- Use non-interactive git commands whenever possible.
- Do not run destructive commands unless the user explicitly asks for them.


