Skill code-commit
Générez et validez des messages de commit git en suivant la spécification conventionalcommits.org.
- Étoiles GitHub
- 51
- Fichiers
- 1
- Dernier commit
- 7 nov. 2026
- Licence
- MIT
- Outils autorisés
- —
Que fait la skill code-commit ?
code-commit est une agent skill. Générez et validez des messages de commit git en suivant la spécification conventionalcommits.org.
Résumé généré à partir du SKILL.md de la skill.
À propos du skill code-commit
Cette SKILL permet aux développeurs de rédiger des messages de commit git standardisés respectant la spécification conventionalcommits.org. Elle automatise le processus d'inspection d'un worktree, l'analyse des changements et la rédaction de messages incluant un type, un scope et un titre à l'impératif spécifiques. Un agent doit charger cet outil dès qu'un utilisateur mentionne un commit de code, demande de créer un commit ou doit réviser le format d'un message existant.
Pour garantir la précision, la SKILL utilise des commandes telles que git status, git diff et git log afin de comprendre le contexte des modifications et de s'aligner sur les patterns établis du dépôt. Elle identifie les types appropriés comme feat, fix ou refactor et gère les breaking changes en utilisant la syntaxe requise. Le processus inclut une couche de sécurité où l'agent propose des fichiers et des messages spécifiques pour approbation avant d'exécuter git add ou git commit. Elle respecte également les hooks de commit du dépôt et peut déléguer la création de pull requests à d'autres outils spécialisés.
Ce qu'un agent peut faire avec
- 1Générer un nouveau commitUn agent peut inspecter le worktree actuel et proposer un message de commit formaté pour approbation par l'utilisateur.
- 2Valider la syntaxe d'un messageLes développeurs peuvent vérifier si un message de commit spécifique respecte le standard conventional commits.
- 3Identifier les breaking changesLa SKILL peut formater les messages pour indiquer clairement les breaking changes en utilisant des symboles et des footers spécifiques.
- 4Réviser les changements indexésL'outil analyse les diffs pour s'assurer que le message de commit décrit avec précision les modifications de code réelles.
Rédigé à partir du SKILL.md du skill. Chaque cas d'utilisation est vérifié par rapport à une citation de celui-ci.
Comment installer la skill code-commit
Chaque commande copie le dossier de la skill dans le répertoire des skills du client. Redémarrez le client ou démarrez une nouvelle session pour la charger.Installer la skill code-commit dans Plugin
/plugin marketplace add martinffx/atelier /plugin install atelier@atelier
Installer la skill code-commit dans Claude Code
~/.claude/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit ~/.claude/skills/code-commitInstaller la skill code-commit dans Claude Code (project)
.claude/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit .claude/skills/code-commitInstaller la skill code-commit dans Codex
~/.agents/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit ~/.agents/skills/code-commitInstaller la skill code-commit dans Gemini CLI
~/.gemini/skills/code-commit/SKILL.md
$ npx degit martinffx/atelier/skills/code-commit ~/.gemini/skills/code-commitInstaller la skill code-commit dans Claude.ai
npx degit martinffx/atelier/skills/code-commit code-commit && zip -r code-commit.zip code-commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → code-commit.zip
SKILL.md
Voir sur GitHubConventional Commit Skill
Create coherent, reviewable commits that follow the Conventional Commits specification. Message syntax matters, but the selected changes must tell one clear story too.
Message Format
Every generated commit has a title and body:
<type>(<scope>): <imperative title>
<1-5 lines describing the change and, when useful, its reason or effect>
Use a lowercase scope that identifies the affected component. The title is concise, imperative, lowercase, and has no trailing period. The body is concrete: explain the behavior, motivation, or important implementation decision rather than restating the title.
| Type | Use for |
|---|---|
feat |
New user-facing capability |
fix |
Corrected behavior |
docs |
Documentation only |
style |
Formatting only |
refactor |
Restructuring without behavior change |
test |
Tests only |
chore |
Maintenance or tooling |
perf |
Performance improvement |
ci |
Continuous integration configuration |
build |
Build system or dependencies |
revert |
Reverting a prior commit |
Breaking changes may use ! after the type or scope, a BREAKING CHANGE: footer, or both.
Include issue footers such as Closes #123 only when the issue is known.
Create a Commit
When the user asks to commit, first inspect the complete worktree:
- Run
git status --short. - Read both
git diff --cachedandgit diffso pre-staged work is not mistaken for the entire change. - List untracked files with
git ls-files --others --exclude-standardand inspect relevant ones. - Read recent subjects with
git log --oneline -10to match established scopes and wording. - Flag likely secrets, credentials, local configuration, or generated output. Do not stage them without explicit direction.
Decide Whether to Split
Default to one commit containing all intended, related changes. Look for an obvious file-level split only when changes are independent and each group can stand alone.
Keep these together:
- Implementation and its tests.
- Documentation that describes the same change.
- Dependency manifests and their lockfiles.
Do not invent a split for adjacent work, use hunk-level staging, or force the user to reorganize a coherent change. If an obvious split exists, propose each commit with its files and full message, then ask once for approval. If not, propose one commit.
Approve, Stage, Commit
Before making any write, show:
- The files in each proposed commit.
- The full title and 1-5 line body for each commit.
- Any excluded files and why they are excluded.
Ask for approval unless the user explicitly authorizes committing immediately. After
approval, stage only the files for the approved commit with git add -- <paths> and
inspect git diff --cached --name-status and git diff --cached again. If the staged snapshot
contains any unapproved file, stop and ask how to handle it. Then commit with the proposed title
and body. Do not amend, rebase, push, or include unapproved files.
Repository commit hooks are the final message validation when configured. Never bypass a failing hook. Report the commit hash on success; report the error and leave changes intact on failure.
Validate a Commit Message
When the user asks to validate a message, check:
- It follows
type(scope): imperative title. - The type is listed above and the scope is lowercase.
- The title is lowercase, imperative, concise, and has no trailing period.
- A body follows after a blank line and contains 1-5 meaningful lines.
- Breaking changes use both
!and aBREAKING CHANGE:footer.
Return specific corrections and a revised message. When the repository configures commitlint, use it as the authoritative validation rule.
Delegated: Pull Request Creation
If the user wants to create a PR after committing, invoke the
code-pull-request skill. It detects the platform
(GitHub/GitLab), finds a template, generates the body, and opens the PR via gh
or glab.
Input Methods
| Input | Action |
|---|---|
| User says "commit" or "git commit" | Inspect the worktree, propose coherent commit(s), then commit after approval |
| User says "validate commit" | Check the commit message format |
| User pastes commit message | Validate the provided message |
Error Handling
- If there are no changes: report that there is nothing to commit.
- If Git is not initialized: report it; do not initialize a repository unless asked.
- If a commit fails: show the error, preserve the worktree, and do not bypass hooks.
Examples
Input: "I fixed the login bug" Output:
fix(auth): resolve login timeout issue
Correct token expiry calculation so active users are not logged out after five minutes.
Input: "I added a new API endpoint for users" Output:
feat(api): add user profile endpoint
Expose name, email, and avatar URL from `GET /users/:id`.
Closes #89
Input: "I changed the auth API, this breaks old clients" Output:
feat(auth)!: change token validation endpoint
Require a Bearer token on `/auth/verify` instead of a query parameter.
BREAKING CHANGE: Clients must update to send
Authorization header with Bearer token.
Fichiers de cette skill
1Questions sur la skill code-commit
Comment installer la skill code-commit dans Claude Code ?
Exécutez npx degit martinffx/atelier/skills/code-commit ~/.claude/skills/code-commit. Claude Code charge les skills depuis ~/.claude/skills (tous les projets) ou .claude/skills (un seul projet) et utilise une skill lorsque sa description correspond à la tâche.
Quels clients peuvent utiliser la skill code-commit ?
Tout client qui lit le format Agent Skills : Claude Code, Codex, Gemini CLI et claude.ai (envoi sous forme de ZIP). Les scripts de la skill ne s'exécutent que si le client autorise l'exécution de code.
Quel est le format requis pour un message de commit conventionnel ?
Le format se compose d'un type et d'un scope optionnel, suivis d'un titre à l'impératif, et d'un corps optionnel de 1 à 5 lignes.
Comment les breaking changes doivent-ils être indiqués dans un message de commit ?
Les breaking changes peuvent être indiqués en utilisant un point d'exclamation après le type ou le scope, en incluant un footer 'BREAKING CHANGE:', ou les deux.
Quelles étapes l'agent effectue-t-il avant de commiter le code ?
L'agent inspecte le worktree via git status, lit les diffs, liste les fichiers non suivis, vérifie les logs récents et signale les secrets potentiels.