prepare-pr
Use when the user asks to "prepare my PR", "write a PR title and body", "open a PR for this branch", or "make a local PR draft" from an existing change. Also when a branch needs a description that follows the repository template.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- prepare-pr
- license
- MIT
- metadata
- { "summary": "Prepares a diff-grounded PR title and body with accurate validation and explicit publication scope.", "category": "Delivery" }
- description
- Use when the user asks to "prepare my PR", "write a PR title and body", "open a PR for this branch", or "make a local PR draft" from an existing change. Also when a branch needs a description that follows the repository template.
02 资源文件 12
- 参考文档evals/budget.json873 B
- 其他evals/cases-initial.jsonl14.5 KB
- 其他evals/cases.jsonl20.8 KB
- 参考文档evals/fixtures/README.md212 B
- 参考文档evals/matrix.json1.2 KB
- 参考文档evals/results/README.md1.8 KB
- 参考文档evals/rubric.md3.2 KB
- 参考文档evals/run.md3.9 KB
- 参考文档evals/score-input.schema.json635 B
- 脚本evals/score.mjs176 B
- 参考文档evals/suite-manifest-i1.json12.2 KB
- 参考文档evals/suite-manifest-i2.json12.2 KB
03 SKILL.md 正文
Prepare PR
Describe the actual reviewable change and observed validation. Keep publication within the user's request.
Scope
Use for a pull-request title/body from an existing branch or specified diff. Keep an unspecified or draft-only request local. Publish through the repository's normal tooling only when publication is requested.
Do not use for:
- Reviewing correctness: use
review-code; inspect the diff for evidence-backed defects if unavailable. - Implementing or repairing the feature: use
deliver-feature; preserve requirements and verify bounded changes if unavailable. - Merging, deployment, or changing branch protection: require those actions in the user's scope.
Workflow
1. Establish the review boundary
Inspect status, branch, base, head, and the actual diff. Use the requested base or the repository's documented default. Record ambiguity when neither can be established. Separate committed branch changes from dirty user work. Include dirty work only when the requested draft scope includes it. Read the PR template and originating requirements when present. Treat old titles and descriptions as historical context.
Done when the proposed PR scope matches observed Git state and the user's request.
2. Gather validation evidence
Read recorded commands, results, and their relationship to the current head. Rerun the project's existing test or check command when it only reads. Ask before running one that writes, deploys, or calls a network service. Distinguish passed, failed, unrun, and historical checks. Keep failures visible even when their cause appears environmental. Describe a cause as inference unless the evidence establishes it. Leave fixing code or tests to separately authorized work.
Done when each validation claim names an observed result and its coverage limit.
3. Write the review artifact
Lead the title and body with the concrete problem and resulting behavior.
Use a before/after example when it helps assess the change.
Follow the repository's template.
Keep detail proportional to the diff.
Report material risks, compatibility effects, and rollback where relevant.
Remove abandoned scope and unsupported readiness claims.
Save the requested draft or use docs/pr-draft.md as a fallback.
Done when a reviewer can assess the final change without reading this conversation.
4. Publish within scope
For a local draft, report its path and stop. For requested publication, state the remote, head branch, base branch, and title in one line before acting. Ask first when any of these holds, because each publishes something the user did not review:
- the base was not established;
- the branch holds commits the draft does not describe;
- the described change is not fully committed;
- an open PR for the branch already has a description someone else wrote.
Push only the head branch, without force. Create or update the PR with the repository's existing tooling, normal authentication, and repository permissions. Report the PR URL and any failed operation. Leave merging and deployment to a separate request.
Done when the requested local or published artifact exists and its actual state is reported.
Worked example
Fix export record separators
Export now emits one JSON object per line while preserving record order. Unit formatting checks passed for the recorded head. Integration failed with an upstream timeout; integration behavior remains unverified. The unrelated dirty logger edit is excluded from this PR draft.
Verification
Compare the final title/body with the actual diff and template. Check that failed or stale validation never became a passing claim. Check publication stayed within the requested authority. Return a reviewable artifact grounded in the actual change.
04 同仓库更多 Skills
write-agent-instructions
Make the smallest evidence-backed change to persistent project instructions and test downstream behavior.
verify-work
Use when a finished, runnable artifact (a script, config, parser, prompt, or CLI, not a diff under review) must survive hostile input before shipping: the user asks to "verify this script", "find the loopholes", "test this properly against bad input", or asks "is this ready to ship" about one. Also when a shipped artifact failed on an input nobody tried, or when verification so far is a happy-path smoke test.
understand-codebase
Use when the user asks to "understand this codebase", "how does this feature work in this repo?", "trace this feature through the code", or needs onboarding, an architecture explanation, or answers about unfamiliar code. Also use for read-only code-path questions before a change.
tdd
Use when writing or changing production behavior: implementing a feature, fixing a bug whose cause is already known, or altering stored, transformed, migrated, serialized, or externally transmitted data. Also use when a user says "use TDD", "test first", or "red-green-refactor", and when code is being written before a failing test. For a failure whose cause is unknown, diagnose first.
simplify-code
Use when the user asks to "simplify this code", "remove the fluff", or "clean up this over-engineered module", or wants working code that is bloated, duplicated, over-abstracted, or dependency-heavy reduced without changing behavior.
review-session
Review an agent session for evidence-backed friction and the smallest measurable remedies.