
Pr Validate
Run a submission-readiness check on a PR branch for isolation, upstream alignment, scope, and quality gates before opening upstream.
Overview
Pr-validate is an agent skill for the Ship phase that checks a PR branch for isolation, upstream alignment, scope containment, and quality gates before submission.
Install
npx skills add https://github.com/boshu2/agentops --skill pr-validateWhat is this skill?
- Executable Gherkin-style spec: isolation, upstream alignment, scope containment, and quality gates
- Scope creep on the branch flags scope-containment failure as not-ready
- Any failing quality gate blocks submission-ready status
- Produces a structured PR validation report (result.json contract in agentops hexagon)
- Shipped with shell validation script patterns (grep-based skill checks in repo)
- 4 readiness dimensions: isolation, upstream alignment, scope containment, quality gates
- 3 documented Gherkin scenarios in the executable spec excerpt
Adoption & trust: 725 installs on skills.sh; 384 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are about to open a PR but are unsure whether the branch is focused, aligned with upstream, and passing the gates maintainers expect.
Who is it for?
Solo contributors and agentops users who want a deterministic pre-flight PR checklist tied to upstream open-source workflows.
Skip if: Greenfield coding without a PR branch, or teams that only need local lint without git isolation and upstream alignment checks.
When should I use this skill?
Before submitting or refreshing an upstream PR when you need /pr-validate to verify branch isolation, alignment, scope, and quality gates.
What do I get? / Deliverables
After /pr-validate runs, you get a PR validation report that clearly states submission-ready or not-ready with scope and quality gate failures called out.
- PR validation report with submission-ready or not-ready outcome
- Machine-readable result.json for downstream agentops validation consumers
Recommended Skills
Journey fit
Ship review is where contribution hygiene is verified so only focused, gate-passing branches reach maintainers. Review subphase matches the driving-adapter role: consume validation signals and emit a PR validation report with ready/not-ready status.
How it compares
Use instead of manual git diff review when you need explicit scope-containment and quality-gate readiness semantics in one report.
Common Questions / FAQ
Who is pr-validate for?
Indie and solo developers preparing upstream PRs who already use agentops-style validation adapters and want a /pr-validate command before submit.
When should I use pr-validate?
In Ship review immediately before opening or updating an upstream PR, after your branch is feature-complete but before maintainers see it.
Is pr-validate safe to install?
It runs git and validation checks on your branch; review the Security Audits panel on this Prism page before granting shell and repository access.
SKILL.md
READMESKILL.md - Pr Validate
# Executable spec for the /pr-validate skill — PR submission-readiness (driving-adapter). # /pr-validate checks that a PR branch is clean, focused, and ready to submit: isolation, # upstream alignment, scope containment, and quality gates. Hexagon: driving-adapter; consumes # validation; produces result.json; customer-of validation. (soc-qk4b) Feature: PR-validate checks a PR branch is submission-ready As the pre-submission PR check I want a branch verified for isolation, upstream alignment, scope, and quality So that only clean, focused PRs reach the upstream Scenario: a PR branch is validated across the readiness dimensions When /pr-validate runs on a branch Then it checks isolation, upstream alignment, scope containment, and quality gates And it produces a PR validation report Scenario: scope creep is flagged When the branch contains changes outside the contribution's scope Then /pr-validate flags the scope-containment failure as not-ready Scenario: a failing quality gate blocks readiness When a quality gate fails on the branch Then /pr-validate reports the branch as not submission-ready #!/bin/bash # Validate pr-validate skill set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SKILL_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" ERRORS=0 CHECKS=0 check_pattern() { local desc="$1" local file="$2" local pattern="$3" CHECKS=$((CHECKS + 1)) if grep -qiE "$pattern" "$file" 2>/dev/null; then echo "✓ $desc" else echo "✗ $desc (pattern '$pattern' not found in $file)" ERRORS=$((ERRORS + 1)) fi } echo "=== PR Validate Skill Validation ===" echo "" check_pattern "SKILL.md checks upstream alignment" "$SKILL_DIR/SKILL.md" "[Uu]pstream[[:space:]]+[Aa]lignment" check_pattern "SKILL.md checks isolation" "$SKILL_DIR/SKILL.md" "[Ii]solation[[:space:]]+[Cc]heck" check_pattern "SKILL.md checks scope creep" "$SKILL_DIR/SKILL.md" "[Ss]cope[[:space:]]+[Cc]heck|scope creep" check_pattern "SKILL.md has Examples section" "$SKILL_DIR/SKILL.md" "^## Examples" check_pattern "SKILL.md has Troubleshooting section" "$SKILL_DIR/SKILL.md" "^## Troubleshooting" echo "" echo "=== Results ===" echo "Checks: $CHECKS" echo "Errors: $ERRORS" if [ $ERRORS -gt 0 ]; then echo "" echo "FAIL: pr-validate skill validation failed" exit 1 else echo "" echo "PASS: pr-validate skill validation passed" exit 0 fi --- name: pr-validate description: Validate PR scope and quality. practices: - continuous-integration - code-complete - pragmatic-programmer hexagonal_role: driving-adapter consumes: - validation produces: - result.json context_rel: - kind: customer-of with: validation skill_api_version: 1 context: window: fork intent: mode: task sections: exclude: - HISTORY intel_scope: topic license: MIT compatibility: Requires git, gh CLI metadata: author: AI Platform Team version: 1.0.0 tier: contribute internal: false allowed-tools: Read, Bash, Grep, Glob output_contract: 'stdout: PR validation report' --- # 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 # Fetc