Revue honnête de PR

VérifiéPrudence

Examinez vous-même une PR GitHub — lisez au-delà du diff, vérifiez chaque observation par rapport au code réel et publiez une revue avec des commentaires ancrés sur les lignes.

Spar Skills Guide Bot
DeveloppementIntermédiaire
27/07/2026
Claude Code
#code-review#pull-requests#github-cli#code-quality#merge-readiness

Recommandé pour

Synthèse automatique

Effectue une revue de pull request à la première personne : lecture au-delà du diff, vérification de chaque constat dans le code réel, puis publication d'une revue GitHub unique avec des commentaires ancrés aux lignes.

Points forts

  • Force la lecture des fichiers complets, du parent appelant et du contrat des appels sortants, au lieu de se limiter aux hunks du diff.
  • Exige pour chaque constat un scénario d'échec concret en trois points (ce qui est faux, l'échec précis, la correction), ce qui élimine les remarques de remplissage.
  • Classe explicitement les constats en « à corriger avant merge » et « optionnel », et nomme ce qui n'a pas été vérifié.
  • Publie une revue unique avec commentaires ancrés aux lignes via gh, avec l'événement COMMENT sur ses propres PR.

Limites

  • Suppose gh CLI authentifié avec des droits d'écriture sur le dépôt ; sans cela aucun commentaire n'est publié.
  • Sur ses propres PR, utilise l'événement COMMENT et ne peut donc pas approuver formellement le changement.
  • N'exécute ni tests ni build : les constats reposent uniquement sur la lecture du code et du contexte PR.
Quand l'utiliser

Quand vous voulez votre propre lecture critique et ancrée d'une PR, plutôt qu'une revue produite par un service d'IA externe.

Quand l'éviter

Quand vous cherchez à appliquer automatiquement des corrections déjà suggérées par un autre outil, ou à obtenir une revue automatisée sans rédaction de votre part.

Analyse de sécurité

Prudence
Score qualité80/100

The skill instructs the agent to use gh and git to read a PR, fetch the head ref, and post a review backed by a JSON payload. These are powerful but legitimate tools operating on the user's own repository and credentials; there is no exfiltration, no curl|sh, no rm -rf, no base64 payloads, and no attempt to disable safety. The only notable risk surface is that it performs real authenticated write actions against GitHub (posting reviews) and force-updates a local remote-tracking ref, so 'caution' rather than 'safe' fits.

Points d'attention
  • •Performs authenticated GitHub writes via `gh api repos/.../pulls/.../reviews` — a state-changing action (creates comments/reviews) using the user's gh credentials.
  • •Uses `git fetch origin <headRefName>:refs/remotes/origin/pr<N> --force`, which overwrites a local remote-tracking ref (scoped to refs/remotes, not destructive to working tree).
  • •Runs shell/git/gh commands and writes scratch files to $CLAUDE_JOB_DIR/tmp (benign, but path is environment-dependent).
  • •Accepts <PR_NUMBER>/<OWNER>/<REPO> placeholders that the agent substitutes — no validation of the head ref being fetched, so a malformed ref name would be passed straight to git.
Comment cette analyse est faite

Exemples

Full review on a PR
Review PR #482 in acme/api and leave one review with line-anchored comments — flag anything that should block the merge before I ship it.
Check a claim the PR makes
Give me an honest read of PR #127: the PR says the retry logic handles iterator failures — go read the full file and the calling site and tell me if that's actually true.
Ranked, with unknowns stated
Leave a review on PR #93 ranked by severity, and tell me explicitly which parts you could not verify.

name: honest-pr-review description: Review a GitHub PR yourself — read past the diff, verify each finding against the real code, and post one review with line-anchored comments (COMMENT event on your own PRs) metadata: version: "0.1.0" triggers: - honest.?review - review.?pr - review.?pull.?request - leave.?(a.)?review - line.?comments

Honest PR Review

A first-person review of a pull request: you read the change, verify what it claims, and post a single GitHub review whose findings are anchored to specific lines. "Honest" is the operative word — every finding names a concrete failure, findings are ranked by whether they should block the merge, and anything you did not verify is said out loud rather than implied.

This is not the CodeRabbit path. Pick the right tool:

| Want | Use | |------|-----| | An AI service to review the PR and post its own findings | /code-review (CodeRabbit) | | To act on feedback CodeRabbit already left | autofix skill | | CodeRabbit stuck behind a rate limit | coderabbit-rate-limit-retry skill | | You to read the code and leave your own reviewed opinion | this skill |

When to use

  • The user asks you to review a PR, look at a PR, or leave a review on one.
  • The user asks for an "honest" or "critical" read of a change.
  • Before merging something substantial where a second read is worth the tokens.

Steps

1. Pull the PR and its full context

gh pr view <PR_NUMBER> --json number,title,body,headRefName,baseRefName,author,state,additions,deletions,changedFiles,commits
gh pr diff <PR_NUMBER> > "$CLAUDE_JOB_DIR/tmp/pr<PR_NUMBER>.diff"   # or a scratch dir
gh pr diff <PR_NUMBER> --name-only

