| name | commit-workflow |
| description | Prepare and execute safe two-step Git commits in Codex by drafting a commit message, requesting explicit user approval, and only then committing. Use when the user asks to prepare a commit message, perform a commit, or run a two-step commit workflow. Do not use Claude slash commands or Claude CLI for this workflow. |
Commit Workflow
Use a strict two-step process: prepare first, commit second. Keep all commit actions non-interactive and Git-native.
Triggering and Invocation
- Requests like
commit or do commit are likely to trigger this skill via semantic matching.
- For deterministic invocation, use explicit phrasing such as
Use $commit-workflow. ....
- Two-step behavior is mandatory:
- First prepare and approve the commit message.
- Then execute the commit after explicit approval.
Examples:
Use $commit-workflow. Review changes and prepare commit message.
Use $commit-workflow. Commit now with the approved message.
Hard Rules
- Do not use Claude slash commands such as
/commit-prepare or /commit-do.
- Do not invoke Claude CLI for commit workflow tasks.
- Use non-interactive Git commands only.
- Never commit before explicit user approval of the drafted message.
- Never push automatically.
Step 1: Prepare Commit Message
- Run
git status --short to inspect changed files.
- Run
git diff (or focused diffs) to inspect actual changes.
- Run
git log -5 --oneline to align with recent commit style.
- Draft a commit message with these rules:
- Ticket handling:
- Default to non-ticket subject format.
- Use ticket-prefixed subject only if user explicitly requests it or provides a ticket ID.
- Present the full draft commit message to the user and ask for explicit approval.
- Do not commit in this step.
Step 2: Commit After Approval
- Re-check
git status --porcelain.
- If there are no changes, report that nothing can be committed and stop.
- Stage with
git add . unless the user requested narrower staging.
- Commit using the approved message in multiline-safe form.
- Run
git status --short and show resulting state.
- Ask whether the user wants to push.
- Do not push unless explicitly requested.
Expected Outcomes
prepare commit requests produce a complete message draft and approval request.
commit now requests run only after an approved message exists.
- The workflow remains Git-native and never depends on Claude command infrastructure.