Notre avis
Ce skill permet d'exécuter des opérations Git avancées, telles que la gestion de branches, la résolution de conflits, la réécriture d'historique et la récupération de données perdues.
Points forts
- Automatisation des workflows Git complexes avec des commandes précises.
- Prise en charge de la sécurité via une checklist avant toute opération destructive.
- Couverture des opérations courantes (rebase, stash, bisect, worktree) et des scénarios de récupération.
Limites
- Nécessite une validation explicite pour les commandes dangereuses, ce qui peut ralentir l'exécution.
- Certaines opérations (comme le bisect) restent manuelles et dépendent de l'utilisateur.
- Ne gère pas les workflows spécifiques à certains hébergeurs (GitHub, GitLab, etc.) au-delà de `gh`.
À utiliser pour toute opération Git avancée nécessitant une assistance automatisée tout en maintenant un haut niveau de sécurité.
Évitez de l'utiliser pour des tâches Git simples (add, commit, push) qui ne justifient pas la complexité du skill.
Analyse de sécurité
PrudenceThe skill contains commands that can rewrite history or discard local changes, which could cause data loss if used carelessly. However, it explicitly states to never run destructive commands without user confirmation and includes safety checklists. It does not instruct any malicious actions like exfiltrating secrets or running arbitrary scripts.
- •Skill instructs potentially destructive git operations (force push, hard reset, rebase) even though it includes safety warnings and user confirmation requirements.
- •No network exfiltration or code execution beyond standard git operations.
Exemples
Squash the last three commits into one with a combined commit message.I accidentally deleted a branch called 'feature/new-login'. Can you help me recover it using reflog?I have a merge conflict in 'src/app.ts' after rebasing. Walk me through resolving it and continuing the rebase.Git Master Skill
Advanced git operations and workflow management.
Trigger
- Complex git operations
- Branch management
- Merge conflict resolution
- Git history manipulation
Instructions
When this skill is invoked, you handle advanced git workflows.
Safety First
NEVER run without explicit user confirmation:
git push --forcegit reset --hardgit rebaseon shared branches- Any history-rewriting operation
ALWAYS:
- Check current branch before operations
- Verify remote status
- Create backup branches for risky operations
Common Operations
Clean Commit History
# Interactive rebase for cleaning commits
git rebase -i HEAD~n
# Squash commits
git reset --soft HEAD~n
git commit -m "Combined commit message"
Branch Management
# Create and switch to new branch
git checkout -b feature/name
# Update branch with latest main
git fetch origin
git rebase origin/main
# Clean up merged branches
git branch --merged | grep -v "main\|master" | xargs git branch -d
Conflict Resolution
- Identify conflicts:
git status - Open conflicted files
- Choose correct resolution
- Stage resolved files:
git add <file> - Continue:
git rebase --continueorgit merge --continue
Undo Operations
# Undo last commit (keep changes)
git reset --soft HEAD~1
# Undo last commit (discard changes)
git reset --hard HEAD~1
# Undo a specific commit (creates new commit)
git revert <commit-hash>
# Recover deleted branch
git reflog
git checkout -b recovered-branch <commit-hash>
Commit Message Guidelines
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixrefactor: Code restructuringdocs: Documentationtest: Testschore: Maintenance
Example:
feat(auth): add JWT token refresh
Implement automatic token refresh when access token
expires. Refresh happens 5 minutes before expiration.
Closes #123
PR Workflow
# Update feature branch
git fetch origin
git rebase origin/main
# Push (with lease for safety)
git push --force-with-lease
# Create PR
gh pr create --title "feat: description" --body "..."
Stash Operations
# Stash with message
git stash push -m "WIP: feature description"
# List stashes
git stash list
# Apply specific stash
git stash apply stash@{n}
# Pop and delete
git stash pop
Bisect for Bug Finding
# Start bisect
git bisect start
# Mark current as bad
git bisect bad
# Mark known good commit
git bisect good <commit>
# Test each commit, mark good/bad
git bisect good # or git bisect bad
# End bisect
git bisect reset
Worktree for Parallel Work
# Create worktree for different branch
git worktree add ../project-hotfix hotfix-branch
# List worktrees
git worktree list
# Remove worktree
git worktree remove ../project-hotfix
Recovery Patterns
Lost Commits
# Find in reflog
git reflog
# Cherry-pick or checkout
git cherry-pick <commit>
Corrupted Repository
# Verify integrity
git fsck --full
# Recover from remote
git fetch origin
git reset --hard origin/main
Best Practices
- Commit Often: Small, focused commits
- Write Good Messages: Future you will thank you
- Branch Per Feature: Keep main clean
- Rebase Before PR: Clean history
- Never Force Push Main: Protect shared branches
- Use Tags for Releases:
git tag -a v1.0.0 -m "Release 1.0.0"
Dangerous Operations Checklist
Before running destructive commands:
- [ ] On correct branch?
- [ ] Have backup/can recover?
- [ ] Others affected?
- [ ] User explicitly confirmed?
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.