Agent skill

Validate PR

by athola in athola/claude-night-market

Generates and self-executes a diff-derived test plan for a PR.

MITAuto-check passedTesting & QA

Install Validate PR

skills CLI
$ npx skills add athola/claude-night-market --skill validate-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market validate-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/sanctum/skills/validate-pr .claude/skills/validate-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
validate-pr
GitHub stars
342
Token cost
~2.2k tokens
SKILL.md length
703 words
Files
1
Skills in repo
159
Repo updated
First seen
Licence
MIT

At a glance

Generates and self-executes a diff-derived test plan for a PR.

  • Works in 6 steps: Fetch Diff and Detect Areas → Generate and Execute Steps per Area → Revert-Test Quality Check → …
  • Validating PR changes before merge
  • SKILL.md covers When To Use, When NOT To Use, Algorithm and Step 1: Fetch Diff and Detect…, plus 7 more sections
  • Calls rg, cargo and uv

What it does

Validate PR is an agent skill from athola/claude-night-market. Generates and self-executes a diff-derived test plan for a PR. Use when validating PR changes before merge. Do not use for code review; use sanctum:pr-review.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test generation and Pull requests. It works with Rust and Python. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Validating PR changes before merge
  • Use sanctum:pr-review

Example prompts

  • “Use the validate-pr skill to generate and self-executes a diff-derived test plan for a PR”
  • “/validate-pr”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Fetch Diff and Detect Areas
  2. Generate and Execute Steps per Area
  3. Revert-Test Quality Check
  4. Final Full-Suite Run
  5. Produce Summary Table
  6. Posting (--post flag only)

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg
    • cargo
    • uv
    • gh
    • python3
    • make
    • shellcheck
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Validate PR loads about 2.2k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 703 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 703 words, ~2,227 tokens.

