Créer une pull request

VérifiéPrudence

Valide les modifications, pousse vers une nouvelle branche et crée une pull request à l'aide du modèle de PR du dépôt.

Spar Skills Guide Bot
DeveloppementIntermédiaire
06/09/2026
Claude Code
#git#pull-request#branching#commit-hygiene#code-review

Recommandé pour

Synthèse automatique

Automatise le flux complet de soumission d'une modification : évaluation de l'état du dépôt, création de branche, lint/format, commit, push et rédaction de la description de pull request à partir du modèle du dépôt.

Points forts

  • Enchaîne toutes les étapes git (statut, diff, branche, commit, push) sans intervention manuelle
  • Filtre explicitement les fichiers de travail temporaires et les secrets avant de committer
  • Impose une description de PR courte et factuelle, avec une interdiction stricte d'inventer la motivation du changement
  • Respecte la convention de nommage de branches et le modèle de PR propres au dépôt

Limites

  • Fortement lié à un dépôt précis : chemins `/app/backend`, cibles `make format` / `make mypy`, `.github/pull_request_template.md` — à adapter ailleurs
  • Nécessite un remote git configuré et des droits de push ; l'outil exact utilisé pour ouvrir la PR n'est pas précisé
  • N'est déclenché que sur invocation explicite (pas de déclenchement automatique par le modèle)
Quand l'utiliser

À utiliser lorsqu'un ensemble de modifications est prêt et que vous voulez qu'une branche, un commit et une pull request conforme au modèle soient créés d'un seul coup.

Quand l'éviter

À éviter si les changements sont encore en cours d'exploration, si le dépôt ne suit pas la convention de branches décrite, ou si vous préférez rédiger et relire vous-même la description de la PR.

Analyse de sécurité

Prudence
Score qualité90/100

The skill performs legitimate version-control and code-quality operations: staging, committing, pushing, and running linters. It does not contain destructive commands, secret exfiltration, or obfuscated payloads. However, it uses Bash and network operations to modify the local working tree and push to a remote, so it warrants a caution rating rather than safe.

Points d'attention
  • •Uses Bash to execute git commands and linters/formatters.
  • •Pushes a new branch to the remote repository (git push -u origin).
  • •Runs repository-specific commands like make format and make mypy which can modify files.
Comment cette analyse est faite

Exemples

Submit finished work as a PR
Make a PR for these changes.
Push current work to a new branch
Submit my changes as a pull request against main.
PR with template filled in
Open a pull request for this backend refactor, using the repo's PR template.

name: pr description: Commit all changes, push to a new branch, and create a pull request using the repo's PR template. Use when the user says to make a PR or submit changes. disable-model-invocation: true allowed-tools: Bash Read Glob Grep Agent

Create a Pull Request

Create a branch, commit, push, and open a PR for the current changes.

Steps

1. Assess the current state

Run in parallel:

  • git status (never use -uall)
  • git diff and git diff --staged to understand all changes
  • git log --oneline -5 to see recent commit message style

Identify which files should be committed. Do NOT commit files that are:

  • Scratch/debug/temporary files
  • Files containing secrets (.env, credentials, etc.)

If there are no meaningful changes to commit, tell the user and stop.

2. Determine the branch name

Branch names in this repo follow the pattern: <area>/<type>/<short-description>

Where:

  • <area> is one of: backend, web, frontend, mobile, devops, docs, or another area that matches the changed files. For cross-cutting changes spanning multiple areas, pick the one that best describes the change.
  • <type> is one of: feature, bugfix, fix, refactor, or similar
  • <short-description> is a short kebab-case description

Infer area and type from the changed files and the nature of the changes. Never use a username as the area.

3. Run linters and formatters

Before committing, run the appropriate linters and formatters for the changed areas:

  • Backend: make format and make mypy from /app/backend
  • Web/Frontend: lint/format as appropriate

Fix any issues before proceeding. If linters produce changes, include those in the commit.

4. Create the branch and commit

If there are already commits on the current branch and no uncommitted changes remain (e.g. changes were already committed earlier), skip the commit and proceed to pushing.

Otherwise:

git checkout -b <branch-name>
git add <specific files>  # add only the relevant files by name
git commit -m "<message>"

Write a concise commit message (1-2 sentences) that describes what changed and why.

5. Push the branch

git push -u origin <branch-name>

6. Write the PR description

Read the PR template from .github/pull_request_template.md and fill it in.

The description has one job: give a reviewer who context-switches in enough to understand what the change is about and why it exists, without reading the code. Nothing else.

Shape. ONE paragraph. Not two. Not "one short one and then a brief note". One. Open with high-level context — which subsystem this touches, what it is for, why it matters — so a reviewer who may be familiar with this area but did not drive the session is oriented. Then what is wrong, missing, or needed, and what the change does about it. Stop there. Well under 150 words.

