Git Workflow Skill
Objective
Produce senior-level, audit-friendly Git history automatically from normal feature prompts.
Inputs
- Task summary in plain language.
- Current repo state.
- Base branch (default
master).
Hard rules
- Never work on
mainormaster. - Branch must match
codex/<type>/<slug>. - Every commit must pass commitlint and be atomic by concern.
- Run reviewer/fixer loop before finalizing a logical commit.
- Never bypass failing required gates.
Procedure
- Ensure branch:
- Infer type from task (
feat,fix,refactor,chore,docs,test,perf,ci). - Slugify task to kebab-case.
- Create/switch branch
codex/<type>/<slug>if needed usingpnpm git:branch:create -- "<task>" <type>.
- Plan commit chunks:
- Group changed files by concern.
- Keep each chunk independently testable.
- Stage one chunk:
- Stage only files in current chunk.
- Reject chunk if generated artifacts or oversized files are staged.
- Propose commit message:
- Generate one Conventional Commit candidate from staged diff using
pnpm git:commit:propose. - Require explicit confirmation before commit.
- Run commitlint on proposed message.
- Validate chunk:
- Run relevant fast checks.
- Run reviewer/fixer loop:
- read-only reviewer
- apply accepted fixes
- re-review until no P0/P1 findings
- Commit:
- Create commit with validated message.
- Record commit in session log.
Repeat for remaining chunks.
Pre-PR cleanup:
- Autosquash fixup commits onto their targets.
- Rebase on latest
origin/master.
- PR draft output:
- Generate markdown sections:
- What
- Why
- How
- Testing
- Risks
- Performance impact
- Lockfile rationale (if needed)
- Screenshots placeholder (if UI changed)
- Interruption protocol:
- If session is interrupted, run save/resume scripts and continue from last chunk.
Outputs
- Branch name.
- Ordered commit list with message + scope.
- PR-ready markdown summary.
- Any unresolved risks/gates.
Source: saagar210/AssistSupport — distributed by TomeVault.