Mmcp.market

gh-pr-review skill

by CherryHQ·CherryHQ/cherry-studio·52k stars·AGPL-3.0

Automated Cherry Studio review for local branches, PRs, commits, files, architecture docs, and repository skills. Use for code or documentation reviews that need project-specific naming, main/renderer/shared placement and dependency rules, IpcApi and DataApi boundaries, lifecycle/service ownership, renderer hooks, React/UI conventions, and tests. Review depth adapts to diff size and runtime subagent capability (single-agent or multi-agent reviewer-verifier). Report-only by default; code fixes and GitHub submission each require explicit invocation-time authorization (`fix` / `submit`). Normal-review prompts and safe interruption behavior follow the interaction contract below. To diagnose gaps in the skill after a review session, run `/gh-pr-review diag`.

A100/100content scan

Is the gh-pr-review skill safe?

Clean: nothing in its files matched our rules. We read 12 files in the folder on 2026-09-28.

No findings.

Install the gh-pr-review skill

A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.

git clone --depth 1 https://github.com/CherryHQ/cherry-studio.git /tmp/cherry-studio
mkdir -p ~/.claude/skills
cp -r /tmp/cherry-studio/.agents/skills/gh-pr-review ~/.claude/skills/gh-pr-review
available in every project

In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub

The instructions your agent would load

SKILL.md as published, without the frontmatter. Read it on GitHub

<!-- Based on https://github.com/Tencent/tgfx/tree/main/.codebuddy/skills/cr --> <!-- Adapted for agent runtimes and the Cherry Studio tech stack -->

/gh-pr-review — Code Review

Automated code review for local branches, PRs, commits, and files. Detects the review target from arguments, then picks the review engine from diff size and runtime capability. Small diffs use single-agent review (references/local-review.md). Large diffs use the multi-agent reviewer–verifier flow (references/teams-review.md) only when independent subagents are available; otherwise they fall back to single-agent review with that limitation disclosed. PR targets add worktree setup and GitHub submission (references/pr-review.md) around the same engine-selection contract.

Cherry Studio-specific review rules live in references/cherry-review-guidance.md. Target review flows must load that file for code, mixed, architecture-doc, and project-skill reviews so reviewers can apply DataApi, service-boundary, renderer hook, React, UI, and type-contract checks without relying on memory. That reference also defines which internal docs, internal skills, external skills, and official websites to consult for each changed area; load only the relevant subset.

All user-facing text matches the user's language.

Interaction and interruption contract

Apart from the declared categories below, normal review is prompt-free: never ask for mode selection, fix confirmation, finding selection, or submission preview. A leaf flow may request input only when it explicitly declares one of these categories:

ask the current user for a decision the review cannot derive. In an automated session, record the impact and open decision without deciding for the user.

  • Product decision — in an interactive session, the Product Demand gate may

action, new authority, or missing external configuration. Declared examples are a dirty/mismatched review worktree, a missing canonical remote, cleanup of unexplained changes, removal of a failed fix patch, and a pending review draft holding comments this run did not confirm. In an interactive session, preserve state and ask only for the decision needed to proceed.

  • Safety or environment blocker — continuing would require destructive

maintenance are interactive selection flows outside normal review. They may ask for the declared edit selection or persistent checkout/branch target.

  • Explicit maintenance mode — diag and separately requested checklist

An automated session never waits for user input. At a product decision it continues record-only as specified below. At a safety/environment blocker it preserves state, stops the affected flow safely, and reports the exact blocker and required decision. In an explicit maintenance mode it reports candidates or missing destination information, applies no selection-dependent edits, and stops safely. No leaf flow may introduce another prompt category.

Review Stages

Every review runs these stages in order. A later stage reviews only what survived the earlier ones, so a stage never re-litigates an earlier verdict.

This table is the single source of truth for stage scope and references; a leaf flow may not widen, narrow, or re-reference a stage.

Stage applicability follows the changed content, not the commit label: a documentation-only diff still runs stages 3–5 when it changes Cherry architecture docs or project skills, and a code diff that also edits docs runs both reference sets for stages 4–5.

Stage 1: Product Demand gate

