
pr-prep
Prepare PR commits and body. Triggers: "pr-prep", "pr prep", "prepare pr commits and body.".
- Installs
- 1.1K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/boshu2/agentops --skill pr-prep- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pr-prep automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
PR Preparation Skill
Prepare an external contribution by matching the target repository's actual conventions, proving the branch, and drafting a reviewable PR body. Execute the workflow; do not submit anything until the user explicitly approves the exact title, body, base, and remote.
Critical Constraints
- Why: prevent duplicate work. Check open and merged issues/PRs plus the current default branch before packaging a contribution.
- Why: respect the target. Read the target repository's
AGENTS.md,CONTRIBUTING.md, PR template, release notes, and recent accepted PRs; local AgentOps conventions never override upstream contribution rules. - Why: preserve atomic scope. Stop when the branch mixes unrelated themes, already-merged changes, generated noise, or secrets.
- Why: keep evidence truthful. Run the repository-prescribed build, lint, and test commands; never mark a check complete when it did not pass.
- Why: avoid destructive history edits. Commit splitting is suggestion-only unless the user separately authorizes a rewrite.
- Why: external publication changes state. Draft first, show the exact
artifact, and require explicit approval before
gh pr createor any push.
Boundary and Modes
Use for external repositories and open-source contribution preparation. Do not use for routine internal commits or the AgentOps direct-to-main release path.
The folded pr-research trigger enters upstream-research mode: perform prior
work discovery, contribution-guideline analysis, merged-PR archaeology, and
maintainer-pattern research before prep. Persist that research at
.agents/research/YYYY-MM-DD-upstream-<slug>.md.
Inputs are a target repository, current contribution branch, optional issue, and optional requested base/remote. Preparation may write local artifacts; it does not grant authority to publish, rewrite history, or message maintainers.
Workflow
- Check prior work. Resolve the upstream default branch and remote. Search open/closed issues and PRs for the behavior, symbols, and issue ID. Stop on a competing contribution until the user chooses how to proceed.
- Discover conventions. Read repository instructions, contribution docs, PR templates, CI config, changelog policy, recent merged PRs, and commit subjects. Record the exact title/body/test conventions used by maintainers.
- Prove isolation. Compare the merge-base range, list changed files and commits, and group by behavior. Remove or report unrelated files, secrets, generated artifacts, debug output, and changes already on the base branch.
- Validate the branch. Run the target repo's documented formatter, lint, build, tests, and any contribution-specific check. Capture command, exit status, and relevant result. A red check remains red in the draft.
- Analyze commits. Recommend a single commit for a diff under 50 lines and four files; otherwise follow commit-split-advisor.md. Suggestions name ordered file groups and keep every commit buildable. Do not rewrite.
- Draft the PR. Write
.agents/pr-prep/YYYY-MM-DD-<slug>.mdwith proposed title, upstream/base, linked issue, concise why/what summary, change list, test plan containing only executed evidence, compatibility/rollback notes, and reviewer-relevant risks. Follow the upstream template exactly. - Checkpoint — mandatory user review. Show the title, body, base, remote, branch, validation results, and any red/untested checks. Ask for approval or revision and wait. Silence, a request to "prepare", or prior push authority is not approval to create this PR.
- Submit only after approval. Recheck the diff and validation if HEAD moved,
then run
gh pr create --title <approved-title> --body-file <approved-file> --base <approved-base>. Report the resulting URL and do not mutate the PR further unless asked.
PR Body Shape
## Summary
<what changed and why; 1-3 sentences>
## Changes
- <reviewable behavior or implementation point>
## Test plan
- [x] `<command>` — <result>
- [ ] <not run> — <reason>
Fixes #<issue>
Use checked boxes only for executed PASS evidence. Keep failed or skipped checks visible. Put closing keywords at the end when upstream policy permits them.
Output Specification
- Artifact directory:
.agents/pr-prep/for the local review draft and.agents/research/for optional upstream research; the current git branch is the code artifact. - Filename convention:
YYYY-MM-DD-<contribution-slug>.md; never overwrite an unrelated draft. - Serialization/schema format: Markdown following the upstream PR template, with title, remote/base, summary, changes, test plan, risks, and issue linkage.
- Validator command: run
bash skills/pr-prep/scripts/validate.sh, the target repository's documented checks,git diff --check, and a secret scan appropriate to the repo before requesting approval. - Downstream handoff: consumed first by the user's review and, only after
explicit approval, by
gh pr create --body-fileand the upstream maintainer.
Quality Rubric
- Convention-matched: title, template, commit shape, and checks follow upstream.
- Isolated: every changed file serves one contribution story.
- Evidence-bound: the test plan distinguishes passed, failed, and unrun checks.
- Reviewable: rationale, behavior, risks, and compatibility are concise and clear.
- Safe: no secrets, unrelated changes, destructive rewrite, or implicit submit.
- Reproducible: the exact branch range, commands, base, remote, and draft path are named.
Examples
User says: "Prepare this branch for an upstream PR."
Inspect upstream rules and prior work, validate the branch, write the local PR draft, and stop at the review checkpoint.
User says: "Submit the PR using the draft I just approved."
Verify the draft and HEAD still match the approved state, then create exactly that PR and report its URL.
Troubleshooting
| Problem | Response |
|---|---|
| Competing PR exists | Show overlap and stop for user direction |
| Branch mixes themes | Suggest split groups; do not rewrite without authorization |
| Required check fails | Keep it red in the draft and do not imply readiness |
| Upstream template is absent | Infer from recent merged PRs and label the assumption |
| HEAD changed after approval | Regenerate evidence and request approval again |
References
- pr-prep.feature — executable behavior contract
- commit-split-advisor.md — buildable commit grouping
- case-study-historical-context.md — historical contribution context
- lessons-learned.md — reusable preparation lessons
- package-extraction.md — package extraction guidance
FAQ
What does the pr-prep skill do?
Prepare PR commits and body. Triggers: "pr-prep", "pr prep", "prepare pr commits and body.".
How do I install pr-prep?
Run npx skills add https://github.com/boshu2/agentops --skill pr-prep in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pr-prep/ (personal) or .claude/skills/pr-prep/ (project).
Which AI agents can use pr-prep?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pr-prep safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pr-prep?
It is published by boshu2 in boshu2/agentops. It has 1,115 recorded installs.
More from boshu2/agentops
council
boshu2/agentops
Compare independent opinions from several models or contexts without inflating agreement. Use when: wanting a second opinion or debate, or summarizing several reviewers' results.
doc
boshu2/agentops
Write source-checked docs, READMEs, change descriptions and handoffs. Use when: documenting a change, leaving or resuming a handoff, or drafting a questionnaire for someone else.
research
boshu2/agentops
Answer one cited question on code, history, claims or patterns. Use when: asked how it works, why it changed, if a claim or done/shipped report holds, or a pattern warrants a rule.
plan
boshu2/agentops
Shape a request into one end-to-end slice with observable behavior; review write scope and reversible decisions. Use when: planning, breaking down or scoping a change.
swarm
boshu2/agentops
Dispatch explicit disjoint packets exactly once through a caller-selected executor. Triggers: "swarm", "dispatch disjoint packets", "parallel explicit tasks".
rpi
boshu2/agentops
Drive one accepted change through implementation and checks to done, with one fresh review only where a mistake is costly. Use when: asked to run or orchestrate work through RPI.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.