Commit standardisé

VérifiéPrudence

Prépare et valide les changements Git avec un format de message standardisé suivant les conventions conventionnelles. Facilite la relecture et l'historique du code.

Spar Skills Guide Bot
DeveloppementDébutant
2002/06/2026
Claude Code
#git#commits#conventional-commit#code-quality

Recommandé pour

Notre avis

Effectue le stage et le commit des modifications en utilisant un format standardisé avec des préfixes de type.

Points forts

  • Impose un format de message de commit cohérent
  • Ajoute automatiquement les fichiers pertinents
  • Évite de commiter les fichiers sensibles comme .env
  • Utilise des types de commit conventionnels pour la clarté

Limites

  • Peut ne pas gérer les scénarios de branchement complexes
  • Dépend de la sortie git status qui peut être incomplète pour les fichiers non suivis
  • Commit sans confirmation, ce qui pourrait accidentellement inclure des modifications non liées
Quand l'utiliser

Utilisez-le lorsque vous devez effectuer un commit avec un message clair et standardisé suivant les conventions.

Quand l'éviter

Évitez-le lorsque vous devez rédiger un corps de message détaillé ou lorsque les modifications ne sont pas prêtes pour un commit unique cohérent.

Analyse de sécurité

Prudence
Score qualité88/100

The skill automates git commit operations which can modify repository history. While it uses shell commands, these are standard and limited to staging and committing. There is no destructive pattern, exfiltration, or disabling of safeguards. The instruction to avoid staging secrets is present but not enforced. Overall, it is legitimate but warrants caution due to automated file modification.

Aucun point d'attention détecté

Exemples

Standard commit
Stage and commit my changes with a proper conventional commit message.
Specific commit type
Commit the staged changes with type 'feat' and description 'add user authentication'.

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