Review Pr
by @oschina
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...
clawhub install gitee-review-prπ About This Skill
name: review-pr description: 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. version: 1.0.0 requires: mcp-servers: - gitee
> 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
get_pull_detail, get_diff_files, list_pull_comments, comment_pull)Steps
Step 1: Fetch PR Details
Use get_pull_detail to retrieve PR information, checking:
Step 2: Fetch Diff Files
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).
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
Security
Maintainability
Performance
Consistency
Step 5: Classify Issues
Classify findings by severity:
Step 6: Post Review Comment
Use comment_pull to post the review to the PR. Use this format:
## Code ReviewSummary: [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 ReviewLGTM! No significant issues found. Code quality looks good.
π€ Generated by AI + Gitee MCP
Notes
βοΈ Configuration
get_pull_detail, get_diff_files, list_pull_comments, comment_pull)