Download SKILL.mdSave it as .claude/skills/validate-pr/SKILL.md (or your agent's skills folder).
name
validate-pr
description
Generates and self-executes a diff-derived test plan for a PR. Use when validating PR changes before merge. Do not use for code review; use sanctum:pr-review.
alwaysApply
false
category
validation
tags
pr, validation, test-plan, diff, revert-test, evidence
usage_patterns
diff-derived-test-plan, revert-test-quality-check, evidence-capture
complexity
intermediate
model_hint
standard
estimated_tokens
650
progressive_loading
false
dependencies
leyline:git-platform, imbue:proof-of-work
role
entrypoint

validate-pr: Diff-Derived Test Plan

Generate and self-execute a validation plan matched to what actually changed in a PR. Replaces generic "tests pass" with area-targeted evidence and revert-test quality checks that prove tests catch regressions.

When To Use

  • End of /fix-pr Step 5 (Validate), before Step 6 (Complete)
  • Standalone after any PR fix, to generate targeted validation evidence
  • When you need proof that revert-tests are genuine guards

When NOT To Use

  • --scope minor with only formatting or doc changes (no logic changed)
  • No diff available (clean branch, nothing changed)
  • --skip-validate passed to /fix-pr

Algorithm

fetch diff -> group by area -> generate steps -> execute -> revert-test -> table

Step 1: Fetch Diff and Detect Areas

bash
# Get changed file list from the PR
PR_NUMBER=<number from invocation or current branch>
CHANGED=$(gh pr diff "$PR_NUMBER" --name-only)
# Fallback when no PR number:
# CHANGED=$(git diff "origin/$(git rev-parse --abbrev-ref HEAD@{upstream})...HEAD" \
#   --name-only 2>/dev/null)

Group changed files into areas using ripgrep (grep if rg unavailable):

bash
RUST_FILES=$(echo "$CHANGED"  | rg '\.rs$|Cargo\.(toml|lock)$' || true)
PY_FILES=$(echo "$CHANGED"    | rg '\.py$|pyproject\.toml$|requirements.*\.txt$' || true)
SH_FILES=$(echo "$CHANGED"    | rg '\.sh$|\.githooks' || true)
GRAMMAR_FILES=$(echo "$CHANGED" | rg '\.(lark|peg|g4)$' || true)

Area routing table:

AreaFile patternsVerification type
Rust*.rs, Cargo.toml, Cargo.lockcargo build + per-crate test
Python*.py, pyproject.tomlpytest per changed module
Shell*.sh, .githooks/*shellcheck
Grammar*.lark, *.peg, *.g4language-specific lint
Build/config*.yaml, *.json, *.tomlparse check

Step 2: Generate and Execute Steps per Area

For each non-empty area, generate and run at least one verification step. Assign [E1], [E2], ... labels to each captured output.

Rust
bash
# Build with default features
cargo build --workspace 2>&1
# Evidence: [En] → "0 errors, 0 warnings"

# Build with --all-features
cargo build --workspace --all-features 2>&1
# Evidence: [En+1]

# Per-crate test for each changed crate
# Extract crate directory from changed path, e.g. crates/token-types/src/lib.rs
CHANGED_CRATES=$(echo "$RUST_FILES" \
  | rg -o '(?:crates|src)/[^/]+' \
  | sort -u \
  | xargs -I{} basename {})
for CRATE in $CHANGED_CRATES; do
  cargo test -p "$CRATE" 2>&1
done
Python
bash
# Targeted test per changed module
for PY_FILE in $PY_FILES; do
  MODULE=$(basename "${PY_FILE%.py}")
  TEST_FILE="tests/test_${MODULE}.py"
  if [[ -f "$TEST_FILE" ]]; then
    uv run pytest "$TEST_FILE" -v 2>&1
  fi
done

# Or project-specific runner if Makefile target exists
make test 2>&1 || uv run pytest tests/ -v 2>&1
Shell
bash
for SH_FILE in $SH_FILES; do
  [[ -f "$SH_FILE" ]] && shellcheck "$SH_FILE" 2>&1
done
Build/config parse check
bash
# YAML files
for YML in $(echo "$CHANGED" | rg '\.ya?ml$' || true); do
  [[ -f "$YML" ]] && python3 -c "import yaml; yaml.safe_load(open('$YML'))" \
    && echo "PASS: $YML" || echo "FAIL: $YML"
done

# JSON files
for JSON_F in $(echo "$CHANGED" | rg '\.json$' || true); do
  [[ -f "$JSON_F" ]] && python3 -m json.tool "$JSON_F" > /dev/null \
    && echo "PASS: $JSON_F" || echo "FAIL: $JSON_F"
done

Step 3: Revert-Test Quality Check

Prove at least one test is a genuine guard, not a dead assertion.

Safety: abort if the working tree has uncommitted changes.

bash
if ! git diff --exit-code > /dev/null 2>&1; then
  echo "[RT] SKIP: working tree dirty: revert-test unsafe"
  # Mark INCONCLUSIVE and continue
fi

Algorithm (one representative fix):

  1. From the changed source files, find one that has a corresponding test.
    • Rust: a #[test] in the same crate that exercises a changed function.
    • Python: tests/test_<module>.py for a changed <module>.py.
    • Shell: a test harness that invokes the changed script.
  2. Identify the specific changed line or block from the diff.
  3. Edit that line to revert the fix to its broken state.
  4. Run the targeted test: confirm it FAILS with exit code 1 specifically. A pytest usage error (4) or an empty collection (5) is also non-zero, so a harness that only checks "not zero" reports a dead assertion as a genuine guard.
  5. Restore: git checkout -- <file> (git-based restore, safe on interrupt).
  6. Run the targeted test again: confirm it PASSES.
  7. If any step cannot complete, mark INCONCLUSIVE with the reason.

Revert-test output format:

[RT-1] Target: <file>:<line>: <description of fix>
[RT-2] Broke fix: <edit description>
[RT-3] Ran: <test command> → <test name> FAILED (expected)
[RT-4] Restored: git checkout -- <file>
[RT-5] Ran: <test command> → <test name> PASSED
Result: PASS: test is a genuine guard

Reverting a test that guards document content:

Content tests assert on prose, and this repo wraps prose at 80 columns, so any anchor phrase long enough to be meaningful eventually straddles a line break. Collapse whitespace before matching. Otherwise a pure reflow turns the test red and tempts an author to "fix" it by unwrapping the line.

Normalizing reintroduces the hazard the revert test exists to catch: a rejoined anchor can also appear elsewhere in the file, so deleting the paragraph the test guards leaves it green. Anchor on a full clause that is unique to that paragraph, then delete the paragraph and confirm the test goes red. A DDD paradigm test passed its revert check this way in PR #612 while guarding nothing.

When no covering test exists:

Revert-test: INCONCLUSIVE: no covering test for <changed area>
Recommendation: add a test for <changed function or behaviour>
Show full SKILL.md (221 more words)Show less

Step 4: Final Full-Suite Run

After all area checks and the revert-test:

bash
# Rust workspace
cargo test --workspace 2>&1

# Python project
uv run pytest tests/ -v 2>&1

# Mixed project: run both
cargo test --workspace 2>&1 && uv run pytest tests/ -v 2>&1

Capture full output as final evidence [En].

Step 5: Produce Summary Table

markdown
### validate-pr: <PR title or number>

| 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 |
| Rust: token-types | cargo build --all-features | [E3] 0 errors | PASS |
| Shell: hooks/pre-commit | shellcheck | [E4] 0 issues | PASS |
| Revert-test: lib.rs:45 | break/fail/restore | [RT-1..5] genuine guard | PASS |
| Final: cargo test --workspace | full suite | [E5] 694 passed, 0 failed | PASS |

**Totals**: 6 steps: 6 PASS, 0 FAIL, 0 INCONCLUSIVE

Step 6: Posting (--post flag only)

When --post is given, post the summary table as a PR comment:

bash
gh pr comment "$PR_NUMBER" --body "$(cat /tmp/validate-pr-summary.md)"

Skip posting when invoked from /fix-pr: results feed into the Gate 3 summary comment instead.

Failure Behaviour

When any step produces FAIL:

  • Surface the failures in the summary table with the evidence reference.
  • When called from /fix-pr: halt before Step 6 (Complete). The user must fix the failures or pass --skip-validate to /fix-pr to bypass.
  • When called standalone: report failures and exit with non-zero status.

INCONCLUSIVE results are reported but do not halt the workflow.

Exit Criteria

  • gh pr diff --name-only returned a non-empty file list (diff fetched)
  • Every detected area has at least one row in the summary table
  • Every row shows an Evidence reference ([E1], [E2], etc.) with the actual command output, not fabricated
  • Revert-test attempted for at least one area with a covering test, or documented as INCONCLUSIVE with reason
  • Final full-suite run appears in the summary table
  • Summary table is present with columns: Area, Step, Evidence, Result
  • Any FAIL result halts /fix-pr before Step 6 when called from fix-pr
  • Working tree is clean after skill completes (git checkout restore confirmed successful for any revert-test mutation)

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/sanctum/skills/validate-pr of athola/claude-night-market.

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Validate PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Validate PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Validate PR this skillathola/claude-night-market342—~2.2kAutomated safety check: PassMIT
Maintainopenwpm/OpenWPM1.4k—~1.5kAutomated safety check: PassCustom licence
Find Untested Sourcesdotnet/skills5.6k1 repos~3.3kAutomated safety check: PassMIT
Review Pre Commitopenwpm/OpenWPM1.4k—~788Automated safety check: PassCustom licence
Testing Strategiesancoleman/ai-design-components526—~3.8kAutomated safety check: PassMIT
Polyglot Test Agentboshi-xixixi/TraeSkill275—~1.7kAutomated safety check: PassMIT

Similar skills

  • Maintain

    openwpm/OpenWPM

    A skill your agent uses to run a periodic codebase-health pass — dependency audit, lint, test suite, dead code / TODO scan, doc freshness, crosslink issue hygiene, and build artifacts.

    1.4k GitHub stars~1.5k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Review Pre Commit

    openwpm/OpenWPM

    Use as a pre-commit quality gate — review the working diff for stub patterns (TODO/FIXME/unimplemented!()/todo!()), debug leftovers (dbg!, stray console.log/println!, commented-out code), then run…

    1.4k GitHub stars~788 tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Testing Strategies

    ancoleman/ai-design-components

    Strategic guidance for choosing and implementing testing approaches across the test pyramid.

    526 GitHub stars~3.8k tokensUpdated 10 mo ago
    Testing & QAAuto-check passed
  • Polyglot Test Agent

    boshi-xixixi/TraeSkill

    Generates comprehensive, workable unit tests for any programming language using a multi-agent pipeline.

    275 GitHub stars~1.7k tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Coding Agent

    mastra-ai/mastra

    Authoring playbook for building agents that write, edit, review, or refactor code.

    29k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed

More from athola/claude-night-market

All 159 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    342 GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    342 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    342 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    342 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    342 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    342 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Validate PR

What does Validate PR do?

Generates and self-executes a diff-derived test plan for a PR. Validate PR is an agent skill from athola/claude-night-market. Generates and self-executes a diff-derived test plan for a PR.

When should I use Validate PR?

Validate PR fits situations like: validating PR changes before merge; use sanctum:pr-review.

How do I install Validate PR in Claude Code?

Run `npx skills add athola/claude-night-market --skill validate-pr -a claude-code`. Or copy the skill folder (plugins/sanctum/skills/validate-pr in athola/claude-night-market) into .claude/skills/validate-pr in your project. Claude Code loads it when a task matches its description.

How do I install Validate PR in Codex?

Run `npx skills add athola/claude-night-market --skill validate-pr -a codex`. Or copy the skill folder (plugins/sanctum/skills/validate-pr in athola/claude-night-market) into .agents/skills/validate-pr in your project. Codex loads it when a task matches its description.

Can I use Validate PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill validate-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/validate-pr, .gemini/skills/validate-pr, .github/skills/validate-pr and .opencode/skills/validate-pr in your project.

What does Validate PR need to run?

Going by SKILL.md and its folder, Validate PR needs the command-line tools its instructions call (rg, cargo, uv, gh, python3 and make). Our summary lists: Python 3.

Does Validate PR access the network?

SKILL.md contains no URLs. Its commands use uv, gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Validate PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Validate PR use?

Validate PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Validate PR use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Validate PR?

Skills that share tags, products or a category with Validate PR: Maintain (openwpm/OpenWPM, 1.4k stars), Find Untested Sources (dotnet/skills, 5.6k stars), Review Pre Commit (openwpm/OpenWPM, 1.4k stars) and Testing Strategies (ancoleman/ai-design-components, 526 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Validate PR?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 342 GitHub stars. The repository holds 159 skills in this directory. The repository was last updated on October 6, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.