Agent Skills › penpot/penpot › review-code

review-code

GitHub

用于执行代码审查流程,支持对 Diff、PR 或代码变更进行评估。通过委派子代理并遵循特定标准生成结构化审查意见,同时严格保持只读状态,避免在审查期间修改代码。

.agents/skills/review-code/SKILL.md penpot/penpot

Trigger Scenarios

用户请求审查代码、Diff 或 PR 运行 /review-code 命令

Install

npx skills add penpot/penpot --skill review-code -g -y
More Options

Non-standard path

npx skills add https://github.com/penpot/penpot/tree/develop/.agents/skills/review-code -g -y

Use without installing

npx skills use penpot/penpot@review-code

指定 Agent (Claude Code)

npx skills add penpot/penpot --skill review-code -a claude-code -g -y

安装 repo 全部 skill

npx skills add penpot/penpot --all -g -y

预览 repo 内 skill

npx skills add penpot/penpot --list

SKILL.md

Frontmatter
{
    "name": "review-code",
    "slash": true,
    "description": "Code review flow — review a diff, PR, or code change, delegating the review to a subagent that follows the code-review-criteria skill. Use it when the user asks to review code or a PR, in any phrasing."
}

Review Code

Act as a senior software engineer and perform a thorough code review.

When to use

  • The user asks to review code, in any phrasing: "review this diff", "review the PR", "check my changes", "code review" — or runs /review-code.
  • A commit, branch, PR, or diff is ready and the user wants it assessed before merge.

Instructions

  1. Determine what is being reviewed from the user context: a working-tree diff, a commit range, a branch, a PR (number or URL), or specific files. If the target is ambiguous, ask before reviewing.
  2. Delegate the review to the general subagent (via the task tool), unless the user specifies another agent. Include in the prompt the code-review-criteria skill name and all user context.
  3. When the subagent returns, output the review to the user verbatim. Do not summarize it and do not act on its findings.
  4. Right after the review, suggest how to proceed based on the findings. These are suggestions — the user decides:
    • Approve (no required changes): say so — there is nothing to address.
    • Minor findings (nits): applying them directly as-is is fine once the review is done — no plan needed.
    • Substantive findings: suggest /make-a-plan to make a plan to address them.

Hard rule — read-only while reviewing

This flow is read-only for the duration of the review: from the moment it starts until the user considers the review finished (including any feedback, questions, or clarifications about it). During that period, never fix, implement, edit files or create commits — not even "obvious" fixes derived from the findings. Once the user explicitly states the review is done (or moves on to a different task), this rule no longer applies and you act as a normal build agent again.

Instructions for the subagent

  1. Load the code-review-criteria skill and follow its process and output format.
  2. Read AGENTS.md (if present) and follow its instructions for finding and reading all related testing documentation from memories before reviewing.
  3. Return in your final message the COMPLETE review, verbatim, exactly as the skill instructs it to be produced. Do not summarize it — include the full structured review.

Strong rules for the subagent

  1. Do not invent problems. Every finding must be real and actionable.
  2. Read-only: do not modify any file and do not create a commit — reviewing never writes.
  3. Be specific and constructive. "This could be better" is not helpful — explain why and how.
  4. Prioritize by impact. One structural issue outweighs ten nits.
  5. Missing tests are an issue, not a suggestion. Report as a severity-tagged finding — never as a recommendation.
  6. Skip generated files, lockfile-only changes, and unrelated modifications unless they introduce security risks.

Posting as a GitHub comment

Only post the review as a comment when the user asks for it explicitly. Keep it in the session otherwise.

When posting: PR comments go in English, with this minimal structure:

  1. Intro line — one sentence: what was found and the overall tone. No greetings.
  2. ## Main issues — one subsection per required finding: what breaks, the failure circumstances, and the minimal fix (code snippet when useful). A missing test belongs here, not under minor suggestions.
  3. ## Minor suggestions — one bullet per minor finding or suggestion: file/function, problem, concrete remedy.
  4. Closing — optional and short. Cut it when it adds nothing.

Reference every finding by its ID (R1, M1, S1, … from code-review-criteria) so follow-up replies can point to findings unambiguously.

User input, overrides and additional context

$ARGUMENTS

Version History

  • be2e117 Current 2026-10-20 06:51

    文档化 GitHub 评论结构及发现项 ID 规范;将扁平的发现项 ID 序列替换为基于严重程度的分类(R1/M1/S1),确保后续讨论引用清晰。

  • f9b8f1b 2026-09-28 20:57

    更新OpenCode开发工具链,将选定的Agent技能暴露为斜杠命令,并将调用参数传递给其入口点;升级devenv OpenCode CLI至v2.0.16版本。

  • 267134e 2026-09-23 10:32

Same Skill Collection

.agents/skills/bat-cat/SKILL.md
.agents/skills/code-review-criteria/SKILL.md
.agents/skills/create-commit/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/fd-find/SKILL.md
.agents/skills/find-project-anomalies/SKILL.md
.agents/skills/implement-plan/SKILL.md
.agents/skills/jq-json-processor/SKILL.md
.agents/skills/local-ci/SKILL.md
.agents/skills/make-a-plan/SKILL.md
.agents/skills/nrepl-eval/SKILL.md
.agents/skills/plan-review-criteria/SKILL.md
.agents/skills/planner/SKILL.md
.agents/skills/refine-prompt/SKILL.md
.agents/skills/resolve-git-conflicts/SKILL.md
.agents/skills/review-plan/SKILL.md
.agents/skills/rewrite-commit-message/SKILL.md
.agents/skills/ripgrep/SKILL.md
.agents/skills/security-and-hardening/SKILL.md
.agents/skills/taiga/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/update-changelog/SKILL.md
.opencode/skills/bat-cat/SKILL.md
.opencode/skills/code-review-and-quality/SKILL.md
.opencode/skills/code-review/SKILL.md
.opencode/skills/create-commit/SKILL.md
.opencode/skills/create-issue/SKILL.md
.opencode/skills/create-pr/SKILL.md
.opencode/skills/fd-find/SKILL.md
.opencode/skills/jq-json-processor/SKILL.md
.opencode/skills/nrepl-eval/SKILL.md
.opencode/skills/plan-review/SKILL.md
.opencode/skills/planner/SKILL.md
.opencode/skills/refine-prompt/SKILL.md
.opencode/skills/ripgrep/SKILL.md
.opencode/skills/security-and-hardening/SKILL.md
.opencode/skills/taiga/SKILL.md
.opencode/skills/testing/SKILL.md
.opencode/skills/update-changelog/SKILL.md
.agents/skills/ste/SKILL.md
.opencode/skills/ste/SKILL.md

Metadata

Files
0
Version
be2e117
Hash
6a35a3f4
Indexed
2026-09-23 10:32

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-11-02 03:06
浙ICP备14020137号-1