Examen de PR approfondi

VérifiéPrudence

Examen détaillé d'une pull request avec commentaires inline. Utilise des agents parallèles pour valider la qualité, la couverture de tests et les commentaires, puis rédige des commentaires concis.

Spar Skills Guide Bot
DeveloppementIntermédiaire
22/07/2026
Claude Code
#code-review#pull-requests#github#multi-agent#inline-comments

Recommandé pour

Synthèse automatique

Lance plusieurs agents de revue en parallèle sur une pull request GitHub, valide leurs conclusions sur le code réel, puis publie des commentaires inline après approbation de l'utilisateur.

Points forts

  • Cinq axes de revue distincts (qualité, échecs silencieux, tests, commentaires, typage) exécutés simultanément en arrière-plan
  • Étape de validation explicite qui relit le code source pour éliminer les faux positifs avant de commenter
  • Garde-fou net : rien n'est publié sur GitHub sans approbation explicite, et la revue part en un seul appel
  • Consignes de ton et de volume précises (5-7 commentaires max) qui évitent le rendu « linter »

Limites

  • Dépend fortement des subagents pr-review-toolkit et de la CLI gh authentifiée, non fournis par le skill
  • Suppose une branche de base nommée main, ce qui casse sur les dépôts utilisant master ou une autre base
  • Aucune gestion décrite des très gros diffs, du code généré ou des fichiers binaires
Quand l'utiliser

À utiliser quand une PR est prête à être relue et que vous voulez des commentaires inline pertinents publiés sur GitHub sans écrire la revue à la main.

Quand l'éviter

À éviter sur une PR triviale, en cours de développement, ou si vous n'avez pas accès en écriture au dépôt et à gh CLI configuré.

Analyse de sécurité

Prudence
Score qualité86/100

Nothing here is destructive or exfiltration-oriented: it reads diffs, runs review subagents, and can post a GitHub review only after explicit user approval. The risk is bounded but real, since it holds an authenticated network-write capability and a predictable temp file. The approval gate and anti-patterns section are good mitigations, so caution rather than risky.

Points d'attention
  • •Uses Bash plus authenticated `gh` CLI to post reviews to GitHub (a write action with public side effects), though gated behind an explicit approval step.
  • •Writes a review payload to a fixed temp path `/tmp/pr_review.json`, which is predictable and could be pre-created/symlinked by another local user or process.
  • •Tool declaration mismatch: the frontmatter lists `Task, Read, Glob, Grep, Bash, AskUserQuestion` while the catalog record says no allowed-tools are declared, so the actual permission scope is ambiguous.
  • •Depends on `main` as the diff base and on custom subagent types (pr-review-toolkit:*), which may behave differently or fail depending on the environment.
Comment cette analyse est faite

Exemples

Review a specific PR
review PR #482 in this repo and post inline comments when you're done
Review current branch
/review-pr — give me a code review of the branch I'm on before I ask for a merge
Focused concern
review PR #137, I'm especially worried about swallowed exceptions in the new job runner

name: review-pr description: Deep PR review with inline GitHub comments. Launches parallel review agents, validates findings, drafts casual inline comments, and posts after user approval. tools: Task, Read, Glob, Grep, Bash, AskUserQuestion color: Orange

Purpose

Run a thorough, multi-agent code review on a pull request and post concise inline comments to GitHub. The review should feel like it came from a senior engineer who actually read the code -- not a linter or AI tool.

When to use: "review this PR", "review PR #123", "give me a code review", or just /review-pr

Instructions

Step 1: Identify the PR

Parse $ARGUMENTS for a PR number. If blank, detect from the current branch:

gh pr view --json number,title,state,headRefOid

Then get the scope:

git diff --name-only main...HEAD
git diff --stat main...HEAD -- '*.py' '*.ts' '*.tsx' '*.js'

Tell the user the PR number, title, and file count before proceeding.

Step 2: Launch review agents in parallel

Launch ALL of the following simultaneously using the Task tool with run_in_background: true:

