Som-Energia/SomCommonSkills / git-commit
git-commit
UnverifiedCrea commits seguint conventional commits amb emoji.dev. Trigger: Quan necessites fer un commit de codi.
When to Use
Utilitza aquesta skill quan:
- Has fet canvis de codi que vols guardar
- Necessites fer un commit seguint Conventional Commits
- Vols afegir emoji al commit per fer-lo més llegible
Format de Commit
El format és: <emoji> <type>: <description>
Tipus de Commit
| Type | Emoji | Descripció |
|---|---|---|
| feat | ✨ | Nova funcionalitat |
| fix | 🐛 | Bug fix |
| refactor | ♻️ | Refactorització |
| perf | ⚡ | Millora de rendiment |
| test | ✅ | Afegir o corregir tests |
| docs | 📖 | Documentació |
| style | 💄 | Estil (formatting, no lògica) |
| chore | 🔧 | Tasques de manteniment |
| build | 📦 | Canvis al build o dependències |
| ci | 👷 | Canvis a CI/CD |
| revert | ↩️ | Revert de commit anterior |
Regles
- Idioma: Tota la descripció en anglès
- Length màxima: 72 caràcters
- Case: lowercase per al type
- Imperatiu: Descripció en forma imperativa ("add feature" no "added feature")
- Emoji: Obligatori, seguit d'un espai
Workflow
Pas 1: Verificar canvis
git status
git diff
Pas 2: Seleccionar fitxers
git add <fitxer>
# O per afegir tots:
git add -A
Pas 3: Crear commit
git commit -m "<emoji> <type>: <description>"
Exemples
# Nova funcionalitat
git commit -m "✨ feat: add user authentication flow"
# Bug fix
git commit -m "🐛 fix: resolve null pointer in invoice calculation"
# Refactor
git commit -m "♻️ refactor: extract payment logic to service"
# Tests
git commit -m "✅ test: add unit tests for contract validation"
# Documentació
git commit -m "📖 docs: update API endpoint documentation"
Errors Comuns
| Error | Causa | Solució |
|---|---|---|
| Nothing to commit | Canvis no afegits | git add -A abans de commit |
| Commit message too long | Descripció massa llarga | Redueix a 72 caràcters |
| No emoji | Oblidat l'emoji | Afegeix l'emoji corresponent |
Integració amb SDD
Aquesta skill s'utilitza a les fases:
sdd-apply: Per guardar canvis implementatssdd-verify: Per guardar correccions
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |