Enforce git commit best practices using gitmoji + Conventional Commits format. TRIGGER when creating commits. Ensures quality-gate passes, prevents issue auto-closing (no Close/Fix keywords), includes Co-Authored-By for AI commits, and requires user approval before committing.
60
68%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/skills/git-commit-guidelines/SKILL.mdThis skill enforces git commit best practices for the Packmind project, combining gitmoji for visual commit type identification with Conventional Commits format.
TRIGGER THIS SKILL WHEN:
git commitTRIGGER IMMEDIATELY - before running any git commit command.
User: "Fix the bug in the login function"
AI: [Fixes the bug]
AI: [Runs git commit directly without asking] ❌
CORRECT BEHAVIOR:
AI: [Fixes the bug]
AI: [Asks user: "Ready to commit. Here's the proposed message: ..."]
AI: [Waits for user approval]
AI: [Then commits]AI: git commit -m "Fix login bug
Closes #123" ❌
CORRECT BEHAVIOR:
AI: git commit -m "Fix login bug
#123" ✓AI: [Makes changes]
AI: [Commits immediately without running quality-gate] ❌
CORRECT BEHAVIOR:
AI: [Makes changes]
AI: [Runs npm run quality-gate]
AI: [Fixes any issues]
AI: [Then proposes commit]AI: git commit -m "feat(auth): add login validation" ❌
CORRECT BEHAVIOR:
AI: git commit -m "✨ feat(auth): add login validation" ✓<gitmoji> <type>(<scope>): <subject>
<body>
<issue-reference>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>| Element | Rule |
|---|---|
| Language | Required. All commit messages MUST be written in English |
| Gitmoji | Required. Must match the commit type |
| Type | Required. One of: feat, fix, refactor, docs, test, chore, style, perf, security, remove, move, deps |
| Scope | Optional. Component or module affected (e.g., auth, api, ui) |
| Subject | Required. Imperative mood, no period, max 72 chars |
| Body | Optional. Bullet points with - prefix for multiple changes |
| Issue Reference | Optional. Use #123 format. NEVER prefix with "Close", "Fix", or "Resolve" |
| Co-Author | Required for AI-assisted commits |
| Gitmoji | Type | Description | Example |
|---|---|---|---|
| ✨ | feat | New feature | ✨ feat(auth): add OAuth2 support |
| 🐛 | fix | Bug fix | 🐛 fix(api): handle null response |
| ♻️ | refactor | Code refactoring | ♻️ refactor(core): extract helper function |
| 📝 | docs | Documentation | 📝 docs: update API reference |
| ✅ | test | Adding/updating tests | ✅ test(auth): add login tests |
| 🔧 | chore | Maintenance tasks | 🔧 chore: update dependencies |
| 🎨 | style | Code formatting | 🎨 style: apply prettier formatting |
| ⚡️ | perf | Performance improvement | ⚡️ perf(query): optimize database calls |
| 🔒️ | security | Security fix | 🔒️ security: sanitize user input |
| 🗑️ | remove | Removing code/files | 🗑️ remove: delete deprecated endpoint |
| 🚚 | move | Moving/renaming files | 🚚 move: relocate utils to shared |
| 📦 | deps | Dependencies | 📦 deps: upgrade React to v19 |
Ensure all changes are complete and the feature/fix is working.
npm run quality-gateMANDATORY: This must pass before committing. Fix any issues found.
Run these commands to understand what will be committed:
git status
git diff --stagedIf changes aren't staged, stage them first:
git add <files>Compose the commit message following the format above:
NEVER skip this step. Present the commit to the user:
Ready to commit. Here's the proposed message:
<full commit message>Do you want me to proceed with this commit?
Wait for explicit user approval.
Use HEREDOC format to preserve formatting:
git commit -m "$(cat <<'EOF'
✨ feat(scope): subject line here
- First change description
- Second change description
#123
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)"NEVER use --no-verify
After committing, verify it was successful:
git log -1 --pretty=format:"%h %s"
git status✨ Staged changes: Fixed null check in user service
✅ Commit message:
🐛 fix(user): handle null user in getProfile
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Added export functionality to reports
✅ Commit message:
✨ feat(reports): add CSV export functionality
- Add export button to report toolbar
- Implement CSV generation service
- Add download trigger
#456
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Refactored authentication module
✅ Commit message:
♻️ refactor(auth): extract token validation logic
- Move validation to dedicated service
- Add unit tests for edge cases
- Update imports across modules
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Updated README with new setup instructions
✅ Commit message:
📝 docs: update installation instructions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Added tests for payment service
✅ Commit message:
✅ test(payment): add unit tests for refund flow
- Test successful refund scenario
- Test partial refund handling
- Test refund validation errors
#789
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Upgraded TypeScript to v5.3
✅ Commit message:
📦 deps: upgrade TypeScript to 5.3
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Moved utility functions to shared package
✅ Commit message:
🚚 move: relocate date utils to shared package
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>✨ Staged changes: Fixed XSS vulnerability in comment input
✅ Commit message:
🔒️ security(comments): sanitize HTML in user input
#security-audit
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>npm run quality-gate before committingCo-Authored-By for AI-assisted commitsgit log -1- for multi-line bodies#123 format--no-verify flaggit commit --amend unless explicitly requested┌─────────────────────────────────────────────────────────────┐
│ GIT COMMIT QUICK REFERENCE │
├─────────────────────────────────────────────────────────────┤
│ FORMAT: │
│ <gitmoji> <type>(<scope>): <subject> │
│ │
│ GITMOJI: │
│ ✨ feat 🐛 fix ♻️ refactor 📝 docs │
│ ✅ test 🔧 chore 🎨 style ⚡️ perf │
│ 🔒️ security 🗑️ remove 🚚 move 📦 deps │
│ │
│ WORKFLOW: │
│ 1. npm run quality-gate │
│ 2. git status && git diff --staged │
│ 3. Prepare message with gitmoji │
│ 4. ASK USER PERMISSION │
│ 5. git commit (use HEREDOC) │
│ 6. git log -1 (verify) │
│ │
│ RULES: │
│ • Always write in English │
│ • Always ask permission before committing │
│ • Never use Close/Fix/Resolve before #issue │
│ • Never use --no-verify │
│ • Always include Co-Authored-By footer │
└─────────────────────────────────────────────────────────────┘REMEMBER: This skill is MANDATORY when creating commits. Always run quality-gate, always ask for permission, and always use gitmoji. These steps ensure code quality and maintain a clean, informative git history.
e198635
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.