Commit Git

VérifiéSûr

Créez des commits Git de haute qualité en analysant les modifications, en exécutant les agents pertinents et en composant les messages de commit.

Spar Skills Guide Bot
DeveloppementIntermédiaire
25/07/2026
Claude Code
#git#commits#changelog#code-review#workflow

Recommandé pour

Synthèse automatique

Ce skill analyse les modifications Git en attente, lance des sous-agents de vérification ciblés sur les fichiers modifiés, puis crée un ou plusieurs commits Git au format cohérent avec l'historique du dépôt.

Points forts

  • Collecte le contexte en parallèle (diff, diff --cached, status, log) et s'aligne sur le style des 20 derniers messages de commit
  • Lance séquentiellement des sous-agents pertinents (copy-editor, qa-fixer, changelog) uniquement sur les fichiers réellement modifiés
  • Décide quand découper en plusieurs commits logiques et gère les fichiers incidents comme CHANGELOG.md ou dictionary.txt
  • Reconnaît les mises à jour cruft/Wiswa et les regroupe en un commit unique sans lancer d'agents ni toucher au changelog

Limites

  • Fortement lié à Claude Code : repose sur l'outil Agent, le dossier .claude/agents/ et des agents nommés propres à ce projet
  • Suppose une convention de préfixe de composant et un fichier CHANGELOG.md, donc peu transposable tel quel à un autre dépôt
  • La liste des agents à exécuter est codée en dur pour des chemins (src/, jxa_lib/, package.json) spécifiques à ce projet
Quand l'utiliser

À utiliser lorsqu'il reste des modifications non commitées et que l'on veut des commits propres, bien découpés et conformes au style du dépôt.

Quand l'éviter

À éviter sur un dépôt sans les agents .claude/agents/ attendus ou lorsque l'on veut garder un contrôle manuel total sur le découpage et les messages de commit.

Analyse de sécurité

Sûr
Score qualité88/100

The skill only instructs running read-only Git inspection commands (git diff, git status, git log) and launching internal agent tools for code review and changelog updates. There are no destructive operations, network calls, secret exfiltration, obfuscated payloads, or safety bypasses. The commands are standard and legitimate for version control workflows.

Aucun point d'attention détecté

Comment cette analyse est faite

Exemples

Commit pending work
Commit all my pending changes with good messages.
Split changes into logical commits
Look at what I've changed and split it into sensible logical commits, following our usual commit style.
Changelog on user-facing change
I changed the CLI flags in src/ — review the changes, update the changelog if needed, and commit.

Commit

Create high-quality Git commits for all pending changes.

Gathering context

Run these in parallel:

  1. git diff - unstaged changes.
  2. git diff --cached - staged changes.
  3. git status - untracked files and overall state.
  4. git log --no-merges --format='%s%n%b---' -20 | grep -v '^bump:' | grep -iv dependabot - recent commit message style examples.

Running agents

After gathering context but before committing, determine which agents to run based on the changed files. Launch each agent sequentially using the Agent tool with subagent_type general-purpose, telling it to follow the corresponding .claude/agents/<name>.md file. Scope each agent to only the changed files, not the entire project.

You must skip any agents that are not relevant to the changed files (e.g. if no Click command files changed, skip the click-auditor).

When TypeScript code is being committed

If any changed files are under src/, run the following agents in order:

  1. copy-editor - fix prose in comments, JSDoc, and strings.
  2. qa-fixer - format and fix lint/spelling issues.

When user-facing changes are being committed

  • changelog - update CHANGELOG.md only for user-facing changes (behaviour, CLI, public API, security, or meaningful dependency constraints that affect installs). After it completes, check if CHANGELOG.md was modified (git diff CHANGELOG.md). If it was, stage it with the relevant commit. Follow .claude/agents/changelog.md, including its skip list.

    Files under jxa_lib/, src/, or dependency/version changes in package.json are candidates for the changelog agent only when they change what users see or how the software behaves. Editing those paths is not sufficient on its own.

    Skip the changelog agent for workflows, CI config, .claude/, documentation-only churn, cruft or generator clean-up (for example replacing template placeholders such as unknown in repository URLs, badges, packaging metadata, or CODEOWNERS with the real project identity), internal refactors with no behaviour change, and other non-user-facing work.

Analysing changes

Group changed files by component. Determine if one commit or multiple logical commits are needed.

Incidental files

The following files do not count when determining the component prefix, unless they are the only file in a commit:

  • CHANGELOG.md
  • .vscode/dictionary.txt

For example, if a commit contains src/index.ts, and CHANGELOG.md, the component is determined by the source files only. CHANGELOG.md is simply staged alongside them.

