npx skills add ...
npx skills add oschina/gitee-agent-skills --skill 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". Requires Gitee MCP Server to be configured.
npx skills add oschina/gitee-agent-skills --skill review-pr
Note: If you have
mcporterinstalled locally, you should usemcporterto invoke the MCP tool instead of directly calling the MCP tool. ThemcporterCLI provides a more convenient interface and better error handling.
Perform a thorough code review on a Pull Request in a Gitee repository.
get_pull_detail, get_diff_files, list_comments (resource_type: pull), create_comment (resource_type: pull))Use get_pull_detail to retrieve PR information, checking:
Use get_diff_files to get the list of changed files, analyzing:
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).
Use list_comments (resource_type: pull) to retrieve existing comments and avoid raising issues that have already been discussed.
Review the code across these dimensions:
Correctness
Security
Maintainability
Performance
Consistency
Classify findings by severity:
STOP — Do not post yet!
Present the review content to the user for confirmation. Use this format:
If no issues are found, show:
Then ask the user: "请确认以上评审内容是否有问题。确认无误后,我将提交到 PR。"
Once the user confirms the review content is correct, use create_comment (resource_type: pull) to post the review to the PR. Use this format:
If no issues are found, comment:
## Code Review Preview
LGTM! No significant issues found. Code quality looks good.## 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## Code Review
LGTM! No significant issues found. Code quality looks good.
🤖 Generated by AI + Gitee MCP