Workflow de Pull Request

VérifiéPrudence

Crée ou met à jour une pull request pour la branche courante. Déclenché sur demande de l'utilisateur.

Spar Skills Guide Bot
DeveloppementIntermédiaire
22/07/2026
Claude CodeCodexCursor
#pull-requests#git#github-cli#workflow#technical-writing

Recommandé pour

Synthèse automatique

Crée ou met à jour la pull request de la branche courante avec `gh`, en rédigeant un corps concis aligné sur le style du dépôt.

Points forts

  • Détecte seul s'il faut créer une PR (`gh pr create`) ou réécrire celle qui existe déjà (`gh pr edit --body-file`).
  • Impose des garde-fous de concision : titre sous ~70 caractères, ~6 puces maximum, description de l'état final plutôt que du chemin parcouru.
  • Aligne le ton et la longueur sur les dernières PR fusionnées du dépôt avant de rédiger.
  • Évite les ajouts non demandés : pas de section « Test plan » ni de signature d'attribution d'outil.

Limites

  • Suppose un dépôt GitHub avec `gh` authentifié et une branche de base nommée `main`, codée en dur dans les commandes.
  • Ne lit ni n'exécute le code : le résumé se fonde uniquement sur le diff et les messages de commit.
  • Crée systématiquement la PR en brouillon, ce qui peut surprendre si l'on attend une PR prête à relire.
Quand l'utiliser

Quand vous voulez ouvrir une PR ou réécrire la description de celle de la branche courante sans rédiger le texte vous-même.

Quand l'éviter

Si le projet n'est pas hébergé sur GitHub ou si vous cherchez une revue de code approfondie plutôt qu'un texte de PR.

Analyse de sécurité

Prudence
Score qualité86/100

The skill only uses Bash/Read/Glob/Grep for legitimate git and `gh` workflows: inspecting branch state, writing a temp body file, pushing, and creating or editing a PR. There is no obfuscation, no destructive command (no rm -rf, no curl|sh), no secret/token exfiltration, and no attempt to disable safety controls. The only reason it is not rated fully 'safe' is that it takes real remote actions (pushing a branch, creating/editing PRs) as part of its normal flow without an explicit confirmation gate, which is powerful but clearly intended and scoped.

Points d'attention
  • •Performs remote side effects automatically: `git push -u origin HEAD` and `gh pr create`/`gh pr edit` without an explicit confirmation step between planning and executing
  • •Rewrites existing PR bodies (`gh pr edit --body-file`) which could overwrite human-authored text if run on a PR the user did not intend to change
  • •Uses GitHub CLI and network access via Bash, expanding the blast radius beyond local read-only inspection
Comment cette analyse est faite

Exemples

Open a PR
Open a PR for my current branch against main.
Rewrite an existing body
Rewrite the description of PR #482 so it describes the final diff, max 4 bullets, no changelog.
Fix a bloated description
Update the PR body — it's too long, compress it and drop the test plan section.

name: pr description: >- Create or update a pull request for the current branch. Trigger when the user asks to create/open/make a PR, or to edit/update/rewrite/fix the PR description, body, or summary — for both new PRs (gh pr create) and existing ones (gh pr edit --body-file). Use for any verb that lands on a PR's text content: "open a PR", "make a PR", "update the PR description", "rewrite the PR body", "fix the description". allowed-tools: Bash, Read, Glob, Grep

Pull request workflow

Create or update a pull request for the current branch.

Workflow

1. Gather branch state

Run in parallel:

  • git status (no -uall)
  • git diff main...HEAD --stat
  • git diff main...HEAD --name-only
  • git log main..HEAD --oneline
  • EXISTING_PR=$(gh pr view --json number,url,title 2>/dev/null) — capture for step 2.

If the branch has no commits ahead of main, stop and tell the user.

2. Build the summary body and create/update the PR

Write a summary of the change (2–5 bullets based on the diff and recent commits) to a temp file. Follow the repo's existing PR body style — look at the last few merged PRs (gh pr list --state merged --limit 5 --json body,title) to match tone and length. Keep the title under ~70 chars.

Bias toward brevity. Reviewers skim. A bullet that fits on one line beats one that wraps three times — push detail down to the diff or commit log, not the body. If a per-file bullet starts feeling like an essay, compress to a single sentence naming the kind of change (e.g., "tightened description, trimmed unused allowed-tools, consolidated duplicated snippets") rather than enumerating each edit. Aim for under ~6 bullets total across the whole body, including any nested ones; if you're past that, regroup by category until you fit.

Describe the end state, not the journey. Reviewers want to know what the PR does now — the diff that will land — not the order in which it was built. Avoid framings like "first pass" / "second pass", commit-hash references for stages of work that all merge into the same shipped diff, "originally we tried X then switched to Y", or play-by-play of how the conversation evolved. The git log preserves that. If a discarded approach is genuinely load-bearing context for the reviewer (e.g., explains why the chosen approach is structured oddly), one line is enough; otherwise omit. The same applies when updating an existing PR body: rewrite to describe the current diff, don't append a changelog of edits made since the last revision.

No "Test plan" section unless the user asks. Don't list things CI already covers (e.g. bundle exec rspec). Those belong to CI, not the PR body. Only add a Test plan when there's reviewer-facing manual verification a human needs to do, and only when the user requests it.

No Claude Code attribution footer. Don't append the "🤖 Generated with Claude Code" line (or any variant of it) to the body. The PR body should read like the human author wrote it.

Push the branch: git push -u origin HEAD.

  • If $EXISTING_PR from step 1 was non-empty: gh pr edit <num> --body-file <tmp-body-file> (don't overwrite the title unless the user asks).
  • Otherwise: gh pr create --draft --base main --title "..." --body-file <tmp-body-file>. Create as a draft by default; only omit --draft (or mark ready) if the user explicitly asks for a ready-for-review PR. Capture the PR number from the output.

Always pass the body via --body-file (not inline --body) to preserve formatting.

Return the PR URL.

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 annexes

Ce 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.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/pull-request-workflow-mrwak8yr/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/pull-request-workflow-mrwak8yr' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pull-request-workflow-mrwak8yr/download' --output '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md.part' && mv '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md.part' '.skill-downloads/pull-request-workflow-mrwak8yr/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, Read, Glob, Grep

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/pull-request-workflow-mrwak8yr/SKILL.md' && test -s '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/pull-request-workflow-mrwak8yr' '.claude/skills/pr'

Cursor
test -f '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && test -s '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/pr' && cp -R '.skill-downloads/pull-request-workflow-mrwak8yr' '.cursor/skills/pr'

Codex
test -f '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && test -s '.skill-downloads/pull-request-workflow-mrwak8yr/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/pr' && cp -R '.skill-downloads/pull-request-workflow-mrwak8yr' '.agents/skills/pr'

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’OpenSkills
openskills install './.skill-downloads/pull-request-workflow-mrwak8yr'

openskills read 'pull-request-workflow-mrwak8yr'

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 sync

Mode 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/pull-request-workflow-mrwak8yr/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.

Skills similaires