If CHANGELOG.md is the only file being committed, use the changelog: prefix. If .vscode/dictionary.txt is the only file, use dictionary: prefix.

When to split into multiple commits

  • Changes span unrelated components.
  • A refactor and a bug fix in the same file should be separate commits.
  • New tests for existing code should be separate from the code changes they test only if the code changes are themselves separate.
  • Dictionary updates (.vscode/dictionary.txt) should be committed first with message dictionary: update.

Cruft updates

When all changes are from re-running Wiswa (the project generator) and no hand-written code changed, this is a cruft update. Indicators:

  • Only Wiswa-managed files changed (workflows, package.json, tsconfig.json, .pre-commit-config.yaml, .claude/agents/, .claude/rules/, CITATION.cff, .vscode/dictionary.txt, .wiswa.jsonnet, etc.).
  • No files under the primary module or src/ changed.

Commit everything in a single commit with the subject cruft: update. Include a body summarising what changed (e.g. new/updated workflows, updated agent files, dependency version bumps, new managed files). Do not run any agents. Do not split into multiple commits. Do not update the changelog.

When a single commit is fine

  • All changes serve the same purpose within a closely related set of files.
  • A bug fix and its test.

Commit message format

component.name: short description

Optional longer description explaining the why, not the what. Wrap at 72
characters.

Signed-off-by: Author Name <email>
Closes: #123

Subject line rules

  • Format: component.name: short description. Component name must be lowercase and must skip the first period if present (vscode not .vscode, README.md -> readme not README), and must omit the period with extension.
  • Lowercase after the colon (unless a proper noun).
  • No period at the end.
  • Maximum 72 characters.
  • Use imperative mood: 'add', 'fix', 'update', 'remove', not 'added', 'fixes', 'updated'.

Component prefix rules

For TypeScript files, strip the src/ prefix and use the file name (without extension) as the component.

  • Source file src/index.ts → index:.
  • Multiple files under src/ → src:.
  • Workflow file .github/workflows/qa.yml → workflows/qa:.
  • Multiple workflows → workflows/*:.
  • Agent files .claude/agents/*.md → .claude: or specific agent name.
  • Instruction files across all 3 locations → project: (since they span Copilot/Cursor/Claude).
  • Dictionary .vscode/dictionary.txt → dictionary: (only when committed alone).
  • Top-level config (tsconfig.json, package.json) → project:.
  • If changes span many unrelated areas → project:.
  • CHANGELOG.md → changelog: (only when committed alone).
  • CONTRIBUTING.md → contributing:.

Trailers

  • Closes: #N - when a commit closes an issue. If it is another project, use the full URI.
  • Fixes: #N - when a commit fixes a bug reported in an issue. If it is another project, use the full URI.
  • Related: #N - when a commit is related to an issue but does not fully close or fix it. If it is another project, use the full URI.
  • Reviewed-by: - if applicable.
  • Co-authored-by: - if applicable.
  • Reported-by:: - if applicable. Could get this information from a bug report that led to the fix if the issue ID/URL is known.
  • Signed-off-by: - always included on every commit. This will be added with -s.

Making commits

Run commands separately. Do not chain commands with && or ;. Do not use scripts.

  1. Stage files for each logical commit using git add with specific file paths.
  2. If CHANGELOG.md was updated by the changelog agent, stage it with the relevant commit.
  3. Create the directory if it does not exist: mkdir -p .wiswa-ci. Skip if it already exists.
  4. Create a unique temp file with mktemp .wiswa-ci/message-XXXXXXXX. Write the commit message there using the Write tool (not Bash echo or cat)
  5. Commit with git commit -S -s -F <tempfile> without using the sandbox.
  6. If a pre-commit hook fails, fix the issue, re-stage (use appropriate agent if there is one), and try to commit again.
  7. After all commits, run git status to verify clean state.

Temp commit message files under .wiswa-ci/ do not need to be deleted after a successful commit; you may leave them in place.

Rules

  • Never use --no-verify or --no-gpg-sign.
  • Amend the previous commit when the new change is logically part of it (e.g. same file, same topic, fixing something just committed). Create a new commit when the change is distinct.
  • Never push unless explicitly asked.
  • Always use -S for GPG signing and -s for sign-off.
  • If there are no changes, do nothing.
  • Stage specific files, never use git add -A or git add ..

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/git-commit-mrzxuok2/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/git-commit-mrzxuok2' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-commit-mrzxuok2/download' --output '.skill-downloads/git-commit-mrzxuok2/SKILL.md.part' && mv '.skill-downloads/git-commit-mrzxuok2/SKILL.md.part' '.skill-downloads/git-commit-mrzxuok2/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/git-commit-mrzxuok2/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires