merge-pr-check
Skill4 starsChanged 7 months agoMITView on GitHub
Use this skill when the user asks to merge a PR, check if a PR is ready to merge, "merge PR", "can this PR be merged", "merge-pr-check". Requires Gitee MCP Server to be configured.
In this repository13 other files it gives its agents.
- close-issue-flowSkill
- create-issueSkill
- create-prSkill
- create-releaseSkill
- daily-digestSkill
- implement-issueSkill
- quick-fix-suggestionSkill
- repo-explorerSkill
- review-prSkill
- search-and-forkSkill
- search-reposSkill
- stale-pr-reminderSkill
- triage-issuesSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Check whether a Pull Request meets the criteria for merging, then execute the merge after confirmation.
- Very specific: line 25
Use get_pull_detail to retrieve PR details and check:
- Very specific: line 38
Use list_comments (resource_type: pull) to retrieve all comments and check:
- Very specific: line 45
Use get_diff_files to inspect changed files:
- Distinctive: line 76
If the checks pass, ask the user to confirm the merge.
- Very specific: line 78
After confirmation, use merge_pull with these parameters:
- Very specific: line 80
Default recommendation: merge.
- Distinctive: line 83
After a successful merge, output the result and ask whether the user wants to delete the source branch.
- Distinctive: line 88
If there are conflicts, the Gitee API will return an error — prompt the user to resolve conflicts first
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Merge PR Check via Gitee MCP
Check whether a Pull Request meets the criteria for merging, then execute the merge after confirmation.
Prerequisites
- Gitee MCP Server configured (tools:
get_pull_detail,list_comments(resource_type: pull),get_diff_files,merge_pull) - User must provide: repository owner, repository name, PR number
Steps
Step 1: Fetch PR Status
Use get_pull_detail to retrieve PR details and check:
Basic status
- Whether the PR is open (stop if already closed/merged)
- Whether it is a Draft — if so, inform the user it must be converted to a regular PR first
- Whether source and target branches are correct
Pre-merge checklist
- Whether the PR has a description explaining the purpose of the changes
- Whether a reviewer has been assigned
Step 2: Analyze Comments and Review Feedback
Use list_comments (resource_type: pull) to retrieve all comments and check:
- Whether any reviewer has explicitly objected to merging (e.g., "NACK", "needs changes", "do not merge")
- Whether there are unresolved discussions (questions raised but not replied to)
- Whether there are any LGTM or Approved responses
Step 3: Quick Diff Check
Use get_diff_files to inspect changed files:
- Whether there are obvious omissions (e.g., code changed but related config not updated)
- Whether unexpected files are included (debug code, temp files)
- Whether the scope of changes matches the PR description
Step 4: Provide Merge Recommendation
Based on the checks above, output a merge assessment report:
## PR Merge Check Report
**PR**: #[number] [title]
**Status**: [Open/Draft/Closed]
### Checklist
✅ PR is in Open state
✅ Has a change description
⚠️ No reviewer approval yet
✅ Diff scope is reasonable
### Conclusion
[Ready to merge / Recommend waiting for review / Not recommended to merge]
Reason: [Specific explanation]Step 5: Execute Merge (requires user confirmation)
If the checks pass, ask the user to confirm the merge.
After confirmation, use merge_pull with these parameters:
merge_method: merge strategy —merge(creates a merge commit),squash(squashes commits), orrebase- Default recommendation:
merge; suggestsquashif the PR has many messy commits
- Default recommendation:
commit_message: merge commit message (optional, defaults to PR title)
After a successful merge, output the result and ask whether the user wants to delete the source branch.
Notes
- Merging is irreversible — always wait for explicit user confirmation before proceeding
- If there are conflicts, the Gitee API will return an error — prompt the user to resolve conflicts first
- It is recommended to confirm that CI has passed before merging (check the PR's status checks)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

