Commit standardisé

VérifiéPrudence

Cette compétence automatise la mise en scène (stage) des fichiers pertinents et rédige des messages de commit au format conventionnel (type : description). Elle s'appuie sur le statut et le diff Git pour décider ce qui doit être indexé et garantit des messages concis, impératifs et de moins de 72 caractères. Utile pour maintenir un historique de commits cohérent sans mise en forme manuelle.

Spar Skills Guide Bot
DeveloppementIntermédiaire
6002/06/2026
Claude Code
#git#commit-messages#version-control#conventional-commits

Recommandé pour

Notre avis

Ajoute les modifications pertinentes et crée un message de commit bien formaté selon les normes de commits conventionnels.

Points forts

  • Ajoute automatiquement les changements de manière intelligente en regroupant les fichiers liés
  • Impose un format de message de commit clair et cohérent
  • Réduit la charge cognitive liée à la structure du message de commit
  • Évite automatiquement de commiter les fichiers sensibles comme .env

Limites

  • Peut ne pas toujours regrouper correctement les changements non liés s'ils apparaissent ensemble
  • Se base sur le jugement du modèle pour l'ajout, qui peut parfois oublier des fichiers
  • Ne supporte qu'un ensemble fixe de types de commit
Quand l'utiliser

Utilisez lorsque vous voulez commiter rapidement des modifications avec un message bien formaté sans saisie manuelle.

Quand l'éviter

Ne l'utilisez pas si vous devez rédiger un message de commit détaillé sur plusieurs lignes ou si vous souhaitez examiner manuellement les modifications ajoutées.

Analyse de sécurité

Prudence
Score qualité90/100

The skill automates git staging and committing, which is a powerful operation. While it instructs to avoid secret files, the AI's judgment may not be perfect, and the commit happens without user review. No destructive or exfiltrating actions.

Points d'attention
  • Automatically stages and commits changes without user confirmation, relying on AI to avoid staging secrets. Risk of accidentally committing sensitive files.

Exemples

Commit staged changes
commit the changes
Commit with specific type
commit these changes as a fix
Commit all current work
stage and commit everything I've done

name: commit description: Stage and commit changes with standardized format user-invocable: true disable-model-invocation: true

Standardized Commit

Current State

!git status --short

!git diff --stat

!git diff --cached --stat

Instructions

Based on the git status and diff above:

  1. Stage changes if not already staged:

    • Stage relevant files (use judgment on what belongs together)
    • Do not stage unrelated changes
    • Do not stage files that likely contain secrets (.env, credentials, tokens)
  2. Write commit message in this format:

    <type>: <description>
    

    Types:

    • fix: Bug fix
    • feat: New feature
    • refactor: Code restructuring (no behavior change)
    • docs: Documentation only
    • test: Adding/updating tests
    • chore: Build, config, tooling changes

    Rules:

    • Description is lowercase, no period at the end
    • Keep under 72 characters total
    • Be specific: not "fix bug" but "fix null pointer in request handler"
    • Use imperative mood: "add feature" not "added feature"
  3. Commit without asking for confirmation. Use a HEREDOC for the message:

    git commit -m "$(cat <<'EOF'
    <type>: <description>
    EOF
    )"
    

Examples

Good:

  • fix: handle empty response in sglang backend
  • feat: add per-user rate limiting middleware
  • refactor: extract token validation to separate module
  • docs: update sglang disaggregation deployment guide
  • chore: bump maturin version to 1.8

Bad:

  • Fix bug (too vague, wrong case)
  • Updated code (meaningless, past tense)
  • WIP (not a complete commit)
  • fix: fix the thing. (period, vague)
Skills similaires