Note the head SHA from commits (the last entry's oid) — step 5 needs it.

Then fetch the head ref so you can read whole files, not just hunks:

git fetch origin <headRefName>:refs/remotes/origin/pr<PR_NUMBER> --force -q
git show refs/remotes/origin/pr<PR_NUMBER>:<path>

2. Read past the diff

This is the step that separates a real review from a diff-skim. A diff shows what changed; it does not show what the change assumes. For every non-trivial hunk, go read:

  • The file it lives in, in full. State initialisation, default values, and sibling effects are usually outside the hunk and are usually where the bug is.
  • The contract on the other side of every call it makes. If the change consumes an async iterable, read whether that iterable throws or returns on failure. If it writes a file, read the sibling that already writes files and see whether this one matches.
  • The parent/caller. A component's props tell you almost nothing about what values actually reach it at runtime.
  • The task/issue/spec the PR closes, if it names one — a checked-off task whose implementation doesn't match its wording is a finding.

Concretely: most real findings come from asking "what values can actually be in this variable at this point?" and following the answer backwards out of the diff.

3. Turn observations into findings

A finding earns a line comment only if you can state:

  1. What is wrong — one sentence.
  2. A concrete failure — specific inputs or a specific sequence, ending in the wrong behaviour. "Operator renames the bucket, closes the app, reopens → init runs against the default bucket name" is a finding. "This could be fragile" is not.
  3. What to do instead — a direction, not necessarily a patch.

If you can't produce #2, either dig until you can or drop it. Padding a review with nits to look thorough is the main way these reviews become noise.

Rank the survivors into fix before merge vs. cheap/optional, and say which is which. An unranked list of ten items reads the same as an unranked list of two.

Give credit where it's due, briefly and specifically — "the never-throw degrade contract and the streamId filtering are solid" is useful signal; "great work overall!" is not.

4. Compose the review as a JSON file

Write the whole review to a scratch JSON file rather than passing flags — bodies are multi-line markdown and will not survive shell quoting.

{
  "commit_id": "<head SHA from step 1>",
  "event": "COMMENT",
  "body": "Top-level summary — the headline finding, then a ranked table of all findings, then an explicit note on what you did and did not verify.",
  "comments": [
    {
      "path": "app/packages/web/src/components/foo.tsx",
      "line": 91,
      "side": "RIGHT",
      "body": "**One-line claim.**\n\nWhy it happens (cite the specific state/default/contract you read in step 2).\n\nConcrete failure: ...\n\nSuggested fix: ..."
    }
  ]
}

Rules that will otherwise cost you a 422:

  • line must be a line the diff touches — an added line, or a context line inside a hunk. A line outside every hunk is rejected and takes the entire review POST down with it. Confirm each anchor against the saved diff before posting.
  • side: "RIGHT" for added/context lines; "LEFT" only for deleted lines.
  • commit_id must be the PR head SHA, not main and not an older commit in the branch.
  • For a range, add start_line + start_side alongside line. Single-line anchors are usually clearer.

5. Pick the right event

| Situation | event | |-----------|---------| | You (the git user) opened the PR | COMMENT — mandatory | | Someone else opened it, and it's good | APPROVE | | Someone else opened it, and something must change | REQUEST_CHANGES |

GitHub rejects APPROVE and REQUEST_CHANGES on your own pull request. In this repo the common case is reviewing your own work, so COMMENT is the default. If the user names an event explicitly, use theirs.

Check authorship before choosing:

gh pr view <PR_NUMBER> --json author --jq .author.login
gh api user --jq .login

6. Post it, then verify it attached

gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/reviews --method POST --input review.json

Capture the returned review id, then confirm every line comment actually landed:

gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments \
  --jq '.[] | select(.pull_request_review_id==<REVIEW_ID>) | "\(.path):\(.line)"'

The count must match comments in your JSON. If the POST 422'd, the usual cause is an anchor outside the diff (step 4) — fix that line and re-post; nothing partial was created.

7. Report back

Lead with the review URL and the findings that block merge. Do not re-paste the whole review as chat prose — the user can read it on GitHub. Two or three sentences on the headline findings, then stop.

Honesty rules

These are the point of the skill, not decoration:

  • Never claim to have run something you didn't. If the PR body says "2080 tests passing" and you didn't re-run them, write "taking those as stated" in the review body. Either run the suite and report the real output, or say you didn't.
  • Separate verified from suspected. If a finding rests on an ordering you reasoned about but didn't observe, say so in the comment ("today the read wins because effects run in declaration order — but that's the only thing keeping it correct").
  • Don't soften a real defect into a suggestion. If resuming runs terraform against the wrong backend, that is a bug, and the comment says "bug", not "consider guarding".
  • Don't inflate a nit into a defect. A duplicated constant with sync comments is a maintainability risk; label it that way and put it at the bottom.
  • Report what you skipped. If you didn't read the Terraform side, or didn't check the e2e specs, name it. A review that implies full coverage it doesn't have is worse than a short one.

Notes

  • One review, not a stream of standalone comments. A single POST /reviews with a comments array groups everything under one collapsible review and sends one notification.
  • Scratch files go in $CLAUDE_JOB_DIR/tmp when it's set (parallel background jobs clobber each other in /tmp).
  • Reviewing does not mean fixing. Post the review, then let the user decide what to act on — unless they asked for both in the same breath.
  • After the user acts on the review, the repo's normal PR-review-feedback rule applies: every thread ends in an affirmative fix-with-SHA or a reasoned decline, then gets resolved.

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

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/honest-pr-review-ms2s7bfy'

openskills read 'honest-pr-review-ms2s7bfy'

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/honest-pr-review-ms2s7bfy/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