Skip to content
Development
Command

/validate-pr

Generate and self-execute a diff-derived test plan for a PR. Reads

From plugin
claude-night-market
325163 skills59 agents163 commands1 MCP
Install
$ npx -y skills add athola/claude-night-market --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/validate-pr

Context preview

What this command does when you run it.

Generate and self-execute a diff-derived test plan for a PR. Reads

Command definition

validate-pr.md
name: validate-pr
description: Generate and self-execute a diff-derived test plan for a PR. Reads
  the diff, groups changes by area, runs targeted verifications, proves
  revert-tests are genuine guards, and reports a structured summary table.
usage: /sanctum:validate-pr [<pr-number> | <pr-url>] [--post] [--revert-tests <N>]

validate-pr

Generate and self-execute a step-by-step validation plan matched to what actually changed in a PR. Bridges the gap between "tests pass" and "the fix does what it claims."

When To Use

  • Standalone after any PR fix, to produce targeted validation evidence
  • Called automatically by `/fix-pr` at the end of Step 5 (Validate)
  • When you need proof that revert-tests catch regressions

When NOT To Use

  • `--scope minor` in `/fix-pr` with only formatting or doc changes
  • No diff available (clean branch, nothing changed)
  • Pass `--skip-validate` to `/fix-pr` to bypass

Options

| Option | Description | |--------|-------------| | `<pr-number>` | Target PR number (default: current branch PR) | | `<pr-url>` | Full GitHub or GitLab URL to the PR | | `--post` | Post the summary table as a PR comment | | `--revert-tests <N>` | Number of revert-test quality checks to run (default: 1) |

Quick Reference

# Run on current branch PR
/sanctum:validate-pr

# Run on a specific PR
/sanctum:validate-pr 123

# Run and post results as a PR comment
/sanctum:validate-pr 123 --post

# Run with two revert-test checks
/sanctum:validate-pr 123 --revert-tests 2

Workflow

See `Skill(sanctum:validate-pr)` for the full algorithm:

1. Fetch the PR diff and group changed files by area (Rust, Python, Shell, grammar, build/config) 2. Generate at least one verification step per area 3. Execute each step, capture output as evidence (`[E1]`, `[E2]`, ...) 4. Run a revert-test quality check: break a representative fix, confirm the corresponding test fails, restore via `git checkout -- <file>` 5. Run the final full-suite test (cargo test --workspace or uv run pytest) 6. Produce a summary table: Area | Step | Evidence | Result 7. If `--post`: post the table as a PR comment

Failure Behaviour

If any step produces **FAIL**, the command reports all failures and exits with non-zero status. When called from `/fix-pr`, it halts before Step 6 (Complete / Gate 3). Pass `--skip-validate` to `/fix-pr` to bypass.

Output Format

### validate-pr: PR #123

| Area | Step | Evidence | Result |
|------|------|----------|--------|
| Rust: token-types | cargo build --workspace | [E1] 0 errors | PASS |
| Rust: token-types | cargo test -p token-types | [E2] 12 passed | PASS |
| Shell: hooks/pre-commit | shellcheck | [E3] 0 issues | PASS |
| Revert-test: lib.rs:45 | break/fail/restore | [RT-1..5] genuine guard | PASS |
| Final: cargo test --workspace | full suite | [E4] 694 passed | PASS |

**Totals**: 5 steps — 5 PASS, 0 FAIL, 0 INCONCLUSIVE

See Also

  • `Skill(sanctum:validate-pr)`: full algorithm and step details
  • `/fix-pr`: calls this skill automatically after Step 4 (Fix)
  • `Skill(imbue:proof-of-work)`: `[E1]`/`[E2]` evidence capture conventions
  • `Skill(leyline:git-platform)`: GitHub/GitLab CLI command mapping
Read more
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

Get the whole plugin, auto-invoked
Stats
325
Stars
0
Views
35
Forks
Active
Maintenance
Python
Language
MIT
License
1d ago
Last commit
8mo ago
Created

Repo: athola/claude-night-market