First inspect the semantics actually expressed or constrained by the change, then decide whether it affects product semantics, user-visible behavior, or product direction. Change labels are not sufficient evidence: internal refactors and non-user-facing fixes often have no product impact, while user-facing fixes, docs, tests, or tooling can record, lock, or alter product behavior.

When there is product impact, determine whether the direction is already established in the current review context. Treat it as established only when the current user explicitly decided it or an authoritative project artifact explicitly records the accepted behavior and its approval by the responsible project authority, such as a specification, an ADR, or an issue containing a maintainer decision that settles the expected behavior. Do not infer acceptance from issue state, labels, milestone, assignment, or a link from the PR. A change label, PR body, implementation, or test demonstrates author intent or current behavior but does not establish product approval on its own.

Classify the gate into exactly one state:

automated runs; say nothing about the skipped gate.

  • No product impact: skip this stage entirely in both interactive and

it aligns, continue without asking for another product decision. If it conflicts, report the product-direction mismatch and stop the whole review immediately — do not run Consumer, Architecture, Implementation, or Style stages, and do not report code findings. Applying an existing decision is not making a new one.

  • Established direction: compare the change with the recorded decision. If

product functionality and semantics, and ask the current user for the unresolved product decision. Do not infer automation from PR authorship, review ownership, or whether the user authored the change. If the user rejects the direction, stop the whole review as above; if the user approves it, continue with the remaining stages.

  • Open product decision:
  • Interactive session (default): summarize the change's effect on

invocation prompt or workflow context explicitly identifies a headless, CI, batch, or other automated run. Make no product decision on the user's behalf. Run the remaining stages, and in the final report summarize the product impact, the direction the change takes, and the points needing human confirmation. Never phrase this as product approval having been obtained.

  • Automated session (explicit only): use this mode only when the

Authority model

A review request authorizes analysis and reporting only. The review target, review depth, and reviewer–verifier confidence never grant execution authority; authority is granted explicitly at invocation time, and execution is prompt-free only after it has been granted:

with fix guidance. No working-tree edits, no GitHub writes.

  • Report-only (default): every review, any target — findings are reported

or equivalent explicit user wording ("review and fix …"). Local targets only. What each risk level then permits is owned by references/judgment-matrix.md § Handling by Risk Level; this section grants the authority and never restates the mapping. Applying fixes makes the session a coding task, so it must end with the validation selected per § Validation after applied fixes below.

  • Fix (explicit): granted only by the invocation — fix in $ARGUMENTS

$ARGUMENTS or equivalent explicit user wording. PR flows then submit all confirmed findings without per-comment prompts. Approving or merging always requires its own explicit request.

  • Submit (explicit): granted only by the invocation — submit in

Validation after applied fixes

Never run local lint, test, or format during a review that edited nothing. When fixes were applied, select the validation matching the changed surface, following AGENTS.md § Operational Rules ("Check what you changed, not the whole repo"), and report the results:

pnpm docs:check.

  • Docs/markdown-only fixes — including this skill's own files — run

