Synthèse automatique
Automatise les commits avec Graphite, incluant la création de branches, les vérifications pré-commit et la mise à jour des métadonnées de PR.
Points forts
- Gère automatiquement la création de branches
- Génère des messages de commit conventionnels
- Exécute les hooks pré-commit
- Met à jour le titre et le résumé de la PR
Limites
- Nécessite Graphite (gt) et pnpm
- Ne fonctionne pas sans ces outils
- Suppose un workflow spécifique avec branche parent staging
Utilisez cette compétence lorsque vous travaillez avec un workflow de branches avec Graphite et des commits conventionnels.
Évitez si vous utilisez un workflow git simple sans Graphite ou si vous avez besoin d'un contrôle manuel des commits.
Analyse de sécurité
PrudenceThe skill operates with powerful tools (Graphite, GitHub CLI, pnpm) that can modify local and remote repository state. While no malicious payloads are included, the unrestricted pnpm usage and autonomous nature increase risk if invoked on a malicious project.
- •Uses pnpm:* which can execute arbitrary scripts defined in package.json, potentially dangerous in untrusted repositories.
- •Autonomous execution without user confirmation could lead to unintended commits or PR updates.
- •gh:* allows full GitHub CLI access, including modifying PR titles/bodies, which could be misused in a compromised context.
Exemples
/commit/commit fix: resolve auth redirect loop/commit --new-branch feat: add user avatar uploadname: commit description: Commit staged changes using Graphite. Checks if on trunk and creates a new branch if needed. Updates PR title and summary after each commit. allowed-tools: Bash(gt:), Bash(git:status), Bash(git:diff), Bash(git:branch), Bash(gh:), Bash(pnpm:*), Read
Commit Skill
Commits changes using Graphite, ensuring proper branch management and PR metadata.
Usage
Invoke with /commit or /commit <message>.
/commit— auto-generates a conventional commit message from the diff/commit fix: resolve auth redirect loop— uses the provided message/commit --new-branch— forces creation of a new branch even if already on a feature branch/commit --new-branch fix: resolve auth redirect loop— combines both
Autonomous Execution
This skill runs fully autonomously without user interaction. When invoked:
- Do NOT ask for user confirmation at any step
- Do NOT pause between tasks or wait for approval
- Proceed directly through all workflow steps
- Only stop if a critical error occurs
Workflow
Step 1: Check Current Branch
Determine the current branch:
git branch --show-current
If the --new-branch flag was passed, always create a new branch regardless of the current branch. Proceed to Step 2a.
If the current branch is main or staging (a trunk branch), you are on trunk and must create a new branch before committing. Proceed to Step 2a.
If already on a feature branch (and --new-branch was not passed), skip to Step 3.
Step 2a: Create a New Branch
Create a new feature branch. First, examine the staged and unstaged changes to determine an appropriate branch name:
git diff --stat
git diff --staged --stat
Generate a descriptive kebab-case branch name based on the changes (e.g., fix/auth-redirect-loop, feat/add-user-avatar, chore/update-dependencies).
Create the branch with Graphite:
gt create <branch-name>
gt create automatically stacks the new branch on top of the current branch. This means:
- If on trunk (
main/staging), the new branch's parent is trunk - If on a feature branch (e.g., via
--new-branch), the new branch stacks on top of that feature branch
Step 2b: Track Parent (only when creating from trunk)
If the new branch was created from main or staging (i.e., NOT via --new-branch from a feature branch), ensure it targets staging:
gt track --parent staging
Skip this step when --new-branch was used from a feature branch — the branch is already correctly stacked on the current branch by gt create.
Step 3: Stage Changes
Check for unstaged changes:
git status
If there are unstaged changes, stage all of them:
gt add .
If the user specified specific files, stage only those files instead.
Step 4: Review the Diff
Get the full diff of staged changes:
git diff --staged
Analyze the diff to understand:
- What type of change this is (feat/fix/refactor/docs/chore/test/style)
- What scope/area is affected
- What the changes accomplish
Step 5: Run Pre-Commit Checks
Run formatting and tests on changed files:
pnpm pre-commit
If pre-commit fails:
- Review the failures
- Fix any formatting issues automatically
- Re-stage the fixed files with
gt add . - Re-run
pnpm pre-commit - If tests fail, report the failures and stop — do not commit broken code
Step 6: Create the Commit
Generate a conventional commit message if one was not provided. The message format:
type(scope): concise description
Optional body with more detail if the change is complex.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Type: feat, fix, refactor, docs, chore, test, style, perf
Scope: The affected package or area (e.g., landing, web, mobile, orpc, ui)
Create the commit:
gt modify -c -m "$(cat <<'EOF'
type(scope): concise description
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"
Use a HEREDOC to preserve multi-line formatting.
Step 7: Submit PR
Create or update the PR with Graphite:
gt submit
This will create a new PR if one doesn't exist, or update the existing one.
Step 8: Update PR Title and Summary
After submitting, get the full commit history for this branch:
gh pr view --json number,title,body,headRefName,commits
And get the full diff against the base branch:
gh pr diff
Analyze ALL commits and the full diff to generate:
-
PR Title — conventional commit format covering the overall change:
feat(scope): descriptionfor new featuresfix(scope): descriptionfor bug fixesrefactor(scope): descriptionfor refactoringdocs(scope): descriptionfor documentationchore(scope): descriptionfor maintenance- If the PR has mixed types, use the most significant one
-
PR Summary — structured markdown body:
## Summary
<1-3 bullet points describing what this PR does>
## Changes
<Bulleted list of specific changes made>
## Test Plan
<How to verify the changes work>
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Update the PR:
gh pr edit --title "type(scope): description" --body "$(cat <<'EOF'
## Summary
...
## Changes
...
## Test Plan
...
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
Step 9: Report Result
Output a summary to the user:
✓ Committed: type(scope): description
✓ PR #<number> updated: <title>
<PR URL>
Edge Cases
- No changes to commit: If
git statusshows no changes, report "Nothing to commit" and stop - Branch already exists: If
gt createfails because the branch exists, usegt branch checkout <name>instead - PR submit fails: If
gt submitfails, report the error — the commit was still made successfully - Pre-commit hook failure: Fix formatting issues and retry. If tests fail, stop and report
Important Rules
- Always use
gtcommands for branch/commit operations (never rawgit commit) - Always run
pnpm pre-commitbefore committing - Always include
Co-Authored-Bytrailer in commit messages - Always update PR title and summary after each commit using the full diff
- Branch names use kebab-case with type prefix (e.g.,
feat/thing,fix/bug) - New branches target staging via
gt track --parent staging
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/commit-with-graphite-mm5t89yl' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/commit-with-graphite-mm5t89yl/download' --output '.skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md.part' && mv '.skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md.part' '.skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash(gt:*), Bash(git:status), Bash(git:diff), Bash(git:branch), Bash(gh:*), Bash(pnpm:*), Read
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md' && test -s '.skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/commit' && cp -R '.skill-downloads/commit-with-graphite-mm5t89yl' '.claude/skills/commit'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/commit-with-graphite-mm5t89yl'openskills read 'commit-with-graphite-mm5t89yl'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/commit-with-graphite-mm5t89yl/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.