git-pr
Crée une Pull Request GitHub standard avec workflow complet : QA, commits, assignation milestone/projet, code review automatique.
When & Why to Use This Skill
The Git PR skill is a comprehensive automation tool designed to streamline the GitHub Pull Request workflow. It automates the entire lifecycle of a contribution, from running smart QA checks and analyzing git changes to generating intelligent PR descriptions and performing multi-agent code reviews. By integrating safety protocols and supporting both interactive and headless modes, it ensures high-quality code submissions while significantly reducing the manual overhead of repository management.
Use Cases
- Automated PR Lifecycle Management: Streamline the process of pushing code and creating standardized Pull Requests with intelligent descriptions and Conventional Commit titles.
- Pre-Submission Quality Control: Execute automated 'Smart QA' scripts and multi-agent reviews to detect silent failures and test coverage gaps before the code reaches the main branch.
- Project & Milestone Organization: Automatically assign new Pull Requests to specific GitHub milestones and project boards based on environment configurations or command arguments.
- Standardized Team Workflows: Enforce consistent PR templates and review standards across a development team using centralized scripts and .env.claude configurations.
| name | git-pr |
|---|---|
| description | > |
| allowed-tools | [Bash, Read, Write, TodoWrite, AskUserQuestion] |
| model | claude-sonnet-4-5-20250929 |
Git PR Skill (Standard)
Usage
/git:pr [branche-base] [milestone] [projet] [--no-interaction] [--delete] [--no-review]
Configuration
CORE_SCRIPTS="${CLAUDE_PLUGIN_ROOT}/skills/git-pr-core/scripts"
PR_TEMPLATE_PATH=".github/PULL_REQUEST_TEMPLATE/default.md"
ENV_FILE_PATH=".env.claude"
Workflow
Charger configuration depuis
.env.claude:- Vérifier si le fichier
.env.claudeexiste à la racine du projet - Si oui, parser les variables (format
KEY=VALUE) :MAIN_BRANCH: branche de base par défautPROJECT: projet GitHub par défaut
- Pour chaque paramètre manquant dans les arguments :
- Utiliser la variable d'env correspondante si elle existe
- Ignorer
.env.claudesi absent (comportement standard)
- Vérifier si le fichier
Confirmation initiale :
- Si flag
--no-interactionprésent :- Passer toutes les confirmations
- Utiliser les valeurs pré-remplies (arguments +
.env.claude) sans validation - Continuer directement à l'étape 3
- Sinon :
- Confirmer à l'utilisateur que la skill
git:prest lancée - Résumer tous les paramètres reçus :
- Branche de base (si fournie)
- Milestone (si fourni)
- Projet (si fourni)
- Flags :
--delete,--no-review(si présents)
- Demander confirmation explicite avant de continuer
- Confirmer à l'utilisateur que la skill
- Si flag
Vérifier scopes GitHub (
$CORE_SCRIPTS/check_scopes.sh)Vérifier template PR (
$CORE_SCRIPTS/verify_pr_template.sh)Lancer QA intelligente (
$CORE_SCRIPTS/smart_qa.sh)Analyser changements git (
$CORE_SCRIPTS/analyze_changes.sh)Confirmer branche de base (ou
AskUserQuestion)Générer description PR intelligente
Push et créer PR avec titre Conventional Commits (
$CORE_SCRIPTS/create_pr.sh)Assigner milestone (
$CORE_SCRIPTS/assign_milestone.py- voir git-pr-core/SKILL.md pour usage)Assigner projet GitHub (
$CORE_SCRIPTS/assign_project.py- voir git-pr-core/SKILL.md pour usage)Code review automatique (si plugin review installé)
Nettoyage branche locale (
$CORE_SCRIPTS/cleanup_branch.sh- branche remote préservée)
Code Review
Si plugin review installé, lance 4 agents en parallèle :
code-reviewer- Conformité CLAUDE.mdsilent-failure-hunter- Erreurs silencieusestest-analyzer- Couverture testsgit-history-reviewer- Contexte historique
Agrège résultats (score >= 80) dans commentaire PR.
Options
| Flag | Description |
|---|---|
--no-interaction |
Mode automatique : passer confirmations, utiliser defaults |
--delete |
Supprimer branche LOCALE uniquement après création PR (JAMAIS la branche remote) |
--no-review |
Désactiver code review automatique |
References
- Template review - Format commentaire et agents
- Todos template - TodoWrite et génération description
Règles critiques
⚠️ INTERDICTION ABSOLUE :
- Ne JAMAIS exécuter
git push origin --delete <branche>ougit push -d origin <branche> - Ne JAMAIS supprimer la branche remote (fermerait automatiquement la PR)
- Le flag
--deletene concerne QUE la branche locale
Error Handling
- Template absent → ARRÊT
- QA échouée → ARRÊT
- Milestone/projet non trouvé → WARNING (non bloquant)