Commits Git non interactifs

VérifiéPrudence

Crée des commits Git atomiques et clairs pour les changements de session, sans confirmation utilisateur, tout en excluant les fichiers temporaires et le dossier thoughts/.

Spar Skills Guide Bot
DeveloppementDébutant
2019/10/2026
Claude Code
#git#commit-workflow#ci-automation#version-control#atomic-commits

Recommandé pour

Notre avis

Crée des commits git atomiques pour les modifications d'une session, avec des messages clairs, sans demander de confirmation à l'utilisateur.

Points forts

  • Découpe les changements en commits logiques et atomiques plutôt qu'en un seul commit fourre-tout
  • S'appuie sur l'historique de la session pour expliquer le pourquoi des changements, pas seulement le quoi
  • Utilise git add avec des fichiers explicites et exclut le répertoire thoughts/
  • Fonctionne sans interaction, adapté aux exécutions de type CI

Limites

  • Effet de bord réel : aucun arrêt pour validation, l'utilisateur doit relancer ou annuler manuellement en cas d'erreur
  • La consigne « Execute upon confirmation » contredit la règle de ne jamais demander de retour, ce qui peut rendre le comportement ambigu
  • Pas de garde-fou explicite contre les secrets ou fichiers sensibles : tout repose sur le jugement du modèle et les règles d'exclusion
Quand l'utiliser

Quand vous voulez que l'agent commite lui-même les changements de la session en commits propres et non interactifs, par exemple dans un flux automatisé.

Quand l'éviter

À éviter si vous souhaitez relire et valider chaque commit avant qu'il soit créé, ou si le dépôt contient des changements que l'agent ne peut pas distinguer des siens.

Analyse de sécurité

Prudence
Score qualité82/100

The skill uses Bash to inspect and commit changes non-interactively. It does not instruct destructive or exfiltrating actions, but committing code is a meaningful side effect and the skill explicitly avoids user confirmation, so caution is appropriate.

Points d'attention
  • •Performs git commit actions without per-commit user confirmation, which can create unintended history if context is misinterpreted.
  • •Uses Bash for git operations, a powerful side-effecting tool, though for a legitimate purpose.
  • •Relies on model judgment to exclude sensitive or unintended files, with only textual safeguards against committing thoughts/ or dummy files.

Exemples

Non-interactive commit run
Commit all the changes from this session as atomic commits without asking me for confirmation.
CI-style grouped commits
Do a CI-style commit pass on the work we just did: group related files into logical commits and skip anything under thoughts/.
Review and commit session diff
Review the session diff with git status and git diff, then create clear imperative-mood commits for the files we changed.

name: ci_commit description: Create git commits for session changes with clear, atomic messages, without prompting the user for confirmation. Side-effecting; user-only — never auto-invoke. Use when the user asks for a non-interactive (CI-style) commit run. model: sonnet allowed-tools: Bash, Read disable-model-invocation: true

Commit Changes

You are tasked with creating git commits for the changes made during this session.

Process:

  1. Think about what changed:

    • Review the conversation history and understand what was accomplished
    • Run git status to see current changes
    • Run git diff to understand the modifications
    • Consider whether changes should be one commit or multiple logical commits
  2. Plan your commit(s):

    • Identify which files belong together
    • Draft clear, descriptive commit messages
    • Use imperative mood in commit messages
    • Focus on why the changes were made, not just what
  3. Execute upon confirmation:

    • Use git add with specific files (never use -A or .)
    • Never commit the thoughts/ directory or anything inside it!
    • Never commit dummy files, test scripts, or other files which you created or which appear to have been created but which were not part of your changes or directly caused by them (e.g. generated code)
    • Create commits with your planned messages until all of your changes are committed with git commit -m

Remember:

  • You have the full context of what was done in this session
  • Group related changes together
  • Keep commits focused and atomic when possible
  • The user trusts your judgment - they asked you to commit
  • IMPORTANT: - never stop and ask for feedback from the user.
Skills similaires