A second paragraph is allowed in exactly one case: the user explicitly directed a consequential decision that needs recording (see The one exception below). That case is rare — most PRs will never hit it. Everything else you were tempted to put in a second paragraph — a behaviour change, a stacking or follow-up relationship to another PR, a caveat — either fits as a clause in the one paragraph or does not belong in the description at all. If you have written two paragraphs and the second is not a user-directed decision, delete it; do not merge it in.

Never fabricate. This is absolute. Write only what you actually know from the session, the diff, the repo, or the user. You do not get to invent why a change is being made. If the user did not tell you the motivation, and it is not plainly evident from the code or the issue being fixed, then you do not know it — say what the change does and leave the motivation out. Never write a plausible-sounding backstory: no invented user complaints, no invented incidents or bug reports, no invented performance or scale pressures, no invented product goals, no invented prior discussion, no invented future plans, no guessed issue or PR numbers, no attributing a decision to the user that they did not make. A description that is short and says less is always better than one that reads well and contains something you made up. If you are unsure whether you know a rationale or are reconstructing it, you are reconstructing it — leave it out.

Stay above the code. Write in terms a reviewer can follow without opening a file — the authentication system, the notification emails, the search page — rather than the private helpers, local variables and internal functions that implement them. Nobody remembers what those do, including whoever wrote them. Identifiers are fine where a reviewer would recognise them from outside: RPC and service names, database tables, proto messages, settings and env vars, feature flags, URLs.

Tone. You are describing the change and the human's decisions about it. You are not an engineer offering your take. Never write anything that reads as your own engineering judgement or as an invitation to discuss it — no "worth a reviewer's opinion", no "happy to change this", no flagged concerns, no recommendations, no notes to reviewers. If something genuinely needs discussion, raise it with the user instead.

Never include:

  • Anything about tests, formatting, linting, type checking, or CI. It all runs automatically, so there is nothing to report — no test names, no pass counts, no "make mypy clean", no "verified to fail before the fix".
  • How the change is implemented. The diff shows that. No per-file or per-function walkthrough, no lists of the fields/files/keys/symbols added, no tables.
  • Any narration of the session: what you tried first, what you ruled out, what you deliberately left alone, what you couldn't run locally, environment problems.
  • Design or implementation choices that were yours rather than the user's, however much work went into them.
  • Annotations on checklist items. Tick or leave unticked.
  • Headings, tables, or bold sub-headings beyond the template's own.
  • A first sentence that restates the title.
  • Any rationale, history, or context you cannot point to a source for.

The one exception. If the user explicitly directed a design or implementation decision during the session, and it is consequential and looks wrong on its face — or was picked after real work on an alternative — record it in a sentence or two as their decision. Nothing you decided on your own ever qualifies.

Testing section. Leave it out unless a human has to do something by hand to exercise the change that isn't obvious; then give one line of steps. Never test results.

Checklists. Include the checklist(s) — backend, web, or both — matching the areas changed, and remove the ones that don't apply. Tick honestly, annotate never. Keep the "For maintainers" section as-is.

Append the following note as the very last line of the PR body, after the "For maintainers" section (separated by a blank line):

_This PR was created with the Couchers PR skill._

7. Prune the description

Read the draft description once more as if you had no context on the change and were a busy person with other PRs to get through. Ask what could be dropped and what needs clarifying: a sentence they would skip, a phrase they would have to re-read, a term they would have to look up.

Then check the two hard rules explicitly:

  • Count the paragraphs. If there is more than one, and the extra is not a user-directed decision under the exception, delete it.
  • Point at a source for every claim of why. Go sentence by sentence over anything that explains motivation, history, or impact. For each, name where it came from — the user said it, the diff shows it, the issue states it. Anything left over is fabricated: delete it.

Then make one more editing pass for simplification and clarification. You may only prune and reword — the description must not get longer.

8. Create the PR

gh pr create --base develop --title "<short title>" --body "$(cat <<'EOF'
<filled-in PR template>

_This PR was created with the Couchers PR skill._
EOF
)"

9. Report back

Tell the user the PR URL when done.

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/create-a-pull-request-mtpag67f/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/create-a-pull-request-mtpag67f' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-a-pull-request-mtpag67f/download' --output '.skill-downloads/create-a-pull-request-mtpag67f/SKILL.md.part' && mv '.skill-downloads/create-a-pull-request-mtpag67f/SKILL.md.part' '.skill-downloads/create-a-pull-request-mtpag67f/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 Agent

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

openskills read 'create-a-pull-request-mtpag67f'

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/create-a-pull-request-mtpag67f/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