Synthèse automatique
Guide la création de worktrees Git, la rédaction de commits conventionnels et les bonnes pratiques de pull request.
Points forts
- Propose une convention de nommage et un processus de nettoyage des worktrees
- Fournit des types de commits conventionnels accompagnés d’exemples concrets
- Rappelle les règles de formatage du sujet et du corps des messages de commit
Limites
- Ne traite pas les opérations Git avancées comme le rebase ou la résolution de conflits
- Suppose que l’équipe applique déjà la spécification Conventional Commits
- Les consignes sur les pull requests restent générales, sans checklist complète
À utiliser lors de la création de worktrees, la rédaction de messages de commit ou la préparation d’une pull request dans un projet Git.
À éviter pour récupérer un dépôt cassé, résoudre des conflits complexes ou configurer une plateforme d’hébergement Git spécifique.
Analyse de sécurité
SûrThe skill is pure instructional documentation about Git worktrees, conventional commits, and PR conventions. All Bash examples are standard non-destructive git commands (worktree add/list/remove/prune, commit). The --force worktree removal and git prune are legitimate maintenance operations, not system-destructive. No curl|sh piping, no secret exfiltration, no base64 payloads, no disabling of safety controls. The Read tool is not even invoked in examples. No meaningful execution risk.
Aucun point d'attention détecté
Comment cette analyse est faiteExemples
Create a git worktree for the feature/user-authentication branch named following the project convention.Write a conventional commit message for adding JWT token refresh to the auth module, including a short body.Review my staged changes and suggest a conventional commit plus a concise pull request description.name: git-workflow description: Git worktree workflow, conventional commits, commit trailers, and PR guidelines. Activated during git operations and commits. allowed-tools: ['Bash', 'Read']
Git Workflow Expert
This skill provides guidance on Git worktree workflow, commit standards, and PR best practices.
🌳 Git Worktree Workflow
Why Git Worktree?
Git worktree allows working on multiple branches simultaneously without stashing or switching contexts. Each worktree is an independent working directory with its own branch.
Benefits:
- No context switching between branches
- No stashing required
- Parallel development on different features
- Independent builds and tests per branch
Setting Up Worktrees
# Create worktree for feature development
git worktree add ../project-feature-auth feature/user-authentication
# Create worktree for bug fixes
git worktree add ../project-bugfix-api hotfix/api-validation
# Create worktree for experiments
git worktree add ../project-experiment-new-ui experiment/react-19-upgrade
Worktree Naming Convention
../project-<type>-<description>
Types:
feature- New feature developmentbugfix- Bug fixeshotfix- Urgent production fixesexperiment- Experimental changesrefactor- Code refactoring
Examples:
../myapp-feature-user-auth../myapp-bugfix-login-error../myapp-hotfix-security-patch
Managing Worktrees
# List all worktrees
git worktree list
# Show details in long format
git worktree list --porcelain
# Remove worktree after merging
git worktree remove ../project-feature-auth
# Remove worktree (force if dirty)
git worktree remove --force ../project-experiment
# Prune stale worktree information
git worktree prune
Worktree Best Practices
- Clean up after merging - Remove worktrees after feature completion
- Use descriptive names - Follow naming convention
- Keep main worktree clean - Use for stable work only
- Regular pruning - Run
git worktree pruneperiodically
🔧 Commit Standards
Conventional Commits
Follow the Conventional Commits specification:
<type>(<scope>): <subject>
[optional body]
[optional footer]
Commit Types
# New feature
git commit -m "feat(auth): add JWT token refresh mechanism"
# Bug fix
git commit -m "fix(api): handle null response appropriately"
# Documentation
git commit -m "docs(readme): update installation instructions"
# Performance improvement
git commit -m "perf(db): optimize query performance"
# Code refactoring
git commit -m "refactor(core): extract validation logic"
# Testing
git commit -m "test(auth): add unit tests for login flow"
# Build/tooling
git commit -m "build(deps): upgrade react to v18"
# CI/CD
git commit -m "ci(github): add automated deployment workflow"
# Chores
git commit -m "chore(deps): update development dependencies"
# Style changes (formatting, etc.)
git commit -m "style(components): format with prettier"
Commit Type Reference
| Type | Description | Example |
|------|-------------|---------|
| feat | New feature | Adding user authentication |
| fix | Bug fix | Fixing null pointer error |
| docs | Documentation only | Update README |
| style | Formatting changes | Code formatting, no logic change |
| refactor | Code refactoring | Restructure without behavior change |
| perf | Performance improvement | Optimize algorithm |
| test | Adding/updating tests | Add unit tests |
| build | Build system changes | Update webpack config |
| ci | CI/CD changes | Update GitHub Actions |
| chore | Maintenance tasks | Update dependencies |
| revert | Revert previous commit | Revert "feat: add feature" |
Commit Message Guidelines
Subject line:
- Use imperative mood ("add" not "added" or "adds")
- Don't capitalize first letter
- No period at the end
- Maximum 50 characters
Body:
- Wrap at 72 characters
- Explain what and why, not how
- Use bullet points for multiple changes
Example:
git commit -m "$(cat <<'EOF'
feat(api): add user profile endpoint
- Add GET /api/users/:id endpoint
- Include avatar URL in response
- Add rate limiting (100 req/min)
This allows frontend to fetch user details
without additional API calls.
Closes #123
EOF
)"
Commit Trailers
Add metadata to commits using trailers:
# Reference GitHub issue
git commit --trailer "Github-Issue: #123"
# Credit bug reporter
git commit --trailer "Reported-by: John Doe <john@example.com>"
# Reference related commits
git commit --trailer "See-also: abc123"
# Co-author
git commit --trailer "Co-authored-by: Jane Smith <jane@example.com>"
Example with multiple trailers:
git commit -m "$(cat <<'EOF'
fix(auth): resolve token expiration issue
Fixed bug where expired tokens weren't properly
refreshed, causing users to be logged out unexpectedly.
Github-Issue: #456
Reported-by: John Doe <john@example.com>
Reviewed-by: Jane Smith <jane@example.com>
EOF
)"
📝 Pull Request Guidelines
PR Title
Follow the same format as commit messages:
<type>(<scope>): <description>
Examples:
feat(auth): add OAuth2 authenticationfix(api): resolve race condition in data syncdocs(contributing): update contributor guidelines
PR Description Template
## Summary
Brief description of changes (1-3 sentences)
## Changes
- Bullet point list of main changes
- Focus on what and why, not implementation details
- Keep it high-level
## Test Plan
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing performed
- [ ] Edge cases covered
## Breaking Changes
List any breaking changes (if applicable)
## Related Issues
Closes #123
Related to #456
## Screenshots/Videos
(if applicable)
PR Best Practices
- Keep PRs small - Easier to review, faster to merge
- One feature per PR - Don't mix unrelated changes
- Update documentation - Keep docs in sync with code
- Add tests - Don't merge without test coverage
- Respond to reviews - Address feedback promptly
- Squash commits - Clean up commit history before merge
- Delete branch - Clean up after merge
PR Review Checklist
Before requesting review:
- [ ] All tests pass
- [ ] Code is formatted (linter passes)
- [ ] Documentation updated
- [ ] No console.log or debug code
- [ ] Type safety verified (TypeScript)
- [ ] Breaking changes documented
For reviewers:
- [ ] Code follows project conventions
- [ ] Logic is clear and maintainable
- [ ] Edge cases are handled
- [ ] Tests are adequate
- [ ] No security vulnerabilities
- [ ] Performance considerations addressed
🎯 Git Workflow Checklist
Daily workflow checklist:
- [ ] Pull latest changes:
git pull - [ ] Create feature branch or worktree
- [ ] Make atomic commits with conventional format
- [ ] Write meaningful commit messages
- [ ] Push regularly:
git push - [ ] Create PR with proper description
- [ ] Address review feedback
- [ ] Squash commits if needed
- [ ] Merge and delete branch/worktree
💡 Advanced Git Tips
Interactive Rebase
# Clean up last 3 commits
git rebase -i HEAD~3
# Rebase onto main
git rebase -i main
Cherry-pick Commits
# Apply specific commit to current branch
git cherry-pick abc123
# Cherry-pick without committing
git cherry-pick --no-commit abc123
Stash Management
# Stash with message
git stash push -m "WIP: feature in progress"
# List stashes
git stash list
# Apply and drop stash
git stash pop
# Apply specific stash
git stash apply stash@{0}
Bisect for Bug Hunting
# Start bisect
git bisect start
# Mark current as bad
git bisect bad
# Mark known good commit
git bisect good abc123
# Let git find the culprit
# Test each commit and mark good/bad
git bisect good # or bad
# End bisect
git bisect reset
🚫 Common Mistakes to Avoid
❌ Don't:
- Commit directly to main/master
- Use vague commit messages ("fix bug", "update")
- Mix unrelated changes in one commit
- Forget to pull before pushing
- Leave WIP commits in PR
- Skip commit message body for complex changes
✅ Do:
- Use feature branches or worktrees
- Write descriptive conventional commits
- Make atomic commits (one logical change)
- Pull regularly and before pushing
- Squash/reword commits before merging
- Provide context in commit body
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/git-workflow-expert-mmlj2nxq/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/git-workflow-expert-mmlj2nxq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-workflow-expert-mmlj2nxq/download' --output '.skill-downloads/git-workflow-expert-mmlj2nxq/SKILL.md.part' && mv '.skill-downloads/git-workflow-expert-mmlj2nxq/SKILL.md.part' '.skill-downloads/git-workflow-expert-mmlj2nxq/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.
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/git-workflow-expert-mmlj2nxq/SKILL.md' && test -s '.skill-downloads/git-workflow-expert-mmlj2nxq/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/git-workflow' && cp -R '.skill-downloads/git-workflow-expert-mmlj2nxq' '.claude/skills/git-workflow'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/git-workflow-expert-mmlj2nxq'openskills read 'git-workflow-expert-mmlj2nxq'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/git-workflow-expert-mmlj2nxq/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.