← 返回 Skills 市场
oschina

Review Pr

作者 开源中国 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
341
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install gitee-review-pr
功能描述
Use this skill when the user asks to review a PR, do a code review, check a pull request, "review this PR", "review-pr", or "look at this pull request". Requ...
使用说明 (SKILL.md)

Note: If you have mcporter installed locally, you should use mcporter to invoke the MCP tool instead of directly calling the MCP tool. The mcporter CLI provides a more convenient interface and better error handling.

Review PR via Gitee MCP

Perform a thorough code review on a Pull Request in a Gitee repository.

Prerequisites

  • Gitee MCP Server configured (tools: get_pull_detail, get_diff_files, list_pull_comments, comment_pull)
  • User must provide: repository owner, repository name, PR number (or say "review the latest PR")
  • Optional: If the current directory is the local clone of the PR's repository, you can leverage local git commands and file access to get more context.

Steps

Step 1: Fetch PR Details

Use get_pull_detail to retrieve PR information, checking:

  • Whether the title and description clearly explain the purpose of the changes
  • Whether the source and target branches are correct
  • PR state (if already closed/merged, stop the review)
  • Whether it is a Draft — if so, notify the user

Step 2: Fetch Diff Files

Use get_diff_files to get the list of changed files, analyzing:

  • Number and scope of changed files
  • Whether any sensitive files are involved (config files, secrets, permission-related code)

For each core changed file, use get_file_content to read its content for context.

If running in the local repository directory, leverage local git commands and file access to gain additional context for the review (e.g., viewing related commits, related files, file history).

Step 3: Check Existing Comments

Use list_pull_comments to retrieve existing comments and avoid raising issues that have already been discussed.

Step 4: Code Review

Review the code across these dimensions:

Correctness

  • Is the logic correct? Are edge cases handled?
  • Are there obvious bugs or null pointer risks?
  • Is error handling adequate?

Security

  • Are there SQL injection, XSS, command injection, or other security risks?
  • Is sensitive information hardcoded?
  • Are permission checks in place?

Maintainability

  • Are names clear and semantic?
  • Does each function/method have a single responsibility?
  • Are complex logic blocks documented with comments?

Performance

  • Are there unnecessary nested loops or N+1 queries?
  • Are large file operations mindful of memory usage?

Consistency

  • Does the code follow the existing project style?
  • Is it consistent with related modules?

Step 5: Classify Issues

Classify findings by severity:

  • 🔴 Blocker: Affects correctness or has a security risk — must be fixed
  • 🟡 Suggestion: Code quality issue — recommended but not mandatory
  • 🟢 Optional: Nice-to-have improvement

Step 6: Post Review Comment

Use comment_pull to post the review to the PR. Use this format:

## Code Review

**Summary**: [One sentence describing the purpose of the PR and overall quality assessment]

### 🔴 Blockers
1. **[filename:line]** [Issue description]
   - Problem: [Specific explanation]
   - Suggestion: [How to fix it]

### 🟡 Suggestions
1. **[filename]** [Issue description]
   - Suggestion: [Direction for improvement]

### 🟢 Optional
1. [Improvement suggestion]

### Conclusion
[Overall assessment — LGTM or key changes needed]

🤖 Generated by AI + Gitee MCP

If no issues are found, comment:

## Code Review

LGTM! No significant issues found. Code quality looks good.

🤖 Generated by AI + Gitee MCP

Notes

  • Focus only on new/modified code in the PR, not pre-existing code
  • Avoid nitpicking — do not raise issues that a linter would automatically catch
  • Comments should be specific and actionable — provide suggestions, not just observations
  • For uncertain issues, say "recommend verifying" rather than asserting it is definitely a bug
安全使用建议
This skill appears to do what it says: review a Gitee PR via MCP endpoints and post comments. Before installing or running it, consider: (1) verify your platform's Gitee MCP server configuration and the permissions of any tokens it contains, since the skill will use that server to read and post PR data; (2) be aware that if you run the skill in a local clone directory it may access local files and git history for context — that can reveal config or secrets in the repository or adjacent files, so only run it where you trust the workspace; (3) note the small inconsistency in the SKILL.md (it references get_file_content but doesn't list it in prerequisites) — ensure the agent environment provides that MCP method or tooling (or mcporter as suggested) before relying on fully automated reviews; and (4) the skill will post comments to the PR — confirm you want automatic posting rather than a manual draft review.
功能分析
Type: OpenClaw Skill Name: gitee-review-pr Version: 1.0.0 The skill bundle provides a standard workflow for performing code reviews on Gitee Pull Requests using the Model Context Protocol (MCP). The instructions in SKILL.md guide the agent through fetching PR details, analyzing diffs, and posting structured feedback via legitimate MCP tools (e.g., get_pull_detail, comment_pull), with no evidence of malicious intent, data exfiltration, or unauthorized execution.
能力评估
Purpose & Capability
Name/description (review PR) match the instructions (use Gitee MCP APIs to fetch PR details, diffs, comments, and post review comments). The declared dependency on a Gitee MCP server is appropriate for this purpose. Minor inconsistency: SKILL.md uses get_file_content in Step 2 but the Prerequisites list of MCP tools does not include get_file_content.
Instruction Scope
Instructions are focused on reviewing PRs via MCP endpoints (get_pull_detail, get_diff_files, list_pull_comments, comment_pull). The skill explicitly allows optionally leveraging local git commands and reading local repository files for extra context — this expands its runtime scope to local filesystem access when run in a repo directory and could expose local config/secrets if present. The SKILL.md otherwise stays within the review task and instructs posting comments only to the PR via comment_pull.
Install Mechanism
No install spec and no code files (instruction-only), so nothing is written to disk or downloaded by the skill itself — lowest-risk install profile.
Credentials
The skill declares no environment variables or credentials, which is proportionate. However it depends on a configured Gitee MCP server (mcp-servers: gitee); the platform's MCP configuration may contain API tokens/credentials that will be used at runtime — those credentials are not enumerated here, so verify the MCP server config and its permissions before use.
Persistence & Privilege
Skill does not request always:true and is user-invocable; it does not modify other skills or system-wide settings. Autonomous invocation (disable-model-invocation:false) is the platform default and not a unique concern here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gitee-review-pr
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gitee-review-pr 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the gitee-review-pr skill: - Enables automated code review for Gitee pull requests via MCP Server. - Outlines prerequisites, review steps, and issue classification. - Guides users through PR detail analysis, diff inspection, comment checks, and multi-dimensional code review (correctness, security, maintainability, performance, consistency). - Provides templated output for posting structured review comments. - Designed for use with local git context when available.
元数据
Slug gitee-review-pr
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Review Pr 是什么?

Use this skill when the user asks to review a PR, do a code review, check a pull request, "review this PR", "review-pr", or "look at this pull request". Requ... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 341 次。

如何安装 Review Pr?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gitee-review-pr」即可一键安装,无需额外配置。

Review Pr 是免费的吗?

是的,Review Pr 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Review Pr 支持哪些平台?

Review Pr 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Review Pr?

由 开源中国(@oschina)开发并维护,当前版本 v1.0.0。

💬 留言讨论