contextual-commit
Ce qu’il fait
Ce skill rédige des messages de commit qui conservent le raisonnement derrière les modifications de code, comme l'intention, les décisions et les contraintes. Il s'adresse aux développeurs qui veulent que les futurs lecteurs comprennent pourquoi le code a été écrit ainsi.
Quand l’utiliser
- ✓Quand vous faites un commit de code ou terminez une tâche.
- ✓Quand vous demandez à l'agent de faire un commit des modifications.
- ✓Quand une modification a été façonnée par des contraintes ou des compromis que le seul diff ne montre pas.
Lien du skill
https://github.com/yamadashy/repomix/blob/main/.agents/skills/contextual-commit/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Fais le commit de ces modifications et note pourquoi nous avons choisi cette approche, ainsi que la contrainte qui l'a façonnée.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent conserve la ligne d'objet standard du commit, puis ajoute au corps des lignes d'action typées qui expliquent l'intention, les décisions, les contraintes et ce qui a été appris.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
Contextual Commits
You write commits that carry development reasoning in the body — the intent, decisions, constraints, and learnings that the diff alone cannot show.
The Problem You Solve
Standard commits preserve WHAT changed. The diff shows that too. What gets lost is WHY — what the user asked for, what alternatives were considered, what constraints shaped the implementation, what was learned along the way. This context evaporates when the session ends. You prevent that.
Commit Format
The subject line is a standard Conventional Commit. The body contains action lines — typed, scoped entries that capture reasoning.
type(scope): subject line (standard conventional commit)
action-type(scope): description of reasoning or context
action-type(scope): another entry
Subject Line
Follow Conventional Commits exactly. Nothing changes here:
feat(auth): implement Google OAuth providerfix(payments): handle currency rounding edge caserefactor(notifications): extract digest scheduling logic
Action Lines
Each line in the body follows: action-type(scope): description
scope is a human-readable concept label — the domain area, module, or concern. Examples: auth, payment-flow, oauth-library, session-store, api-contracts. Use whatever is meaningful in this project's vocabulary. Keep scopes consistent across commits when referring to the same concept.
Action Types
Use only the types that apply. Most commits need 1-3 action lines. Never pad with noise.
intent(scope): ...
What the user wanted to achieve and why. Captures the human's voice, not your interpretation.
intent(auth): social login starting with Google, then GitHub and Appleintent(notifications): users want batch notifications instead of per-event emailsintent(payment-flow): must support EUR and GBP alongside USD for enterprise clients
When to use: Most feature work, refactoring with a purpose, any change where the motivation isn't obvious from the subject line.
decision(scope): ...
What approach was chosen when alternatives existed. Brief reasoning.
decision(oauth-library): passport.js over auth0-sdk for multi-provider flexibilitydecision(digest-schedule): weekly on Monday 9am, not daily — matches user researchdecision(currency-handling): per-transaction currency over account-level default
When to use: When you evaluated options. Skip for obvious choices with no real alternatives.
rejected(scope): ...
What was considered and explicitly discarded, with the reason. This is the highest-value action type — it prevents future sessions from re-proposing the same thing.
rejected(oauth-library): auth0-sdk — locks into their session model, incompatible with redis storerejected(currency-handling): account-level default — too limiting for marketplace sellersrejected(money-library): accounting.js — lacks support for sub-unit (cents) arithmetic
When to use: Every time you or the user considered a meaningful alternative and chose not to pursue it. Always include the reason.
constraint(scope): ...
Hard limits, dependencies, or boundaries discovered during implementation that shaped the approach.
constraint(callback-routes): must follow /api/auth/callback/:provider pattern per existing conventionconstraint(stripe-integration): currency required at PaymentIntent creation, cannot change afterconstraint(session-store): redis 24h TTL means tokens must refresh within that window
When to use: When non-obvious limitations influenced the implementation. Things the next person working here would need to know.
learned(scope): ...
Something discovered during implementation that would save time in future sessions. API quirks, undocumented behavior, performance characteristics.
learned(passport-google): requires explicit offline_access scope for refresh tokens, undocumented in quickstartlearned(stripe-multicurrency): presentment currency and settlement currency are different conceptslearned(exchange-rates): Stripe handles conversion — do NOT store our own rates
When to use: "I wish I'd known this before I started" moments. Library gotchas, API surprises, non-obvious behaviors.
Before You Write the Commit
Determine the commit scope, then compose action lines:
- Check for staged changes first — run
git diff --cached --stat.- If staged changes exist: these are the commit scope. Do no
Questions fréquentes
Modifie-t-il le format de l'objet du commit ?
Non. La ligne d'objet suit le format standard Conventional Commits.
Que met-on dans le corps ?
Des lignes d'action typées qui décrivent le raisonnement, comme les décisions, les contraintes et les enseignements.
Pourquoi ne pas simplement décrire la modification ?
Le diff montre déjà ce qui a changé, tandis que le corps conserve le pourquoi, qui serait sinon perdu.
Détails
Description originale de l’auteur
Write contextual commits that capture intent, decisions, and constraints alongside code changes. Use when committing code, finishing a task, or when the user asks to commit. Extends Conventional Commits with structured action lines in the commit body that preserve WHY code was written, not just WHAT changed.
repo: yamadashy/repomix
Popularité
- Étoiles GitHub
- 29k
- Position au classement
- #9762
- Licence
- MIT
- Mis à jour
- 01/11/2026
Commentaires
- …
Autres skills de ce dépôt
repomix
29kAide votre agent à regrouper un projet de code entier dans un seul fichier adapté à l'IA, afin qu'il puisse explorer la structure, repérer les motifs et compter les tokens.
agent-carnet
29kPermet à votre agent d'enregistrer, de retrouver et d'organiser de courtes notes qui persistent d'une session à l'autre. Chaque note réinitialise son délai de 30 jours lorsqu'elle est utilisée, et les notes inutilisées partent à la…
repomix-explorer
29kAide votre agent à explorer une base de code inconnue, locale ou distante, en la regroupant puis en lisant le résultat pour expliquer sa structure et repérer des motifs.
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.