Commit de code avec vérification optionnelle

VérifiéSûr

Analyse les modifications en cours, exécute éventuellement des vérifications (lint, build, test) avant de commiter. Crée une nouvelle branche de fonctionnalité si on est sur main, ajoute les fichiers pertinents et rédige un message de commit conventionnel. Utile pour garantir la qualité du code avant un commit ou pour commiter rapidement sur une nouvelle branche.

Spar Skills Guide Bot
DeveloppementDébutant
15002/06/2026
Claude Code
#git#commit#conventional-commit#development

Recommandé pour

Notre avis

Valide automatiquement le code (lint, build, tests) puis le commit avec un message conventionnel, en créant une branche si nécessaire.

Points forts

  • Assure la qualité du code avant chaque commit via des vérifications
  • Utilise le format de commit conventionnel (`type(scope): description`)
  • Crée automatiquement une branche de fonctionnalité si on est sur main
  • Évite de commiter des fichiers sensibles (secrets, .env)

Limites

  • Dépend des outils de vérification configurés dans le projet (lint, build, test)
  • Ne gère pas les conflits ni les rebases
  • La détection des secrets est basique (noms de fichiers)
Quand l'utiliser

Lorsque vous voulez commiter du code propre et bien formaté en suivant une convention standardisée.

Quand l'éviter

Si vous devez commiter rapidement sans vérifications (utilisez l'option `force`) ou si vos modifications incluent des fichiers sensibles que la compétence ne peut pas filtrer.

Analyse de sécurité

Sûr
Score qualité95/100

The skill runs only standard local git commands (status, diff, log, branch, add, commit) without any destructive actions, network calls, or secret exfiltration. It even advises against committing secret files.

Aucun point d'attention détecté

Exemples

Commit with checks
Commit my changes with checks.
Force commit without checks
Commit my changes with force.

name: commit description: Optionally checks, then commits code to the current or a new feature branch.

When asked to commit code, follow these steps:

Arguments

  • check (default): Run checks first to lint, build, and test the code. Stop if any checks fail.
  • force: Skip the check step and commit directly.

Steps

  1. Run these bash commands in parallel to understand the current state:

    • git status to see all untracked files
    • git diff HEAD to see both staged and unstaged changes
    • git log --oneline -10 to see recent commit messages for style consistency
  2. If you are on the main branch, create a new feature branch using git branch and switch to it.

  3. Analyze all changes and draft a commit message:

    • Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
    • Use the conventional commit format: type(scope): description
    • Keep the first line under 72 characters
    • Do not commit files that likely contain secrets (.env, credentials.json, etc.)
  4. Stage and commit the changes:

    • Add relevant files using git add
    • Use a plain string for the commit message (do not use HEREDOCs).
  5. Report the results including:

    • The commit hash
    • The commit message
Skills similaires