| Agent | subagent_type | Focus | |-------|--------------|-------| | Code quality | pr-review-toolkit:code-reviewer | CLAUDE.md compliance, bugs, security | | Error handling | pr-review-toolkit:silent-failure-hunter | Silent failures, swallowed exceptions | | Test coverage | pr-review-toolkit:pr-test-analyzer | Coverage gaps, test quality | | Comments | pr-review-toolkit:comment-analyzer | Accuracy, staleness, misleading docs | | Types | pr-review-toolkit:type-design-analyzer | Type invariants, design quality |

Skip the type-design-analyzer if no new types/schemas are introduced.

Each agent prompt should include:

  • The PR number and branch
  • Changed files relevant to that agent's specialty
  • Instruction to use git diff main...HEAD

Step 3: Collect results

Wait for all agents to complete. Read each output.

Step 4: Validate findings

This is the most important step. For every finding:

  • Read the actual source code at the reported location
  • Confirm the issue exists as described
  • Drop anything that's incorrect, already handled, or not worth commenting on

False positives destroy credibility. Be ruthless about cutting.

Step 5: Draft inline comments

Write concise, casual comments. Follow these rules:

Tone:

  • Like a thoughtful colleague, not a linter
  • 1-2 sentences. Get to the point.
  • No corporate speak. No "I would suggest..." -- just say what's up
  • "Nit:" for non-blocking. "Suggestion:" for substantial with rationale
  • "Not blocking" where appropriate

Content:

  • Focus on what matters: bugs, silent failures, misleading behavior, dead code
  • Skip pure style nits
  • Short code suggestions are fine (3-5 lines max)
  • Group related issues where it makes sense

Volume:

  • 5-7 comments max. Quality over quantity.
  • Not every finding deserves a comment

Step 6: Draft PR review body

Short and human. Structure:

  • 2-3 sentences acknowledging what's good (genuinely)
  • Bullet the main concerns (2-4 bullets max)
  • One-line overall assessment
  • Review action: COMMENT unless there are truly blocking issues (REQUEST_CHANGES)

Step 7: Present for approval

CRITICAL: Do NOT post to GitHub yet.

Show the user:

  • All inline comments with file:line targets
  • The review body
  • The review action

Ask if they want to adjust anything.

Step 8: Post the review

Only after explicit approval, post as a single GitHub review:

COMMIT=$(gh pr view <PR> --json headRefOid -q '.headRefOid')
OWNER=$(gh pr view <PR> --json headRepositoryOwner -q '.headRepositoryOwner.login')
REPO=$(gh pr view <PR> --json headRepository -q '.headRepository.name')

Build JSON payload:

{
  "commit_id": "<COMMIT>",
  "event": "COMMENT",
  "body": "<review body>",
  "comments": [
    {
      "path": "relative/path/to/file.py",
      "line": 42,
      "side": "RIGHT",
      "body": "Comment text"
    }
  ]
}

Post via:

gh api repos/$OWNER/$REPO/pulls/<PR>/reviews \
  --method POST --input /tmp/pr_review.json \
  --jq '{ id: .id, state: .state, html_url: .html_url }'

Return the review URL.


Anti-Patterns

  • Posting without approval -- Never. The user must greenlight every comment.
  • Trusting agent output blindly -- Always validate against actual code.
  • Over-commenting -- 10 comments is too many. Prioritize.
  • Sounding like AI -- No "I would recommend considering..." Just say it.
  • Commenting on things you didn't verify -- If you didn't read the line, don't comment on it.
  • Mixing blocking and non-blocking -- Be clear about what actually needs fixing vs nice-to-have.

Example Session

User: /review-pr 1724

Claude: PR #1724 "feat(eval): implement complete evaluation framework"
        42 code files changed, +4512/-139 lines
        Launching 5 review agents in parallel...

        [agents complete]

        Validated 8 findings. Here are the proposed comments:

        Comment 1 - snapshot_utils.py:128
        > This empty except swallows JSON parse errors and then...

        Comment 2 - schemas.py:27
        > This DatasetError(Exception) collides with...

        [etc.]

        PR Review Body:
        > Solid work here -- the eval framework design is clean...

        Ready to post, or want to adjust anything?

User: Comment 3 is too long, trim it

Claude: [adjusts] Updated. Ready to post?

User: Ship it

Claude: Review posted: https://github.com/.../pull/1724#pullrequestreview-...

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

openskills read 'deep-pr-review-mrwakcu6'

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/deep-pr-review-mrwakcu6/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