pr-prep

boshu2/agentops · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/boshu2/agentops --skill pr-prep
0 commentsdiscussion
summary

Systematic PR preparation that validates tests and generates high-quality PR bodies.

skill.md

PR Preparation Skill

Systematic PR preparation that validates tests and generates high-quality PR bodies.

Overview

Prepares contributions by analyzing the target repo's conventions, git history, test coverage, and generating properly-formatted PR bodies.

When to Use:

  • Preparing a PR for an external repository
  • Contributing bug fixes or features

When NOT to Use:

  • Internal commits (use normal git workflow)
  • PRs to your own repositories

Workflow

-1. Prior Work Check     -> BLOCKING: Final check for competing PRs
0.  Isolation Check      -> BLOCK if PR mixes unrelated changes
1.  Context Discovery    -> Understand target repo conventions
2.  Git Archaeology      -> Analyze commit patterns, PR history
3.  Pre-Flight Checks    -> Run tests, linting, build
4.  Change Analysis      -> Summarize what changed and why
4.5 Commit Split Advisor -> Suggest logical commit groups (manual)
5.  PR Body Generation   -> Create structured PR description
6.  USER REVIEW GATE     -> STOP. User must approve before submission.
7.  Submission           -> Only after explicit user approval

Phase 0: Isolation Check (BLOCKING)

CRITICAL: Run this FIRST. Do not proceed if PR mixes unrelated changes.

Commit Type Analysis

# Extract commit type prefixes from branch
git log --oneline main..HEAD | sed 's/^[^ ]* //' | grep -oE '^[a-z]+(\([^)]+\))?:' | sort -u

Rule: If more than one commit type prefix exists, the PR is mixing concerns.

File Theme Analysis

# List all files changed vs main
git diff --name-only main..HEAD

# Group by directory
git diff --name-only main..HEAD | cut -d'/' -f1-2 | sort -u

Isolation Checklist

Check Pass Criteria
Single commit type All commits share same prefix
Thematic files All changed files relate to PR scope
No main overlap Changes not already merged
Atomic scope Can explain in one sentence

DO NOT PROCEED IF ISOLATION CHECK FAILS.


CRITICAL: User Review Gate

NEVER submit a PR without explicit user approval.

After generating the PR body (Phase 5), ALWAYS:

  1. Write the PR body to a file for review
  2. Show the user what will be submitted
  3. STOP and ask: "Ready to submit? Review the PR body above."
  4. Wait for explicit approval before running gh pr create
# Write PR body to file
cat > /tmp/pr-body.md << 'EOF'
<generated PR body>
EOF

# Show user
cat /tmp/pr-body.md

# ASK - do not proceed without answer
echo "Review complete. Submit this PR? [y/N]"

Phase 3: Pre-Flight Checks

# Go projects
go build ./...
go vet ./...
go test ./... -v -count=1

# Node projects
npm run build
npm test

# Python projects
pytest -v

Pre-Flight Checklist

  • Code compiles without errors
  • All tests pass
  • No new linting warnings
  • No secrets or credentials in code

Phase 4.5: Commit Split Analysis (Suggestion-Only)

Analyze the branch diff and suggest logical commit groupings.

# Review the scope of changes
git diff --stat main..HEAD

Output a numbered list of suggested commits with file groups:

Commit 1: [description] -- files: path/a.go, path/a_test.go
Commit 2: [description] -- files: path/b.go, path/c.go

Ordering: Infrastructure/migrations > Models/services > Controllers/views > Tests > VERSION/CHANGELOG. Each commit must be independently valid (no broken imports). If diff is < 50 lines across < 4 files, recommend a single commit.

See references/commit-split-advisor.md for full rules.

These are suggestions only. User reads and implements manually.


Phase 5: PR Body Generation

Standard Format

## Summary

Brief description of WHAT changed and WHY. 1-3 sentences.
Start with action verb (Add, Fix, Update, Refactor).

## Changes

Technical details of what was modified.

## Test plan

- [x] `go build ./...` passes
- [x] `go test ./...` passes
- [x] Manual: <specific scenario tested>

Fixes #NNN

Key conventions:

  • Test plan items are checked [x] (you ran them before PR)
  • Fixes #NNN goes at the end

Phase 7: Submission (After Approval Only)

# Create PR with reviewed body
gh pr create --title "type(scope): brief description" \
  --body "$(cat /tmp/pr-body.md)" \
  --base main

Remember: This command should ONLY run after user explicitly approves.


Anti-Patterns

DON'T DO INSTEAD
Submit without approval ALWAYS stop for user review
Skip isolation check Run Phase 0 FIRST
Bundle lint fixes into feature PRs Lint fixes get their own PR
Giant PRs Split into logical chunks
Vague PR body Detailed summary with context
Skip pre-flight Always run tests locally

Examples

Prepare External PR Body

User says: "Prepare this branch for PR submission."

What happens:

  1. Run isolation and pre-flight validation.
  2. Build structured PR body with summary and test plan.
  3. Pause for mandatory user review before submit.

Evidence-First PR Packaging

User says: "Generate a high-quality PR description with clear verification steps."

What happens:

  1. Gather git archaeology and test evidence.
  2. Synthesize concise rationale and change list.
  3. Produce submit-ready body pending approval.

Troubleshooting

Problem Cause Solution
PR body is weak Missing context from commits/tests Re-run evidence collection and expand summary
Submission blocked Mandatory review gate not passed Get explicit user approval before gh pr create
Test plan incomplete Commands/results not captured Add executed checks and outcomes explicitly
Title/body mismatch Scope drift during edits Regenerate from latest branch diff and constraints

Reference Documents

how to use pr-prep

How to use pr-prep on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add pr-prep
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/boshu2/agentops --skill pr-prep

The skills CLI fetches pr-prep from GitHub repository boshu2/agentops and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/pr-prep

Reload or restart Cursor to activate pr-prep. Access the skill through slash commands (e.g., /pr-prep) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.467 reviews
  • Advait Liu· Dec 28, 2024

    Useful defaults in pr-prep — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Luis Brown· Dec 28, 2024

    Solid pick for teams standardizing on skills: pr-prep is focused, and the summary matches what you get after install.

  • Chen Yang· Dec 24, 2024

    pr-prep is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Shikha Mishra· Dec 8, 2024

    Registry listing for pr-prep matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Diego Singh· Dec 4, 2024

    pr-prep has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Yash Thakker· Nov 27, 2024

    Solid pick for teams standardizing on skills: pr-prep is focused, and the summary matches what you get after install.

  • Diego Smith· Nov 23, 2024

    Keeps context tight: pr-prep is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Noah Ghosh· Nov 19, 2024

    I recommend pr-prep for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Yusuf Park· Nov 19, 2024

    Registry listing for pr-prep matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Dhruvi Jain· Oct 18, 2024

    I recommend pr-prep for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 67

1 / 7