copperhead: Skill for Claude Code

.claude/skills/pr-review/SKILL.md

pr-review is a skill for Claude Code from copperheadhq/copperhead. It costs 44 tokens per session (2,604 once invoked), scanned A, original, Apache-2.0.

A procedure for reviewing a Copperhead pull request, which is a proposed set of code changes shared for review. It checks the changes against the repository’s rules and records findings as a GitHub comment when appropriate.

In plain words
What is it for?
Use it with a pull-request number or URL to inspect the proposed changes, report findings, and comment on an open non-draft pull request without approving or rejecting it.
Why use it?
It helps catch violations and problems before code is merged, while keeping the review separate from the developer’s current working files.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

This is copperheadhq/copperhead's own configuration. It tells Claude Code how to work on copperhead itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copperhead configures →

Reuse

Borrowing it

Nothing to install: this file belongs to copperheadhq/copperhead. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/copperheadhq/copperhead/main/.claude/skills/pr-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/copperheadhq/copperhead

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/copperheadhq/copperhead/pr-review.svg)](https://agentmods.dev/skills/copperheadhq/copperhead/pr-review)
Your own site
<a href="https://agentmods.dev/skills/copperheadhq/copperhead/pr-review"><img src="https://agentmods.dev/badge/skills/copperheadhq/copperhead/pr-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,604 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 33
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00044 $0.02604
Opus 5 $0.00022 $0.01302
Sonnet 5 $0.00009 $0.00521
Haiku 4.5 $0.00004 $0.00260

Measured 8d ago against content hash ded63d171455, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

pr-review 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 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/metrics.mjs, scripts/worktree.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/pr-review/SKILL.md · 62 lines

How it starts

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

Review a pull request for this repository. Present the findings report to the user, and also post it to the PR automatically as a comment (gh pr comment <n>) so the review is recorded on GitHub. Do NOT submit a formal review (gh pr review --approve / --request-changes) unless the user explicitly asks: those affect merge gating, whereas a plain comment does not.

Input: a PR number or URL. If omitted, run gh pr list --json number,title,author,headRefName and either auto-select the single open PR or use the AskUserQuestion tool to let the user pick. Always announce which PR is being reviewed. If the PR is a draft, still review it, but present the report in-session only and do not post the comment unless the user explicitly asked for a draft to be reviewed (draft comments go stale immediately).

Working-tree isolation (non-negotiable): the review runs in a throwaway git worktree, never in the user's checkout. Never run gh pr checkout, git checkout, git switch, git stash, git reset, or any other command that moves HEAD, the index, or a tracked file in the main checkout: the user may be mid-edit on an unrelated branch, and a review is read-only work. Everything the review needs (the PR's files, the suite, coverage) happens under the worktree path from step 0, and every file path in the report is written repo-relative (src/agent/loop.ts:42), never as a worktree path. If the worktree cannot be created, say so and fall back to a diff-only review with tests and coverage reported as "not measured"; do not fall back to checking the PR out in place.

Steps

  1. Set up the review worktree: node .claude/skills/pr-review/scripts/worktree.mjs setup <n>. It fetches refs/pull/<n>/head into a private ref (so fork PRs work and no branch moves), parks it detached under the OS temp dir, and symlinks node_modules from the main checkout so the suite can run without an install. Its last line is worktree: <path>: that path is <WT> below. If the script reports that the PR changes package-lock.json, re-run it with --install before trusting any suite result. Announce that the main checkout stays on its current branch. Details and failure modes: references/worktree.md.

  2. Gather the change

    • gh pr view <n> --json title,body,author,baseRefName,headRefName,files,additions,deletions,mergeable,isDraft,comments, plus gh pr checks <n> for CI state. A mergeable that is not MERGEABLE and a red or pending CI run each go in the metrics block, and a failing required check is at least a medium finding.
    • gh pr diff <n> for the full diff; for large PRs, read it per file. Skip generated and vendored files (package-lock.json, dist/, *.snap, build output): note that they changed, but do not read them line by line or raise findings inside them.
    • Read the PR's code under <WT> (that is the checkout that actually contains it). Read the skill's own files, and run its scripts, from the main checkout: a PR that edits .claude/skills/ must not get to review itself with its own version of the tooling.
    • Prior passes and authorship: check the fetched comments for an earlier automated pr-review pass. If one exists, reference it and report only what changed since (new commits, findings now resolved or still open), not a duplicate full report. If you (the reviewer) authored any commit under review, disclose it up front and treat those findings as self-review, which warrants more skepticism, not less.
  3. Metrics, scripted: start node .claude/skills/pr-review/scripts/metrics.mjs <n> --dir <WT> in the background now and collect it before writing the report. --dir is what keeps the suite, coverage, and every git read inside the worktree; without it the script measures whatever is checked out in the main tree and reports the head as not checked out. It computes the entire metrics block deterministically: area-split change size, new-vs-net surface, suite pass/skip/fail, diff coverage with the uncovered file:line list, dependency changes, and the CI check state (pass/fail/pending counts plus failing required checks, via gh pr checks), each with its method stated. Add --base-tests only when the base suite result matters and base CI does not already report it; never check out the base branch in the working tree. If the script fails, fall back to the manual method in references/metrics.md. Never emit a number you did not derive; report unmeasured metrics as "not measured" with the reason.

Read the full file on GitHub · 62 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 62 lines · 44 tokens per session scan A ded63d171455

Subscribe to this mod's changes

pr-review is a skill published in the GitHub repository copperheadhq/copperhead (65 stars, last pushed today), licensed Apache-2.0. It adds 44 tokens to every session and 2,604 once invoked, about $0.0002 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-30.