Pipeline de Pull Request

VérifiéPrudence

Processus complet du code prêt à la fusion : vérifications avant push, auto-revue, ouverture de la PR et suivi de la CI et des revues.

Spar Skills Guide Bot
DevOpsAvancé
06/09/2026
Claude Code
#pull-requests#git-workflow#code-review#ci-monitoring#self-review

Recommandé pour

Synthèse automatique

Encadre tout le cycle d'une pull request : création de la branche depuis origin/main, vérifications avant push, auto-revue du diff, ouverture de la PR, puis suivi de la CI et des fils de revue jusqu'à ce que tout soit traité.

Points forts

  • Impose une vérification avant chaque push (formatage plus les deux suites de tests exécutées localement), en refusant de contourner ou d'affaiblir un test qui échoue.
  • Structure l'auto-revue : worktree propre, comparaison systématique avec origin/main, revue codex complétée au besoin par trois sous-agents indépendants (correction, style, tests).
  • Définit une boucle de surveillance réaliste — un contrôle toutes les ~10 minutes portant à la fois sur la CI, les fils non résolus et la décision formelle de revue.
  • Pose des garde-fous explicites : c'est le mainteneur qui fusionne, pas d'amend ni de force push, pas de référence à des chemins locaux dans le corps de la PR.

Limites

  • Très lié à une stack précise (tâches pixi, skill de style C++, codex avec gpt-5.6-sol) : il faut l'adapter avant de le réutiliser ailleurs.
  • Suppose un environnement outilé de bout en bout : gh authentifié, codex disponible, capacité à planifier des réveils et à lancer des sous-agents parallèles.
  • La qualité de l'auto-revue dépend entièrement de la revue codex ou des sous-agents ; le skill ne fournit pas de grille d'analyse autonome.
Quand l'utiliser

À utiliser dès que le code est prêt, avant de committer, de pousser, d'ouvrir une PR ou d'en vérifier l'état dans ce dépôt.

Quand l'éviter

À éviter sur une simple correction de typo ou dans un dépôt qui n'utilise ni pixi, ni gh, ni codex, car la plupart des étapes décrites ne s'appliqueraient pas.

Analyse de sécurité

Prudence
Score qualité86/100

The skill is a conventional PR workflow: branch from origin/main, run format/tests, self-review, open PR, watch CI. It uses powerful tools (git push, gh, external review agent, subagents) but for clearly legitimate purposes, and it explicitly forbids destructive shortcuts — no force push except a maintainer-approved rebase, never amend, never merge, never weaken/skip tests. No exfiltration, obfuscation, curl|sh, or filesystem destruction. Hence caution rather than safe or risky.

Points d'attention
  • •Instructs agents to run git push and gh CLI commands against a real repository (branching, committing, pushing, resolving review threads) — legitimate but write-capable remote operations.
  • •Delegates review to an external 'codex exec' / gpt-5.6-sol tool and spawns parallel subagents, expanding the tool surface beyond the skill's own instructions.
  • •Directs a sustained polling loop (~10 min cadence, multiple rounds) of gh API calls, which consumes credentials/quota; it does mitigate by batching and spacing calls.
  • •References repo-local rule files (.claude/CLAUDE.md, cpp-style skill) whose contents are trusted implicitly by the reviewer prompt.
Comment cette analyse est faite

Exemples

Full pipeline on a finished fix
I've finished the queue-cancel fix. Run the PR pipeline: verify formatting and both test suites, self-review the diff against origin/main, and open the PR once it's clean.
Check on an open PR
Check on PR #412 — CI status, unresolved review threads, and review decision — and tell me whether it's ready to merge.
Handle review comments
Pull the unresolved review threads on my branch via resolve-comments, fix them at the root, re-run the pre-push checks, and push an ordinary commit.

name: pr description: The full pipeline from "code is ready" to "ready to merge" — pre-push verification, three-way self-review, opening the PR, watching CI and review threads. Read BEFORE committing, opening a PR, or checking on an open one.

PR Pipeline

The development flow is: branch off main → write code (discussing requirements with the maintainer) → self-review and fix → open the PR → watch CI and reviews until everything is handled → report that it is ready. The maintainer merges — never merge yourself.

Branch

  • Always branch from freshly fetched origin/main — git fetch origin && git checkout -b <type>/<short-topic> origin/main — never from the local main. <type> uses the conventional-commit types, e.g. fix/queue-cancel, refactor/codec-macros.

Pre-push verification (every push, not just the first)