invoke format again) plus the tests covering the change: a per-project wrapper such as pnpm test:main or pnpm exec vitest run . Never pnpm test — that script chains several vitest invocations and the path reaches only the last one.

  • Code fixes run pnpm lint (which already ends with pnpm format, so never

be named, and use pnpm test:lint when the CI-equivalent lint gate matters (pnpm lint tolerates oxlint warnings that CI denies).

  • Reserve the full pnpm test for a broad change whose affected tests cannot

Route

First strip authority modifiers from $ARGUMENTS (equivalent explicit user wording in the conversation counts the same; both default to false). Call the remainder REVIEWTARGET — every rule below, and every leaf flow, reads REVIEWTARGET, never the raw $ARGUMENTS:

  • fix → AUTHORIZED_FIX = true (meaningful for local targets)
  • submit → AUTHORIZED_SUBMIT = true (meaningful for PR targets)

Before choosing a review engine, inspect the runtime's exposed coordination capabilities. Set HAS_SUBAGENTS = true only when it can launch an independent reviewer and a fresh independent verifier. Parallel execution is not required; sequential subagents still satisfy the isolation contract.

Rules

Match the first applicable rule top-to-bottom:

proposed checklist candidates → references/checklist-evolution.md, entering at its Step 2. Maintenance runs only in the session that produced the candidates; it reviews nothing.

  1. REVIEW_TARGET is diag → references/diagnosis.md.
  2. REVIEW_TARGET is checklist, or the user explicitly asks to adopt the

references/pr-review.md (pass AUTHORIZEDSUBMIT and HASSUBAGENTS; the wrapper collects the exact PR scope before selecting the engine).

  1. REVIEW_TARGET is a PR number or URL containing /pull/ →

below, then select the engine.

  1. Everything else: derive the scope and SMALL_SCOPE per § Scope derivation

references/teams-review.md.

  • SMALL_SCOPE = true → references/local-review.md.
  • SMALLSCOPE = false with HASSUBAGENTS = true →

More skills from CherryHQ/cherry-studio

  • Acherry-assistant-guide从当前安装包查询 Cherry Studio 产品信息并排查运行问题。当用户询问功能、路由、快捷键、Provider、语言、Agent、频道、定时任务、Code CLI、当前版本,或报告运行错误、连接失败、配置异常并需要诊断时触发。
  • Acherry-browserInteract with the user's visible Agent browser in Cherry Studio. Use for page navigation, authenticated websites, screenshots, forms, clicks, and browser debugging. Check live browser tools first; browser control requires the Browser setting and an available Agent pane.
  • Acherry-electron-devDevelop, fix, and profile Cherry Studio in a tracked Electron instance. Use for everyday implementation, UI and interaction work, bug fixing, runtime debugging, DevTools inspection, lag or jank investigation, CPU and memory monitoring, leak checks, and startup-performance analysis; reuse a verified workspace instance across instructions and launch or replace one only when required.
  • Acherry-pr-testTest Cherry Studio PRs by resolving and checking out a PR, statically inspecting its changes, running interactive UI tests against a safely tracked Electron instance through CDP, producing a structured report, cleaning up only the owned test instance, and restoring the original branch.
  • Acherry-regression-testRun Cherry Studio critical-path system regression tasks through the repository-owned Playwright E2E workflow. Use for full regression, release acceptance, development-branch system validation, or a named cherry-regression-test task on GitHub-hosted macOS and Windows runners.
  • Acherry-skill-marketplace当用户明确要求搜索、安装、查看、卸载或创建 Skill,或内置 Skill / 工具出现能力缺口、无法完成当前任务时触发。通过 `mcp__skills__search_skills` 搜索并用 `mcp__skills__install_skill` 安装;已安装 Skill 的查看和删除通过产品清单导航到 Skills UI;没有合适结果时调用内置 `skill-creator` 创建并验证自定义 Skill,再继续原任务。普通任务仍先尝试内置能力。
  • Acherry-studio-feedbackUse when Cherry Studio 用户希望报告、提交或整理 BUG、UI/UX 问题或功能建议,但未明确要求创建 GitHub Issue。
  • Acherry-tool-guideCherry Studio first-party tool and bundled-shell routing for general agents. For straightforward local work in shell-capable sessions, run JS/TS with `bun <file>` and one-off JS tools with `bun x`; run Python with `uv run [--with <pkg>] python` and one-off Python CLIs with `uvx`; search with `rg`. Load this guide before changing project dependencies, deciding whether a tool should be ephemeral or reusable, reading or converting local Office/PDF files, coordinating or delegating across Agent Sessions, or using Cherry-owned web/browser, knowledge, persistent memory, schedules/notifications, IM channels, image generation, artifact reporting, managed CLI, skill, or MCP-server-registration capabilities—even if the user names no tool. Consult it before shell/file workarounds; live tool schemas are authoritative.
  • Aclaude-automation-recommenderAnalyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
  • Acode-mate-antigravityRuns Antigravity CLI headlessly for repository analysis and coding tasks. Use when the user asks to delegate work to Antigravity CLI or compare its result with another coding agent.
  • Acode-mate-claude-codeRuns Claude Code non-interactively for code analysis and implementation tasks. Use when the user asks to delegate repository work to Claude Code or compare its result with another coding agent.
  • Acode-mate-codexRuns Codex CLI non-interactively for code analysis and implementation tasks. Use when the user asks to delegate repository work to Codex or obtain a second coding-agent result.

All agent skills → · MCP servers