gh-pr-review

$npx mdskill add CherryHQ/cherry-studio/gh-pr-review

Automates Cherry Studio code reviews with project-specific rules and multi-agent flows.

  • Reviews local branches, PRs, commits, and files for code or documentation.
  • Loads cherry-review-guidance.md for DataApi, service-boundary, and UI checks.
  • Detects review mode from arguments to choose single or multi-agent flow.
  • Returns review findings with interactive fix selection or risk-based auto-fix.

SKILL.md

.github/skills/gh-pr-reviewView on GitHub ↗
---
name: gh-pr-review
description: 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. Supports single-agent review with interactive fix selection or multi-agent reviewer-verifier review with risk-based auto-fix. To diagnose gaps in the skill after a review session, run `/gh-pr-review diag`.
---

<!-- 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
review mode from arguments and routes to the appropriate review flow — either
quick single-agent review with interactive fix selection, or multi-agent
deep review with risk-based auto-fix.

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. Use the runtime's interactive
dialog tool for questions and option selection when one is available; otherwise
ask one concise plain-text question and wait for the reply. Do not invent a tool
or syntax the runtime does not expose. For interactive multi-select: ≤4 items →
one question. >4 items → group by priority or category (each group ≤4 options),
then present all groups in one prompt.

## Route

Run pre-checks, then match the **first** applicable rule top-to-bottom:

1. `git branch --show-current` → record whether on main/master.
2. `git status --porcelain` → record whether uncommitted changes exist.
3. Check whether the current environment supports parallel subagents (agent
   teams), using the runtime-provided coordination tools.

| # | Condition | Action |
|---|-----------|--------|
| 1 | `$ARGUMENTS` is `diag` | → `references/diagnosis.md` |
| 2 | `$ARGUMENTS` is a PR number or URL containing `/pull/` | → `references/pr-review.md` |
| 3 | Agent teams NOT supported | → `references/local-review.md` |
| 4 | Uncommitted changes exist | → `references/local-review.md` |
| 5 | On main/master branch | → `references/local-review.md` |
| 6 | Everything else | → Question below |

Each `→` means: `Read` the target file and follow it as the sole remaining
instruction. Ignore all sections below. Do NOT review from memory or habit —
each target file defines specific constraints on how to obtain diffs, apply
fixes, and submit results.

> **Priority rule**: user intent (Rule 1, 2, 6) takes priority over working-tree
> state (Rule 3, 4, 5). A PR URL or PR number always goes to
> `references/pr-review.md` even when the working tree is dirty or the
> current branch is `main`/`master` — those state conditions only apply when
> the user did not specify a review target.

---

## Question

Ask a **single question**:
"Agent Teams is available (multiple agents working in parallel). Enable multi-agent review with reviewer–verifier adversarial mechanism and auto-fix?"
Provide 4 options:

| Option | Description |
|--------|-------------|
| Teams + auto-fix low & medium risk (recommended) | Multi-agent review; auto-fix most issues, only confirm high-risk ones (e.g., API changes, architecture). |
| Teams + auto-fix low risk | Multi-agent review; auto-fix only the safest issues (e.g., null checks, typos, naming). Confirm everything else. |
| Teams + auto-fix all | Multi-agent review; auto-fix everything. Only issues affecting test baselines are deferred. |
| Single-agent + manual fix | Single-agent review; interactively choose which issues to fix afterward. |

### Hand off

| Option | → | FIX_MODE |
|--------|---|----------|
| Teams + auto-fix low & medium risk (recommended) | `references/teams-review.md` | low_medium |
| Teams + auto-fix low risk | `references/teams-review.md` | low |
| Teams + auto-fix all | `references/teams-review.md` | full |
| Single-agent + manual fix | `references/local-review.md` | — |

Pass `$ARGUMENTS` to the target file. For teams-review, also pass `FIX_MODE`
(low / low_medium / full).

More from CherryHQ/cherry-studio

SkillDescription
cherry-assistant-guideCherry Studio 产品知识库、源码路径索引、故障排查和页面导航。当用户询问 Cherry Studio 的功能、配置、报错、使用方法时触发。也适用于用户提到 provider、模型、知识库、Agent、MCP、OpenClaw、PDF、快捷短语等关键词的场景。
cherry-pr-testTest Cherry Studio PRs by checking out the branch, launching the Electron app in debug mode, and running interactive UI tests via CDP.
create-skillCreate a new skill in the current repository. Use when the user wants to create/add a new skill, or mentions creating a skill from scratch. This skill follows the workflow defined in .agents/skills/README.md and helps scaffold, validate, and sync new skills.
demand-first-reviewUse when reviewing a PR, API, IPC channel, endpoint, parameter, type, config, or architectural extension point that adds or expands shared surface area, especially when consumers are absent, exports are unused or speculative, existing consumers are hack-heavy, forward compatibility is claimed, or multiple similar APIs may express one demand.
faq-collector将成功解决的用户问题收录到 FAQ 知识库。问题解决后自动判断是否收录。也可以在用户说"收录到 FAQ"、"记录这个问题"、"add to FAQ"时手动触发。
find-skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
gh-create-issueUse when user wants to create a GitHub issue for the current repository. Must read and follow the repository's issue template format.
gh-create-prCreate or update GitHub pull requests using the repository-required workflow and template compliance. Use when asked to create/open/update a PR so the assistant reads `.github/pull_request_template.md`, fills every template section, preserves markdown structure exactly, and marks missing data as N/A or None instead of skipping sections.
issue-reporter帮助用户提交 Bug Report 或 Feature Request。支持 GitHub Issue(有账户)和本地存档(无账户)两种模式。当诊断发现是代码 Bug 时主动提议,或当用户说"帮我提 issue"、"这是个 bug"、"我想要这个功能"、"submit a bug"、"feature request"时触发。
prepare-releasePrepare a new release by collecting commits, generating bilingual release notes, updating version files, and creating a release branch with PR. Use when asked to prepare/create a release, bump version, or run `/prepare-release`.