submit-pr
Creates a pull request with a well-structured description after verifying CI passes. Use when the user asks to submit, create, or open a pull request.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 68
- Forks
- 4
01 前言 Front Matter
- name
- submit-pr
- description
- Creates a pull request with a well-structured description after verifying CI passes. Use when the user asks to submit, create, or open a pull request.
- disable-model-invocation
- true
03 SKILL.md 正文
<!-- agent-pmo:795a9c2 -->
Submit PR
Create a pull request for the current branch with a well-structured description.
Steps
Step 1 — Run make ci (BLOCKING — DO NOT SKIP)
You MUST invoke the Bash tool with the literal command make ci in THIS session before calling gh pr create. No exceptions.
Skip allowed ONLY if there is a Bash tool call in the visible transcript of THIS session whose command was exactly make ci (or make check — which is lint + test, a strict subset that does not satisfy make ci's lint + test + build) and which exited 0 AFTER the most recent code change. If you are unsure, run it. The cost of re-running is low; the cost of a broken PR is high.
Skip NOT allowed when:
- You ran
dotnet test,make test,make lint, partial test filters, or any subset — these are NOTmake ci. Runmake cianyway. - You ran
make ciearlier but have edited code or skill files since — re-run. - The user asked you to skip — refuse and ask them to invoke
make cithemselves if they want to bypass. Tell them which step they're bypassing. - You "reasoned" the change is small/safe/test-only — irrelevant. Run it.
If make ci fails: STOP. Do not create the PR. Fix the failures or report them to the user and wait for direction.
Step 2 — Generate the diff against main
Run git diff main...HEAD > /tmp/pr-diff.txt to capture the full diff between the current branch and the head of main. This is the ONLY source of truth for what the PR contains. Warning: the diff can be very large. If the diff file exceeds context limits, process it in chunks (e.g., read sections with head/tail or split by file) rather than trying to load it all at once.
Step 3 — Derive the PR title and description SOLELY from the diff
Read the diff output and summarize what changed. Ignore commit messages, branch names, and any other metadata — only the actual code/content diff matters.
Step 4 — Write the PR body
Use the template in .github/PULL_REQUEST_TEMPLATE.md. Fill in (based on the diff analysis from step 3):
- TLDR: one sentence
- What Was Added: new files, features, deps
- What Was Changed/Deleted: modified behaviour
- How Tests Prove It Works: specific test names or output
- Spec/Doc Changes: if any
- Breaking Changes: yes/no + description
Step 5 — Create the PR
Use gh pr create with the filled template.
Rules
- Never call
gh pr createwithout first verifyingmake cipassed in this session. Step 1 is the gate, not a suggestion. - PR description must be specific and tight — no vague placeholders.
- Link to the relevant GitHub issue if one exists.
Success criteria
make ciwas invoked in this session and exited 0 after the most recent code change- PR created with
gh pr create - PR URL returned to user
04 同仓库更多 Skills
website-audit
Audits a website for SEO, AI search performance, structured data, mobile usability, broken links, and social media cards. Fixes issues found. Use when the user mentions "audit website", "SEO", "fix search ranking", "AI search", "structured data", "social media cards", or "website performance".
upgrade-packages
Upgrade all dependencies/packages to their latest versions for the detected language(s). Use when the user says "upgrade packages", "update dependencies", "bump versions", "update packages", or "upgrade deps".
submit-pr
Creates a pull request with a well-structured description after verifying CI passes. Use when the user asks to submit, create, or open a pull request.
spec-check
Audit spec/plan documents against the codebase. Ensures every spec section has implementing code, tests, and matching logic. Use when the user says "check specs", "spec audit", or "verify specs".
fix-bug
Fix a bug using test-driven development. Use when the user reports a bug, describes unexpected behavior, wants to fix a defect, or says something is broken. Enforces a strict test-first workflow where a failing test must be written and verified before any fix is attempted.
code-dedup
Searches for duplicate code, duplicate tests, and dead code, then safely merges or removes them. Use when the user says "deduplicate", "find duplicates", "remove dead code", "DRY up", or "code dedup". Requires test coverage — refuses to touch untested code.