submit-pr
Skill7 starsChanged 5 months agoMITView on GitHub
Submit a PR to main with auto-merge. Scans current changes, assesses risk, creates the PR, enables auto-merge when safe, and reports any blockers. Use when asked to "提交PR", "提个PR", "create a PR", "open a PR", "submit PR", "提PR到main", "merge to main", or when code changes are ready for review.
- Commits and pushes
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Diego-Romero/claude-skillstheir own version, first seen Oct 13, 2026
- MelbourneDeveloper/dart_nodetheir own version, first seen Oct 9, 2026
- baidu-baige/LoongForgetheir own version, first seen Oct 8, 2026
- tisfeng/Easydicttheir own version, first seen Oct 8, 2026
- e2bgateway/e2bgatewaytheir own version, first seen Sep 8, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- tisfeng/Easydict★ 15ksame name
- baidu-baige/LoongForge★ 848same name
- MelbourneDeveloper/dart_node★ 113same name
- e2bgateway/e2bgateway★ 9same name
- Diego-Romero/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- release-publishSkill
- release-tagSkill
- release-versionSkill
- self-checkSkill
- sync-agent-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
After completing a feature, fix, or refactor on a task branch
- Distinctive: line 15
When the user wants to merge work into main
- Distinctive: line 25
Before creating the PR, understand what blocks auto-merge on this repo:
- Distinctive: line 47
Check for uncommitted changes:
- Distinctive: line 53
If there are uncommitted changes, stop and tell the user to commit or stash first.
- Very specific: line 67
Test-only changes (*.test.ts, *.test.tsx, src/tests/)
- Distinctive: line 92
If the branch has not been pushed to the remote yet:
- Very specific: line 103
Use the conventional commit format: type(scope): description
- Distinctive: line 112
Create the PR and capture the PR number:
- Distinctive: line 136
If auto-merge enables successfully:
- Distinctive: line 144
If auto-merge fails to enable, check the reason:
- Distinctive: line 166
If the risk is low (docs, tests, config only):
- Distinctive: line 170
If the risk is medium:
- Distinctive: line 174
If the risk is high:
- Distinctive: line 192
On main: do not create a PR from main.
- Distinctive: line 197
CI not starting: check if the workflow triggers on the branch's file changes.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Submit PR
Creates a PR targeting main, analyzes the diff to assess whether auto-merge is safe, enables auto-merge when possible, and reports any blockers that prevent immediate merge.
When to Use
- Code changes are committed and ready for review
- Any request to "提PR", "提交PR", "create PR", "open PR"
- After completing a feature, fix, or refactor on a task branch
- When the user wants to merge work into main
Prerequisites
- On a non-
mainbranch with committed changes ghCLI authenticated- Remote branch pushed (the skill handles this if not yet pushed)
Branch Protection Rules
Before creating the PR, understand what blocks auto-merge on this repo:
| Rule | Requirement |
| Required status checks | Frontend Checks, Backend Checks, ai-review |
| Required reviews | 1 approving review |
| Conversation resolution | All threads must be resolved |
Auto-merge can be enabled even before reviews are done — it queues the merge and executes once all gates pass. The skill enables auto-merge whenever possible and tells the user what manual steps remain.
Workflow
Phase 1 — Scan Changes
Confirm current branch and that it is not
main:git branch --show-currentCheck for uncommitted changes:
git status --shortIf there are uncommitted changes, stop and tell the user to commit or stash first.
Get the diff summary against
main:git diff main...HEAD --stat git log main..HEAD --onelineClassify the change risk based on the diff:
Low risk (safe for auto-merge):
- Docs-only changes (
*.md,docs/) - Config/tooling changes (
.github/,scripts/,.agents/) - Test-only changes (
*.test.ts,*.test.tsx,src/tests/) - Style/formatting changes
Medium risk (auto-merge OK, but flag for careful review):
- Frontend component changes (
src/components/,src/pages/) - Hook or utility changes (
src/hooks/,src/lib/) - Design token changes (
src/design/)
High risk (recommend manual review before merge):
- Backend/Rust changes (
src-tauri/) - Tauri config changes (
tauri.conf.json) - Dependency changes (
package.json,Cargo.toml) - API surface changes (
src/api/) - Auth, permissions, or security-related changes
- Docs-only changes (
- Report the scan result to the user:
Diff summary: {N} files changed, {insertions}+/{deletions}- Change type: {low/medium/high} risk Files: {list key files} Auto-merge: {recommended / OK with review / not recommended}
Phase 2 — Push Branch
If the branch has not been pushed to the remote yet:
git push -u origin HEADPhase 3 — Create PR
- Generate the PR title from the branch name and commit messages:
- Use the conventional commit format:
type(scope): description - Derive from the branch name or the first commit message
- Use the conventional commit format:
Generate the PR body from the commit log:
git log main..HEAD --format="- %s"Create the PR and capture the PR number:
gh pr create \ --base main \ --head "$(git branch --show-current)" \ --title "<title>" \ --body "<body>" PR_NUMBER=$(gh pr view --json number -q .number)
Output: PR_URL and PR_NUMBER created.
Phase 4 — Enable Auto-Merge
Enable auto-merge with squash:
gh pr merge "$PR_NUMBER" --auto --squashIf auto-merge enables successfully:
Auto-merge is ON. The PR will merge automatically once:
- All CI checks pass (Frontend Checks, Backend Checks, ai-review)
- At least 1 review approval is received
- All review conversations are resolved
- If auto-merge fails to enable, check the reason:
- Not enabled on repo: tell the user to enable auto-merge in repo settings
- Branch protection blocks it: report the specific blocker
Output: auto-merge status and remaining steps.
Phase 5 — Report
Report the full status to the user:
PR #{NUMBER}: {title}
URL: {PR_URL}
Auto-merge: {ON/OFF}
Change risk: {low/medium/high}
Remaining steps:
- {list what's needed before merge}If the risk is low (docs, tests, config only):
Changes look safe. Once a reviewer approves and CI passes, this will merge automatically.
If the risk is medium:
Changes touch application code. A reviewer should look at this before it merges. Auto-merge is queued — it will merge after approval + CI.
If the risk is high:
Changes touch backend, dependencies, or security-sensitive areas. Recommend careful review. Auto-merge is enabled but will only merge after explicit approval.
Quick Reference
| Step | Command |
| Diff against main | git diff main...HEAD --stat |
| Create PR | gh pr create --base main --head <branch> |
| Enable auto-merge | gh pr merge <N> --auto --squash |
| Check PR status | gh pr view <N> --json state,reviewDecision,statusCheckRollup |
| Check branch protection | gh api repos/{owner}/{repo}/branches/main/protection |
Error Handling
- On main: do not create a PR from main. Tell the user to create a task branch first.
- No changes: nothing to PR. Tell the user.
- Branch not pushed: push first, then create PR.
- PR already exists: find the existing PR with
gh pr list --head <branch>and report its URL. - Auto-merge unavailable: report the PR URL and explain what's blocking.
- CI not starting: check if the workflow triggers on the branch's file changes.
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.

