pr-validatelisted
Install: claude install-skill boshu2/agentops
# PR Validate Skill
PR-specific validation that ensures changes are clean, focused, and ready.
## Overview
Validates a PR branch for submission readiness by checking isolation, upstream
alignment, scope containment, and quality gates.
**Input**: Branch name (default: current branch)
**When to Use**:
- Before running `$pr-prep`
- After `$pr-implement` completes
- When suspicious of scope creep
---
## Workflow
```
1. Branch Discovery -> Identify branch and upstream
2. Upstream Alignment -> FIRST: Check rebase status (BLOCKING)
3. CONTRIBUTING.md -> Verify compliance (BLOCKING)
4. Isolation Check -> Single type, thematic files
5. Scope Check -> Verify changes match intended scope
6. Quality Gate -> Tests, linting (non-blocking)
7. Report Generation -> Summary with pass/fail
```
---
## Phase 2: Upstream Alignment (BLOCKING - CHECK FIRST)
```bash
# Fetch latest upstream
git fetch origin main
# How many commits behind?
BEHIND=$(git rev-list --count HEAD..origin/main)
echo "Behind upstream: $BEHIND commits"
```
| Check | Pass Criteria |
|-------|---------------|
| Minimal divergence | < 20 commits behind |
| No conflicts | Merge/rebase would succeed |
---
## Phase 4: Isolation Check (BLOCKING)
```bash
# Commit type analysis
git log --oneline main..HEAD | sed 's/^[^ ]* //' | grep -oE '^[a-z]+(\([^)]+\))?:' | sort -u
# File theme analysis
git diff --name-only main..HEAD | cut -d'/' -f1-2 | sort -u
```
| Check | Pass Criteria