validate-pr

A command that checks comments made by an AI during a GitHub pull-request review. It accepts a pull-request number or URL and uses GitHub's command-line tool to inspect the change and its comments.

In plain words
What is it for?
Checking whether AI comments accurately describe the changed files, code, and pull request.
Why use it?
It helps find review comments based on incorrect assumptions or details the AI made up.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/arraydude/agent-skills/validate-pr
Clone the repo
git clone --depth 1 https://github.com/arraydude/agent-skills

Made for: Claude Code.

Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.00909
Opus 5 $0.00010 $0.00454
Sonnet 5 $0.00004 $0.00182
Haiku 4.5 $0.00002 $0.00091

Measured yesterday against content hash a048b2ef7db7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

validate-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/validate-pr.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Goal: Validate AI PR comments on the current branch.

PR URL: $ARGUMENTS

Prerequisites

  1. Check if GH CLI is installed:
    • Run which gh to verify the GitHub CLI is available
    • If not installed, stop and ask the user to install it:
      • macOS: brew install gh
      • Then authenticate: gh auth login

Input Validation

  1. Validate PR argument:
    • If $ARGUMENTS is empty or missing, display this error and stop:
      Error: Please provide a PR number or URL.
      
      Usage: /validate-pr <PR_NUMBER_OR_URL>
      
      Examples:
        /validate-pr 123
        /validate-pr https://github.com/owner/repo/pull/123
      
    • Accept either:
      • PR number (e.g., 123)
      • Full PR URL (e.g., https://github.com/owner/repo/pull/123)
    • Extract the PR number from the URL if a full URL is provided

Instructions

  1. Fetch PR information using GH CLI:

    • Extract the PR number from the provided URL
    • Run gh pr view <PR_NUMBER> --json comments,reviews,body,title,files to get all PR data
    • List all comments and review comments on the PR
  2. Think critically about each comment:

    • AI-generated comments may contain hallucinations or incorrect assumptions
    • For each comment, verify:
      • Is the referenced code/file actually present in the PR diff?
      • Is the assumption or concern actually valid?
      • Does the suggested fix make sense in context?
  3. Cross-reference with actual code:

    • Use gh pr diff <PR_NUMBER> to see the actual changes
    • Read the relevant files to understand the full context
    • Check if the AI comment misunderstood the code intent
  4. Evaluate if issues are worth addressing:

    • Even if an assumption is technically true, assess:
      • Is it a real problem or a theoretical edge case?
      • Does fixing it add value or just noise?
      • Is it aligned with project patterns and conventions?
  5. Double-check for missed comments:

    • PRs often have many comments - make sure you reviewed ALL of them
    • Check both general PR comments and inline review comments
    • Use gh api repos/<owner>/<repo>/pulls/<pr_number>/comments if needed for complete coverage

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 101 lines · 19 tokens per session scan A a048b2ef7db7

Subscribe to this mod's changes

validate-pr is a command published in the GitHub repository arraydude/agent-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 909 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.