Commit - Safe Git Workflow
SkillDev toolsSafe commit and push workflow. Creates a commit following conventions and pushes. Husky handles verifications (TypeScript, Biome, tests).
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Commit - Safe Git Workflow skill
What this skill tells your AI
The instructions your AI receives, as published by dgouron/review-flow in .claude/skills/commit/SKILL.md and read by ahel’s review.
Persona
Read .claude/roles/senior-dev.md — adopt this profile and follow all its rules.
Activation
This skill activates:
- On explicit request (
/commit) - When the user asks to commit/push code
Husky Hooks (automatic)
The project uses Husky which automatically runs:
| Hook | Action |
|---|---|
pre-commit | TypeScript check + Biome lint (modified files) |
commit-msg | commitlint (message format) |
pre-push | Vitest tests (modified files since test) |
Claude Code Hooks (automatic)
The project also has PreToolUse hooks that run BEFORE git commands:
| Hook | Action |
|---|---|
protect-main-branch.sh | Blocks commit on master |
pre-commit-gate.sh | Runs tests before commit |
verify-spec-updated.sh | Checks spec has ## Status: implemented |
protect-main-push.sh | Blocks push to master and force push |
Workflow
Step 0: Quality Gates (BLOCKING)
BEFORE any commit, run:
yarn verify
If it fails: display errors and STOP. Do not commit until quality gates pass.
Step 0b: Spec & Tracker Verification
If staged files include src/ code:
- Check
docs/feature-tracker.md— any feature inimplementingstatus should be updated toimplemented - Check corresponding spec — should have
## Status: implementedif feature is complete - If missing, WARN the user (the hook will also catch this)
Step 1: Analyze Changes
git status --short
If nothing is staged, suggest:
git add <files>
Step 2: Create the Commit
Message Format (Conventional Commits)
<type>(<scope>): <description>
Allowed types:
| Type | Usage |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting (no code change) |
refactor | Refactoring (no new feature or fix) |
perf | Performance improvement |
test | Adding or fixing tests |
build | Build system changes |
ci | CI/CD changes |
chore | Maintenance, dependencies |
revert | Revert a previous commit |
Rules:
- Header max 72 characters
- Description in lowercase, no trailing period
- Scope optional in parentheses
Examples
feat(webhook): add GitHub signature validation
fix(review): resolve score calculation overflow
refactor(gateway): extract GitLab API client
test(usecase): add unit tests for track assignment
Step 3: Commit
git commit -m "<type>(<scope>): <description>"
Husky will automatically run:
- TypeScript check
- Biome lint
- commitlint
Step 4: Push (optional)
git push origin <current-branch>
Husky will automatically run tests before pushing.
Security Rules
- NEVER use
--forcewithout explicit request - NEVER push to
mainormasterdirectly - NEVER use
--no-verifyunless explicitly requested by the user - ALWAYS verify you are on a feature branch
- NEVER mention Claude, Anthropic, or Co-Authored-By in commits
If Husky Fails
| Error | Solution |
|---|---|
| TypeScript | Fix type errors |
| Biome | yarn lint:fix to auto-correct |
| commitlint | Reword the commit message |
| Tests (push) | Fix failing tests |
Output Template
COMMIT
Branch: <branch>
Staged files:
- <file 1>
- <file 2>
Message: <type>(<scope>): <description>
Verifications:
- Husky: TypeScript / Biome / commitlint
Confirm commit? (yes/no)
Signals
- GitHub stars
- 43
- Forks
- 6
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
commit-dgouron- Source
- github.com/dgouron/review-flow