Commits intelligents et logiques

VérifiéSûr

Analyse les modifications et propose de les regrouper en commits logiques selon leur nature (feature, refactoring, correctif) et leur portée. Présente un tableau concis du plan avant de demander confirmation et exécute les commits par lots. Utile pour éviter les commits trop volumineux ou désorganisés.

Spar Skills Guide Bot
DeveloppementIntermédiaire
8002/06/2026
Claude Code
#git#commit#changes#logical-grouping

Recommandé pour

Notre avis

Analyse les modifications en cours et propose des commits logiques et bien structurés.

Points forts

  • Évite les commits trop volumineux ou mélangeant plusieurs sujets.
  • Propose un plan clair avant exécution, avec possibilité d'ajustement.
  • Garantit que chaque commit est indépendant et cohérent.

Limites

  • Ne gère pas les conflits de fusion ou les rebases.
  • Nécessite que l'utilisateur valide manuellement chaque étape.
Quand l'utiliser

Lorsque vous avez plusieurs modifications non liées dans votre répertoire de travail et que vous souhaitez des commits propres par sujet.

Quand l'éviter

Pour un simple commit unique évident, ou si vous utilisez un outil GUI de versioning.

Analyse de sécurité

Sûr
Score qualité90/100

The skill only uses standard git commands for status, diffing, staging, and committing. It requires user confirmation before any changes are made. There are no destructive or obfuscated actions, no network calls, and no data exfiltration risks.

Aucun point d'attention détecté

Exemples

Analyze and split changes
Analyze my current git changes and help me commit them in logical chunks.
Commit groups by type
I have changes for a bug fix and a new feature. Can you group them into separate commits?
Review and execute plan
Show me a commit plan for my current changes and wait for my approval before executing.

description: Analyze changes and commit in logical chunks allowed-tools: Bash(git *)

Smart Commit

Step 1: Analyze All Changes

!git status !git diff !git diff --cached

Step 2: Plan Logical Commits

Group changes by these dimensions:

  • Feature work vs refactoring vs bug fixes
  • Area/scope (which part of the wiki? config, content, infra, skin, extensions?)
  • Content vs infrastructure
  • Deps/config vs behavior changes
  • Docs vs code

If everything belongs together -> single commit. If changes span multiple concerns -> plan multiple commits.

Step 3: Present the Plan (CONCISE)

Show a brief table - one row per commit group:

| # | Message | Files | |---|---------|-------| | 1 | fix(config): correct upload size limit in LocalSettings | 1 file | | 2 | feat(content): add Poi article draft | 2 files |

Do NOT:

  • List every file individually
  • Explain what each file does
  • Provide detailed breakdowns
  • Add commentary about the changes

Just: commit message + file count. User can ask for details if needed.

Wait for confirmation before proceeding.

Step 4: Execute

For each planned commit:

  1. Stage only the relevant files: git add <files>
  2. For mixed files, use patch staging: git add -p <file>
  3. Commit with the planned message
  4. Verify with git status

After all commits, show git log --oneline -n <count> to confirm.

Rules

  • Never commit unrelated changes together
  • If a commit can't be described in one line, it's too broad--split it
  • Each commit should be independently meaningful
  • Think: "Will this make sense when generating the changelog?"
Skills similaires