Synthèse automatique
Produit une charge utile JSON de revue pour une pull request GitHub en rassemblant les métadonnées de la PR, un diff annoté, les fils de revue existants et les règles de style du dépôt, sans rien publier.
Points forts
- Lance en parallèle la récupération des métadonnées, du diff et des fils de revue existants pour limiter les allers-retours.
- Utilise `annotate-diff` pour obtenir les numéros de ligne anciens/nouveaux et le côté, ce qui permet d'ancrer précisément les commentaires.
- Évite de répéter les retours déjà formulés en lisant jusqu'à 100 fils de revue.
- Épingle les commandes à `$base_dir` et `$pr_checkout` pour ne pas analyser le mauvais arbre de travail.
Limites
- Le texte de la compétence est tronqué au milieu de l'étape 3 et ne fournit ni schéma de charge utile ni commande de validation : la forme finale du JSON reste sous-spécifiée.
- Nécessite `gh` authentifié, `uv`, la CLI `skills` et un checkout superficiel de `refs/pull/<n>/merge` ; l'absence d'un de ces éléments bloque l'exécution.
- Écrit seulement la charge utile et ne publie volontairement aucun commentaire : un autre processus doit s'en charger.
À utiliser lorsqu'on veut une revue structurée et ancrée à la ligne d'une PR GitHub au format JSON, sans publier de commentaires, notamment dans un dépôt qui utilise la CLI `skills`.
À éviter sans accès à la CLI GitHub, à `uv` ou à un checkout de la merge ref, ou lorsqu'on veut simplement que les commentaires soient publiés directement.
Analyse de sécurité
PrudenceThe skill is a well-scoped PR-review workflow that gathers context via `gh`/`git`, analyzes the diff, and writes a JSON payload without posting anything; there is no exfiltration, obfuscated payload, credential access, or safety-disabling behavior, and it even hardens against prompt injection by pinning `--directory $base_dir` so the reviewed repo's rules/package are not used. The residual risk is that it deliberately builds and boots untrusted PR code and wields an authenticated `gh` session plus network/browser tooling, so it lands at caution rather than safe. No instruction-injection attempts were found in the content.
- •Step 3 instructs the agent to build and boot the UI/backend of the pull request under review (`cd $pr_checkout && ...` for anything that builds or runs repository code). This executes untrusted contributor code on the reviewer's machine, which is inherent to deep PR review but is real execution surface worth flagging.
- •The skill grants the agent broad local and network capability: `gh` (authenticated API access to the repo), `git`, `uv run`, `jq`, `agent-browser`, and web fetch/search. All uses are legitimate and scoped to reviewing, but they are powerful tools operating against a live GitHub token.
- •Reads and writes caller-supplied paths (`$payload_path`, `$media_dir`, `$pr_checkout`) with no validation; a mis-supplied path could overwrite unintended files (e.g. jq redirect patterns in the examples). Low risk but unguarded.
- •Ambiguity around media upload: the prose says a later workflow step uploads media and the agent must not upload, yet the `embed-media` example is passed `--repository-id`, leaving it unclear whether that path uploads artifacts. Not malicious, but the data-handling behavior is under-specified.
- •Instructs broad shell/network use: `gh` API calls, `git` operations, web fetch/search, and `uv run` which executes the repository's own package code — all legitimate for a PR-review workflow but powerful and undeclared (no allowed-tools specified).
- •Writes to caller-supplied absolute paths ($payload_path, $media_dir) and embeds referenced media, which could be abused to place files at arbitrary locations; mitigated by schema validation but not constrained to a sandbox.
- •Does not post to the PR or exfiltrate data; explicitly forbids gh pr review and other posting skills, and contains no destructive, obfuscated, or secret-transmitting instructions.
Exemples
Use the pr-review skill to review https://github.com/acme/api/pull/123 with PR checkout /tmp/pr-123, payload path /tmp/review.json, media dir /tmp/media, and base dir /workspace.Run pr-review for https://github.com/acme/web/pull/456 using /tmp/pr-456 as the checkout, /tmp/web-review.json as the payload, /tmp/media as the media dir, and /workspace as the base dir; anchor every finding to the correct side and line from the annotated diff.Review https://github.com/acme/service/pull/789 with pr-review, writing to /tmp/service-review.json from checkout /tmp/pr-789, media dir /tmp/media, base dir /workspace, and omit issues already covered in existing review threads.name: pr-review description: Review a pull request and emit a validated review payload. disable-model-invocation: true argument-hint: "<pr_url> <pr_checkout> <payload_path> <media_dir> <base_dir>" arguments: [pr_url, pr_checkout, payload_path, media_dir, base_dir]
Review Pull Request
Review $pr_url and write a JSON review payload to $payload_path. Do not post anything: writing that payload is the whole job.
The reviewed tree
The PR is checked out at $pr_checkout, not in the working directory:
$base_dir # the working directory: this skill and the `skills`
# CLI come from here, and nothing you review does
$pr_checkout # the reviewed tree: the PR merged into its base
The working directory holds a checkout of the same repository, so it looks like the code under
review and is not guaranteed to match it. Everything aimed at the PR needs the prefix:
git -C $pr_checkout ..., $pr_checkout/<path> to open or grep a file, and
cd $pr_checkout && ... for anything that builds or runs repository code. The
uv run commands below are the exception: --directory $base_dir pins each one to
this checkout, so it keeps using this tree's skills package and rules even when the
working directory has moved into $pr_checkout. uv resolves its workspace from the
working directory, and so does the rule loader, so dropping the flag silently hands
both to the code under review.
Instructions
The commands below take <pr_url> from the PR URL above, and <owner>, <repo>, and
<pr_number> from its parts.
1. Gather context (run in parallel)
These reads are independent. Issue them as parallel tool calls in a single turn, not sequentially.
PR title and description
gh pr view <pr_url> --json title,body
PR diff hunks. $pr_checkout holds the merge ref (see step 3), so HEAD^1 HEAD is exactly
the PR diff:
git -C $pr_checkout diff HEAD^1 HEAD | uv run --directory $base_dir --package skills skills annotate-diff
Each line comes back as old_line new_line | <marker> content, which gives you the line and
side to anchor each comment on: - is side=LEFT at old_line, + is side=RIGHT at
new_line, and an unmarked context line is side=RIGHT at new_line. Pass --help for the rest.
Existing review threads, so you can avoid duplicating prior feedback. Up to 100 threads (open, resolved, and outdated) with up to 20 comments each:
gh api graphql -F owner=<owner> -F repo=<repo> -F pr=<pr_number> \
--jq '.data.repository.pullRequest.reviewThreads.nodes | map(.comments = .comments.nodes)' \
-f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
isResolved
isOutdated
path
line
comments(first: 20) {
nodes { author { login } body }
}
}
}
}
}
}'
2. Load repository style rules
Load the repository style rules applicable to the changed files:
git -C $pr_checkout diff --name-only HEAD^1 | uv run --directory $base_dir --package skills skills load-rules
3. Analyze the change
$pr_checkout holds the PR merged into the base (refs/pull/<pr_number>/merge), so its file
contents reflect the post-merge state. Explore it for context beyond the diff (existing patterns,
call sites of changed symbols, file conventions), scoping every search to that directory.
The merge ref's base parent is reachable as HEAD^1. When the diff doesn't show enough (verifying
a refactor preserved behavior, reading a masked deleted file, or seeing the pre-change version of a
heavily modified one), use git -C $pr_checkout show HEAD^1:<path> rather than re-fetching the file
over the API.
The checkout is shallow, so nothing older than HEAD^1 exists: git log and git blame stop at
the shallow boundary rather than reaching the commit that actually introduced a line. Neither
errors, so don't trust them for pre-change history.
Verify rather than infer. A grep through the installed package, a uv run python -c '...', a web
fetch, or a web search ($base_dir/.claude/skills/pr-review/search-web.sh "<query>") will settle
most questions in seconds, and an unverified finding should be dropped rather than hedged. When the
cheap checks don't settle it, escalate to the expensive ones: build the docs site, build and boot
the UI, start the backend.
Node and agent-browser are on PATH for docs and UI changes. Capture to an absolute path named for
what it shows: agent-browser screenshot --full $media_dir/example.png, and cite that same
path in a finding.
Evaluate the changed code across these dimensions:
- Correctness: logic errors, off-by-one, incorrect API usage, broken invariants, regressions in behavior
- Security: injection, unsafe deserialization, secret leakage, missing authz/authn, unsafe defaults
- Edge cases: None/empty/zero inputs, concurrency, error paths, retries, large/unicode inputs
- Efficiency: needless N+1 queries, redundant work in hot paths, allocations in tight loops
- Readability & maintainability: unclear names, dead code, premature abstractions, comments that restate the code
- Test coverage: new behavior lacks tests, tests assert on the wrong thing, mocks hide real failures
- Style guide: violations of the rules loaded in step 2
Don't comment on
- Pre-existing code. You may read unchanged/context lines to understand the change, but only file findings against the changed lines (added, modified, or deleted), even if surrounding code looks suboptimal.
- Anything a formatter or linter already catches: unused imports, formatting, line length, simple typos.
- Unfamiliar names and values. Model names, runner types, library versions, and dates that postdate your training data are new, not wrong.
- Hypothetical edge cases. If the finding needs "while unlikely", "could potentially", or "edge case where" to stand up, skip it. Only flag what realistically happens.
- Naming preferences. Flag a name only when it is actively misleading.
- One-off literals. Don't ask for a constant to be extracted for a single use site.
Severity
Classify each finding that survives those exclusions:
- CRITICAL: bugs, logic errors, security issues, data loss risk, broken public API.
- MODERATE: non-blocking quality concerns where the code works but could be clearer or safer.
- NIT: pure style/preference the author can ignore.
4. Write and validate the review payload
Read review-payload.schema.json, then write
$payload_path matching it. It defines the severity prefix each comment body carries
and derives event from those prefixes.
Authoring rules not captured by the schema:
- One comment per distinct finding, anchored to the most relevant changed line. For repeated identical issues, leave a single representative comment rather than flagging every instance.
- For findings about out-of-diff code, anchor to any changed line (prefer the same file when it has
hunks) and name the actual
path:linein the body. - Keep comments short: state the problem, why it matters, and a concrete fix in roughly three sentences plus an optional suggestion block. Cut the investigation trail (commands you ran, alternatives you weighed, evidence for a claim the reader can check in one look) and anything the suggestion block already shows.
- Use suggestion blocks for simple fixes: fence with
```suggestionand preserve original indentation. - To attach an image or video (a diagram, a chart, a captured repro), write the file into
$media_dirand cite it by the absolute path you wrote it to:to embed, or[desc]($media_dir/name.png)to link. A later workflow step uploads it and rewrites the reference to a URL. Do not upload anything yourself. Skip this unless a visual genuinely beats prose; most reviews need none. - Put a video reference (
.mp4,.mov,.webm) on a line of its own. GitHub renders a player only for a bare URL in its own paragraph, so a video cited mid-sentence falls back to a plain link.
Validate before finishing, then fix any errors and re-emit until both of these pass:
uv run --directory $base_dir --only-group lint check-jsonschema \
--schemafile .claude/skills/pr-review/review-payload.schema.json "$payload_path"
# only when you wrote a file into $media_dir
set -o pipefail
jq -j '[.body, .comments[]?.body] | map(select(type == "string")) | join("\n")' "$payload_path" |
uv run --directory $base_dir --package skills skills embed-media --check --dir "$media_dir"
When embedding a single field, extract and update it with jq rather than passing the whole JSON
payload to embed-media.
Use -j to avoid adding a newline to the body:
jq -j '.body' review.json | skills embed-media --check --dir "$media_dir"
jq -j '.body' review.json | skills embed-media --dir "$media_dir" --repository-id "$repo_id" > embedded-body.txt
jq --rawfile body embedded-body.txt '.body = $body' review.json > updated-review.json
Do not post the review: no gh pr review, no review/comment APIs, no other skills. Stop
after writing and validating $payload_path.
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/automated-pull-request-review-mveraoc3/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/automated-pull-request-review-mveraoc3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/automated-pull-request-review-mveraoc3/download' --output '.skill-downloads/automated-pull-request-review-mveraoc3/SKILL.md.part' && mv '.skill-downloads/automated-pull-request-review-mveraoc3/SKILL.md.part' '.skill-downloads/automated-pull-request-review-mveraoc3/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/automated-pull-request-review-mveraoc3/SKILL.md' && test -s '.skill-downloads/automated-pull-request-review-mveraoc3/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr-review' && cp -R '.skill-downloads/automated-pull-request-review-mveraoc3' '.claude/skills/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’OpenSkillsopenskills install './.skill-downloads/automated-pull-request-review-mveraoc3'openskills read 'automated-pull-request-review-mveraoc3'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/automated-pull-request-review-mveraoc3/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.