Never push anything unverified — "it compiles" is not verified, and CI is not a debugger.

  1. pixi run format.
  2. Both test suites pass locally (the test skill): unit tests via pixi run test (builds the debug preset and runs ctest, which handles the snapshot dir), and pixi run integration-test. Every failure on the branch is yours to fix now — even if it looks pre-existing (main is green), and never by skipping, disabling, or weakening the test.

Self-review (before opening)

Commit all work first — the review diff only sees commits, so a dirty worktree means the reviewers inspect an incomplete patch (git status must be clean). Then review the full diff (git diff origin/main...HEAD — never against the local main, which goes stale) and fix everything confirmed before opening:

  1. Primary: codex review (the codex skill) — the canonical rules-aware review command: plain codex exec with gpt-5.6-sol at xhigh and a prompt that reads .claude/CLAUDE.md plus the cpp-style skill and reviews git diff origin/main...HEAD (the built-in codex exec review --base cannot take a prompt, so it never sees the repo rules). Treat findings as hypotheses: verify each concrete claim before fixing it.
  2. Supplement — when codex is unavailable, or as an extra pass on high-risk diffs: 3 parallel subagents reviewing independently — correctness (logic errors, edge cases, undefined behavior; coroutine lifetime and cancellation paths deserve extra suspicion), style (naming, cpp-style skill rules), tests (new functionality covered, no existing tests broken or weakened).

Opening

  • Confirm with the maintainer before creating the PR.
  • Title follows the conventional commit format — it becomes the squash-merge commit on main.
  • Body: a concise summary of what changed and why. Never reference local file paths, private notes, or other material a reader without this machine cannot see.

Watching

This is a sustained loop, not a single check — reviews and CI both take time, and a PR typically needs several rounds of check-and-fix before it is truly settled. Do not stop at the first green check.

  • Cadence: one check every ~10 minutes by default, via timed wake-ups — never background shell loops. Decide the total number of rounds yourself based on elapsed time and remaining activity.
  • Every check covers all three: CI status, unresolved review threads, and the formal review decision (gh pr view --json reviewDecision). A green pipeline with open review comments is not done — review threads must be at zero before the maintainer merges.
  • Threads go through the resolve-comments skill: it pulls unresolved threads (by isResolved, never timestamps), applies root-cause fixes in the worktree, resolves the threads, and returns a compact summary — the GraphQL plumbing and comment bodies stay out of the main conversation. A fixed thread is resolved outright; a rebutted thread gets a short reply stating why, then is resolved.
  • If resolve-comments left changes in the worktree: run the pre-push verification, then push an ordinary commit — never --amend, never force push. History rewrites destroy review anchors and reviewers' incremental diffs.
  • Force push has essentially no legitimate use on a PR branch. The usual temptation — amending fixes into the previous commit to keep the branch "one tidy commit" — buys nothing: the squash merge flattens the branch anyway and only the PR title lands in main history. The single real case is rebasing onto a newer main (e.g. to resolve a conflict), and that requires asking the maintainer first.
  • CI failure: reproduce and fix locally, verify, then push. Digest CI logs via a subagent; don't pull raw logs into the main conversation.
  • Keep API calls sparse — one batch per check, sleep 1 between gh calls.

Done

  • CI fully green, zero unresolved review threads, and no blocking review decision (reviewDecision must not be CHANGES_REQUESTED — a top-level "changes requested" review blocks the merge even after every inline thread is resolved; address its feedback and request a re-review) → report to the maintainer that the PR is ready to merge: a one-paragraph summary of what review found and how it was addressed, plus every design decision taken while resolving threads (chosen vs. alternative), so the maintainer can accept or overturn them in one pass. Then stop — merging is the maintainer's call.
  • The default bar stays high: elegant code, edge cases considered. "Merge now, clean up in a dedicated refactor PR later" is a real move in this project, but that trade-off is the maintainer's call, made case by case — never the agent's default.

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/pr-pipeline-mtpag6bu/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/pr-pipeline-mtpag6bu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pr-pipeline-mtpag6bu/download' --output '.skill-downloads/pr-pipeline-mtpag6bu/SKILL.md.part' && mv '.skill-downloads/pr-pipeline-mtpag6bu/SKILL.md.part' '.skill-downloads/pr-pipeline-mtpag6bu/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/pr-pipeline-mtpag6bu/SKILL.md' && test -s '.skill-downloads/pr-pipeline-mtpag6bu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/pr-pipeline-mtpag6bu' '.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/pr-pipeline-mtpag6bu'

openskills read 'pr-pipeline-mtpag6bu'

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/pr-pipeline-mtpag6bu/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