Commit de code avec vérifications

VérifiéPrudence

Vérifie et valide le code avant de le commiter sur une branche. Utilise le format de commit conventionnel et gère automatiquement la création de branches de fonctionnalités.

Spar Skills Guide Bot
DeveloppementIntermédiaire
3002/06/2026
Claude CodeCursorWindsurfCopilotCodex
#commit#git#conventional-commit#version-control

Recommandé pour

Notre avis

Validation puis commit du code sur une nouvelle branche ou la branche courante, avec messages conventionnels.

Points forts

  • Respecte le format conventional commit (type(scope): description)
  • Option de vérification avant commit (lint, build, tests)
  • Crée automatiquement une branche si sur main

Limites

  • Ne gère pas les conflits de merge
  • La vérification automatisée peut échouer si l'environnement de test n'est pas configuré
  • Les fichiers sensibles sont exclus, mais l'utilisateur doit valider
Quand l'utiliser

Pour normaliser et sécuriser le processus de commit en équipe ou sur des projets structurés.

Quand l'éviter

Pour des commits rapides et informels où la convention est superflue ou quand l'environnement de vérification n'est pas fiable.

Analyse de sécurité

Prudence
Score qualité80/100

The skill requires executing git commands and potentially running arbitrary checks (lint, build, test) that may involve custom scripts. While not inherently destructive, it delegates significant execution authority to the AI agent, which could be exploited in a malicious repo context.

Points d'attention
  • Instructs running bash commands in parallel, which could include arbitrary build/test execution without explicit safety boundaries.

Exemples

Commit with check
Please commit my changes with a conventional commit message. Run checks first.
Force commit
Commit my changes directly without any checks, using force mode.
Commit from main
I'm on main, please commit my changes to a new feature branch with a proper commit message.

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