Agent skill

Pre-PR Review

by yuga-hashimoto in yuga-hashimoto/and-code

Runs local checks and a repo-reviewer subagent over the whole branch diff before a pull request is opened, then records the approval in the PR description.

MITAuto-check passedDevelopment

Install Pre-PR Review

skills CLI
$ npx skills add yuga-hashimoto/and-code --skill pre-pr-review -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yuga-hashimoto/and-code pre-pr-review --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yuga-hashimoto/and-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/pre-pr-review .claude/skills/pre-pr-review && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pre-pr-review
GitHub stars
127
Token cost
~710 tokens
SKILL.md length
322 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Runs local checks and a repo-reviewer subagent over the whole branch diff before a pull request is opened, then records the approval in the PR description.

  • Works in 5 steps: Sync and scope the diff → Run the local gates first (cheap… → Invoke the reviewer with the task tool,… → …
  • About to open a pull request in this repository
  • SKILL.md covers Workflow and Rules
  • Calls git

What it does

Written for one Android repository, the skill makes an approved review a precondition for creating a pull request. It starts by fetching origin main and listing the branch diff, and stops if the branch has nothing ahead. Then it runs the cheap local gates first, detekt and spotlessCheck through Gradle, plus a translation key-parity check when string resources changed. Nothing in CI enforces the review, so the habit depends on the author.

The repo-reviewer subagent then reviews the full diff itself. A REQUEST_CHANGES verdict means fixing every blocker and reviewing again until the verdict is APPROVE, and non-blocking suggestions can be applied when they are cheap and safe. The reviewer's report goes into the PR description verbatim and must be redone after material later pushes. If the subagent is unavailable you say so in the PR, and trivial bot PRs such as translation syncs are exempt.

When your agent uses it

  • About to open a pull request in this repository
  • Re-checking a branch after reviewer feedback
  • Adding the reviewer's verdict to a PR description

Example prompts

  • “I am ready to open a PR for the settings screen changes. Run the pre-PR review first.”
  • “The reviewer asked for changes on this branch; fix the blockers and run the review again.”
  • “Update the pre-PR review block in the PR description after my latest push.”

Requirements

  • Git with an origin/main branch
  • A repo-reviewer subagent defined in the repository
  • The Gradle tasks detekt and spotlessCheck

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Sync and scope the diff
  2. Run the local gates first (cheap failures should never reach the reviewer)
  3. Invoke the reviewer with the task tool, subagent type repo-reviewer. Prompt it with
  4. Handle the verdict
  5. Record the verdict in the PR description. The PR body should carry the reviewer's report

What it can do on your machine

Read from SKILL.md and the folder at commit f6593e1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pre-PR Review loads about 710 tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 322 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~710

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from yuga-hashimoto/and-code at commit f6593e1, republished under its MIT licence (© yuga-hashimoto). 322 words, ~710 tokens.

Download SKILL.mdSave it as .claude/skills/pre-pr-review/SKILL.md (or your agent's skills folder).
name
pre-pr-review
description
Review pass before opening a pull request in this repository. Runs local CI gates and the repo-reviewer subagent on the full branch diff, iterates until the reviewer approves, and records the verdict in the PR description. Use whenever you are about to create a PR.
license
MIT

Pre-PR review

This repository expects an approved review BEFORE any pull request is created. The reviewer is the repo-reviewer subagent, which carries the repository's architecture map and hard rules. Nothing in CI enforces this: the check that used to fail a PR whose description carried no approved report is gone, so the review is a convention the author keeps, not a gate that keeps them.

Workflow

  1. Sync and scope the diff

    bash
    git fetch origin main
    git diff --stat origin/main...HEAD

    If the branch has no commits ahead of origin/main, stop: there is nothing to review.

  2. Run the local gates first (cheap failures should never reach the reviewer):

    bash
    ./gradlew detekt spotlessCheck

    If app/src/main/res/values*/strings.xml changed, also run the key-parity check from .github/workflows/i18n-check.yml (every source key must exist in every locale file). A full Gradle build may be impossible on-device (x86_64 aapt2 on an arm64 device); that is expected — CI compiles. Fix everything that can run locally.

  3. Invoke the reviewer with the task tool, subagent type repo-reviewer. Prompt it with:

    このブランチ(<branch name>、base: origin/main)のPR前レビューをお願いします。
    変更概要: <one or two sentences describing the change and why>

    The subagent reviews git diff origin/main...HEAD itself; do not paste the whole diff into the prompt.

  4. Handle the verdict

    • REQUEST_CHANGES: fix every ブロッカー, then re-run from step 3. Repeat until APPROVE. Never open the PR while a ブロッカー is outstanding.
    • APPROVE: proceed. Consider 提案(非ブロッキング) items; apply the cheap, safe ones.
  5. Record the verdict in the PR description. The PR body should carry the reviewer's report verbatim inside the marker block below, so a reader can see the review actually happened:

    markdown
    <!-- pre-pr-review: approved -->
    ## Pre-PR review
    
    <paste the reviewer's final report here>

    If a later push changes the branch materially, re-run this skill and update the block (pre-pr-review: approved must stay truthful for the HEAD commit).

Show full SKILL.md (58 more words)Show less

Rules

  • Do not skip, summarize away, or forge the reviewer report; the block must be the subagent's actual output for the current HEAD. Nothing checks this now, which is exactly why it matters.
  • If the repo-reviewer subagent is unavailable, say so in the PR — do not open it silently.
  • Trivial bot PRs (e.g. Weblate translation sync) are exempt.

© yuga-hashimoto, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .opencode/skills/pre-pr-review of yuga-hashimoto/and-code.

Open the folder on GitHubat commit f6593e1

Compare with similar skills

Pre-PR Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pre-PR Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pre-PR Review this skillyuga-hashimoto/and-code127—~710Automated safety check: PassMIT
PR Deep VerificationQwenLM/qwen-code28k—~23kAutomated safety check: PassApache-2.0
Open Code Review CLIalibaba/open-code-review46k—~3.1kAutomated safety check: PassApache-2.0
Understand Diff AnalysisEgonex-AI/Understand-Anything86k—~1.4kAutomated safety check: PassMIT
Code Reviewflutter/flutter180k—~1.4kAutomated safety check: PassBSD-3-Clause
PR Review State Fetchprisma/orm48k—~767Automated safety check: PassApache-2.0

Similar skills

  • PR Deep Verification

    QwenLM/qwen-code

    Runs a sandboxed, evidence-based check of one qwen-code pull request, proving its main change against the base build and writing a report with a machine-readable verdict.

    28k GitHub stars~23k tokensUpdated today
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    46k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Review

    flutter/flutter

    Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback.

    180k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    Fetches a pull request's canonical review state as JSON, validates it, and renders markdown, a text summary and triage target files from it using bundled scripts.

    48k GitHub stars~767 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Knowledge Graph PR Review

    tirth8205/code-review-graph

    Reviews a pull request or branch diff with a code knowledge graph and produces a structured review that includes blast-radius analysis.

    32k GitHub stars~452 tokensUpdated 4 days ago
    DevelopmentAuto-check passed

Categories

Questions about Pre-PR Review

What does Pre-PR Review do?

Runs local checks and a repo-reviewer subagent over the whole branch diff before a pull request is opened, then records the approval in the PR description. Written for one Android repository, the skill makes an approved review a precondition for creating a pull request. It starts by fetching origin main and listing the branch diff, and stops if the branch has nothing ahead.

When should I use Pre-PR Review?

Pre-PR Review fits situations like: about to open a pull request in this repository; re-checking a branch after reviewer feedback; adding the reviewer's verdict to a PR description.

How do I install Pre-PR Review in Claude Code?

Run `npx skills add yuga-hashimoto/and-code --skill pre-pr-review -a claude-code`. Or copy the skill folder (.opencode/skills/pre-pr-review in yuga-hashimoto/and-code) into .claude/skills/pre-pr-review in your project. Claude Code loads it when a task matches its description.

How do I install Pre-PR Review in Codex?

Run `npx skills add yuga-hashimoto/and-code --skill pre-pr-review -a codex`. Or copy the skill folder (.opencode/skills/pre-pr-review in yuga-hashimoto/and-code) into .agents/skills/pre-pr-review in your project. Codex loads it when a task matches its description.

Can I use Pre-PR Review in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yuga-hashimoto/and-code --skill pre-pr-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pre-pr-review, .gemini/skills/pre-pr-review, .github/skills/pre-pr-review and .opencode/skills/pre-pr-review in your project.

What does Pre-PR Review need to run?

Going by SKILL.md and its folder, Pre-PR Review needs the command-line tools its instructions call (git). Our summary lists: Git with an origin/main branch; A repo-reviewer subagent defined in the repository; The Gradle tasks detekt and spotlessCheck.

Does Pre-PR Review access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Pre-PR Review safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pre-PR Review use?

Pre-PR Review is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pre-PR Review use?

About 710 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pre-PR Review?

Skills that share tags, products or a category with Pre-PR Review: PR Deep Verification (QwenLM/qwen-code, 28k stars), Open Code Review CLI (alibaba/open-code-review, 46k stars), Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars) and Code Review (flutter/flutter, 180k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pre-PR Review?

yuga-hashimoto (a GitHub user) maintains it in yuga-hashimoto/and-code, which has 127 GitHub stars. The repository was last updated on October 8, 2026.

Source: yuga-hashimoto/and-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.