Notre avis
Affiche les différences entre deux commits ou entre un commit et l'arbre de travail, fichier par fichier.
Points forts
- Fournit un détail ligne par ligne des ajouts et suppressions
- Permet de filtrer par fichier ou dossier pour des diff ciblés
- Prend en charge toutes les références de commit (hash, branche, tag, relatif)
Limites
- Ne gère pas les diff entre branches distantes sans fetch préalable
- Peut être lent sur des très gros dépôts ou des plages de commits étendues
- N'affiche pas les statistiques globales (nombre total de fichiers modifiés)
Utilisez cette compétence pour inspecter rapidement les modifications apportées dans un commit récent, comparer deux branches ou examiner l'évolution d'un fichier spécifique.
Ne l'utilisez pas pour des analyses complexes de l'historique ou si vous avez besoin d'un diff interactif avec rejet ou sélection de modifications (préférez alors un outil dédié comme `git difftool`).
Analyse de sécurité
SûrThe skill only runs read-only git diff commands, with no destructive or exfiltrating actions. No risk of executing harmful commands from the skill itself, though user-supplied commit references could be unsafe if not sanitized.
Aucun point d'attention détecté
Exemples
Show diff from HEAD~1 to HEADShow diff from main to feature/authShow diff from HEAD~5 to HEAD for path /src/main.goname: git-diff description: Show changes between two commits or between a commit and the working tree. Returns file-by-file diff information including additions, deletions, and change hunks. allowed-tools: Bash metadata: category: git version: 1.0.0
Git Diff Skill
This skill shows changes between two commits or between a commit and the working tree, providing detailed diff information for each changed file.
Usage
The git-diff skill compares two points in the repository history and returns detailed information about what changed.
Parameters
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | from_commit | string | Yes | - | Starting commit reference (hash, branch, tag, HEAD~n) | | to_commit | string | No | HEAD | Ending commit reference | | path | string | No | - | Filter diff to specific file or directory |
Commit References
You can use various formats for commit references:
- Full commit hash:
abc123def456... - Short hash:
abc123 - Branch name:
main,feature/auth - Tag:
v1.0.0 - Relative:
HEAD~1,HEAD~3 - Range: Compare between any two references
Example Usage
Show changes in the last commit:
Show diff from HEAD~1 to HEAD
Show changes between branches:
Show diff from main to feature/auth
Show changes for a specific file:
Show diff from HEAD~5 to HEAD for path /src/main.go
Result Format
The diff result includes:
- List of changed files with:
- File path (and old path if renamed)
- Status (A=Added, M=Modified, D=Deleted, R=Renamed)
- Number of additions and deletions
- Change hunks with line numbers
- Total additions across all files
- Total deletions across all files
Status Codes
| Code | Meaning | |------|---------| | A | Added - New file | | M | Modified - Existing file changed | | D | Deleted - File removed | | R | Renamed - File moved/renamed | | C | Copied - File copied |
Best Practices
- Use relative references (HEAD~n) for recent changes
- Filter by path for large diffs
- Compare against main/master to see feature changes
- Check both additions and deletions for context
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.