Synthèse automatique
Met à jour une pull request GitHub existante en poussant de nouveaux commits et en réécrivant son titre et sa description pour refléter l'ensemble de la branche.
Points forts
- Enchaîne les contrôles préalables : authentification gh, existence d'une PR ouverte sur la branche courante, arbre de travail propre, sous-modules synchronisés.
- Synchronise la branche avec la branche de base via fetch puis rebase, avec un repli sur --force-with-lease et une explication claire en cas d'échec.
- Analyse l'ensemble des commits de la branche (diff à trois points) plutôt que le seul dernier commit avant de réécrire la description.
- Remonte explicitement les conflits de rebase à l'utilisateur au lieu de les résoudre silencieusement.
Limites
- Ne crée pas de PR : si aucune PR n'existe pour la branche, le skill s'arrête et renvoie vers /create-pr.
- Suppose GitHub CLI installé et authentifié, ainsi qu'un dépôt distant accessible ; rien n'est prévu pour GitLab, Bitbucket ou un workflow par fork.
- S'appuie sur d'autres skills (/commit, /create-pr) et exige une interaction humaine pour trancher les conflits de rebase.
- La section de mise à jour du corps de la PR est décrite de façon partielle dans le fichier fourni, ce qui laisse le format final assez libre.
À utiliser quand une PR est déjà ouverte et qu'il faut y pousser des changements de suivi tout en rafraîchissant sa description.
À éviter pour créer une première PR, pour modifier une PR déjà fusionnée ou fermée, ou sur un dépôt hébergé ailleurs que sur GitHub.
Analyse de sécurité
PrudenceThe skill uses powerful developer tools (git, gh) for a legitimate workflow: updating a PR. It includes safety checks like confirming clean git state, verifying PR state, and using --force-with-lease rather than --force. No destructive or exfiltrating commands are present, but force-push and rebase are inherently risky operations that warrant caution.
- •Uses git rebase and git push --force-with-lease, which rewrite branch history and could overwrite others' work if misused.
- •Instructs running network commands (gh api, gh pr edit) that modify remote repositories.
- •Writes to /tmp and executes shell commands, requiring an agent with shell access.
Exemples
Push my latest commits to the existing PR and update the description to cover everything on this branch.Sync my PR branch with main, rebase it, and refresh the PR title and body.The PR description is out of date — review all commits on this branch and rewrite it.name: update-pr description: "Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request."
PR Updater
Push follow-up changes to an existing PR and update its description to reflect the new work.
Workflow
Step 1: Pre-flight Checks
- Verify GitHub CLI authentication — run
gh api user --jq '.login'to confirm the CLI is authenticated. If this fails, the user needs to rungh auth loginfirst. - Find the existing PR — run
gh pr view --json number,title,body,url,baseRefName,stateto find the PR for the current branch. If no PR exists, abort and suggest using/create-prinstead. Check thestatefield — if it is notOPEN, abort and inform the user that the PR is already merged or closed. - Verify clean git state — run
git statusto ensure no uncommitted changes. If there are uncommitted changes, run the/commitskill first to commit them. - Sync submodules — check if
.gitmodulesexists first. If it does, rungit submodule update --init --recursive. If not, skip this step.
Step 2: Sync with Base Branch
Ensure the feature branch is up-to-date with the base branch to avoid merge conflicts:
- Fetch latest remote — run
git fetch origin <base-branch>(use the base branch from the PR metadata) - Check for divergence — run
git log HEAD..origin/<base-branch> --onelineto see if the base branch has new commits - Rebase if needed — if there are new commits on the base branch:
a. Run
git rebase origin/<base-branch>b. Resolve conflicts — if the rebase hits conflicts:- Read the conflicting files to understand both sides
- Surface the conflict to the user — show both sides and ask which version to keep. Do not silently resolve conflicts.
- Stage resolved files:
git add <file> - Continue:
git rebase --continue - Repeat until rebase completes
- Verify clean state — run
git statusto confirm no unresolved conflicts remain - Push the branch — run
git push. If the rebase changed history, usegit push --force-with-leaseinstead. If--force-with-leasefails, it means someone else has pushed to this branch. Fetch the remote branch (git fetch origin <branch>), inspect the divergence (git log HEAD..origin/<branch> --oneline), and ask the user how to proceed — they may need to integrate the other contributor's changes first.
Step 3: Analyze New Changes
Understand the full scope of changes now in the PR:
- Run
git log origin/<base-branch>..HEAD --onelineto see all commits on this branch - Run
git diff origin/<base-branch>...HEAD --statfor a high-level summary of changed files - Run
git diff origin/<base-branch>...HEADto read the full diff. Note: Three-dot (...) syntax is intentional — it shows only the changes introduced on this branch since it diverged from the base, excluding commits on the base branch that aren't part of this PR. - Identify the type of change:
feat,fix,refactor,docs,chore, etc. - Review existing PR title and body — compare the current PR title and body (from Step 1) against the full diff. Note what's already accurately described vs. what's missing, outdated, or no longer relevant.
Important: Look at ALL commits, not just the latest one. The updated PR description should reflect the entire branch, not just the new additions.
Step 4: Update the PR Description
Title
- Under 70 characters
- Use conventional prefix:
feat:,fix:,refactor:,docs:,chore: - Review the existing PR title (from Step 1). If it still accurately reflects the full scope of changes, keep it. If the scope has changed or the title is misleading, update it.
Body
Review the existing PR body (from Step 1) and update it to reflect the current state of the branch. Preserve any still-accurate content (e.g., context, links, decisions) rather than rewriting from scratch. Use this template — scale detail with PR complexity:
## Summary
<1-5 bullet points explaining what changed and WHY — covering ALL changes in the branch>
## Changes
<Categorized list of what was modified — group by area/concern>
## Diagrams
<OPTIONAL — include Mermaid diagrams when visual aids clarify workflow or architecture changes>
## Test Plan
<How the changes were verified — manual testing steps, automated tests run, curl commands, etc.>
Guidelines for the body:
- State the purpose clearly — explain why, not just what
- Cover ALL changes in the branch, not just the latest commits
- Provide context and background with links to relevant issues/docs
- Include Mermaid diagrams when they simplify explanation of workflows or architecture
- Keep PRs focused on a single concern — suggest splitting if the PR is too large
- Before overwriting the PR body, compare the existing body against the standard template sections (Summary, Changes, Diagrams, Test Plan). Flag any sections or content that appear to have been manually added after PR creation (e.g., reviewer notes, deployment checklists, linked discussions) and ask the user whether to preserve them.
- Do NOT include any "Generated with Claude Code" footer or bot attribution lines
- Do NOT include
Co-Authored-Bylines
Step 5: Apply Updates
Write the body to a temp file and use --body-file to avoid shell argument length limits:
cat > /tmp/pr_body.md <<'EOF'
## Summary
...
## Changes
...
## Test Plan
...
EOF
gh pr edit --title "the pr title" --body-file /tmp/pr_body.md
Do NOT add:
--authorflag- Any
Co-Authored-Bytrailer - Any "Generated with Claude Code" footer
Draft/Ready handling: If the user wants to mark a draft PR as ready for review, run gh pr ready. If the user wants to convert to draft, run gh pr ready --undo.
Step 6: Report
- Return the PR URL so the user can review it
- Summarize what changed in the PR description compared to before
- If
gh pr editfails, diagnose the error and suggest fixes
Best Practices Encoded
PR Size: Keep PRs small and focused. If the diff is very large (>500 lines changed), suggest splitting into smaller PRs.
Commit History: If the commit history is messy, suggest rebasing to clean it up. Clean commits that explain why make review much easier.
Feedback Requests: If the user mentions wanting specific feedback, add a "Feedback Requested" section to the body.
Screenshots: For frontend changes, remind the user to add screenshots or recordings to the PR after updating.
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 annexesCe 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.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/update-existing-pr-msv9axi7/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/update-existing-pr-msv9axi7' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/update-existing-pr-msv9axi7/download' --output '.skill-downloads/update-existing-pr-msv9axi7/SKILL.md.part' && mv '.skill-downloads/update-existing-pr-msv9axi7/SKILL.md.part' '.skill-downloads/update-existing-pr-msv9axi7/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.
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/update-existing-pr-msv9axi7/SKILL.md' && test -s '.skill-downloads/update-existing-pr-msv9axi7/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/update-pr' && cp -R '.skill-downloads/update-existing-pr-msv9axi7' '.claude/skills/update-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’OpenSkillsopenskills install './.skill-downloads/update-existing-pr-msv9axi7'openskills read 'update-existing-pr-msv9axi7'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 syncMode 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/update-existing-pr-msv9axi7/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.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.