Orchestrates a risk-tiered, multi-perspective PR review with parallel specialist subagents (code-first, testing, skeptical, big-picture) plus an external model pass, then posts a consolidated report to the PR.
Ships in freenet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run a comprehensive PR review covering all four Freenet review perspectives, plus an external (non-Claude) model, and post a consolidated review to the PR.
Invoke /freenet:pr-review <PR-NUMBER> after a PR is ready for review, before merging.
The PR number is passed as the skill argument ($1); if none is given, detect the PR
for the current branch with gh pr view --json number -q .number.
This skill orchestrates a review — it does not do all the perspectives by hand. It checks out the PR, triages the change to a risk tier, spawns specialist subagents in parallel (scaled to that tier) plus an external model pass, reconciles their findings into one report, and posts that report to the PR.
The four subagents ship with this plugin as first-class agent types — invoke them
directly with the Agent tool's subagent_type parameter. Where those types are
available, do not paste agent definitions into a general-purpose prompt; that is
obsolete. (Without the plugin, see the fixed-lens rule in Step 2.)
Critical: reviewers must read the PR's actual code, and the review must not
disturb the user's working tree. Check the PR out into a dedicated worktree — do
NOT use gh pr checkout, which switches the user's working branch and drags any
uncommitted changes onto the PR branch, contaminating the review.
PR=<PR-NUMBER> # the $1 skill argument
BASE="$(gh pr view "$PR" --json baseRefName -q .baseRefName)" # the PR's base branch
git fetch origin "$BASE" # fresh base branch for the diff
git fetch origin "pull/$PR/head" # PR head — FETCH_HEAD now points here
REVIEW_DIR="${TMPDIR:-/tmp}/pr-review-$PR"
git worktree remove --force "$REVIEW_DIR" 2>/dev/null || true # prune a stale prior worktree
git worktree add --detach "$REVIEW_DIR" FETCH_HEAD # PR code, isolated
cd "$REVIEW_DIR" # run the review from here
Gather context (from the worktree):
gh pr view "$PR"
gh pr diff "$PR" --name-only
gh pr checks "$PR" # CI status
gh issue view <ISSUE_NUMBER> # linked issue (from "Fixes #" / "Closes #")
# Existing review feedback — read it so the review ADDRESSES it, not duplicates it:
gh pr view "$PR" --json comments,reviews
gh api repos/{owner}/{repo}/pulls/"$PR"/comments # inline review comments
The gh api .../comments call above is the reliable way to get inline comments —
they are easy to miss.
Large diffs: if the diff exceeds ~2000 changed lines or ~40 files, instruct each subagent to review by file batches rather than loading the whole diff into context.
Cleanup (mandatory — do this even if the review aborts partway): remove the
worktree with git worktree remove --force "$REVIEW_DIR".
Do NOT run a code-simplifier or any other mutating step here — this skill reviews the PR as submitted; editing the checked-out code would make reviewers judge something other than the PR.
Choose the tier by checking these in order — first match wins — or honor an explicit tier the user named (e.g. "full review of PR 42"):
These tiers are exhaustive — Light is the catch-all. When torn between two, pick the heavier one.
High-risk surfaces — always Full: concurrency / async, cryptography / security / auth, state authorization, data or schema migration, wire format / protocol / serialization (freenet-stdlib enums), consensus / routing, transport / NAT traversal, contract or delegate WASM, deploy / release / CI config, the hosting budgets (state bytes, resident overhead) or anything that feeds them, such as a memory profile.
State the chosen tier and the one-line reason before proceeding.
Spawn the reviewers with the Agent tool in a single message so they run
concurrently, each with run_in_background: true. Which reviewers run depends on the
tier picked in Step 1:
freenet:skeptical-reviewer; also spawn freenet:big-picture-reviewer
if the diff removes code or spans multiple components.subagent_type | Perspective |
|---|---|
freenet:code-first-reviewer | Reads the code before the description; flags gaps between stated intent and implementation |
freenet:testing-reviewer | Test-coverage gaps at unit / integration / simulation / E2E levels |
freenet:skeptical-reviewer | Adversarial — bugs, race conditions, edge cases, failure modes |
freenet:big-picture-reviewer | Goal alignment, removed tests/fixes, scope creep, stale skills/docs |
These subagent_type values are plugin-namespaced: freenet: is the plugin name and
the files in agents/ carry the bare name (skeptical-reviewer, etc.). Use the
freenet:-prefixed form exactly as shown.
In each subagent's prompt, include: the PR number, the repo (owner/repo), and the
path to the review worktree from Step 1 ($REVIEW_DIR), so the agent can Read/Grep
the PR's actual code — not just the diff — for surrounding context. Each agent already
carries its own review methodology; you do not need to supply it.
The tier fixes the lens set; the PR author does not choose it. This holds for every
author: Claude, Gemini/Antigravity (agy), Codex or a human driving any of them. You may
ADD lenses (a change-specific failure-mode lens is often worth it), but never drop,
replace or rename the tier's standard lenses above. A harness that cannot load these
subagent_types (a non-Claude harness, or Claude without this plugin) runs each
standard lens as a blind subagent whose prompt is that agent's definition file plus the
PR context above. Fetch the definition from this plugin's repo, not the PR's repo:
gh api repos/freenet/freenet-agent-skills/contents/agents/<name>.md -H "Accept: application/vnd.github.raw".
Why: freenet-core #6527 was reviewed by author-chosen lenses that all checked the code
against its stated goal; none questioned the goal, and the PR reduced network-wide
hosting capacity.
Run this for both Light and Full tiers. The external model's blind spots do not correlate with Claude-authored code, so it is the highest-value single pass. From the review worktree, diff against the PR's base branch (fetched fresh in Step 1), never a possibly stale local main:
codex review --base "origin/$BASE"
(If your environment provides a codex-review skill, it wraps this command.)
If codex errors, returns no findings summary, or reports exhausted quota or capacity, retry once, then substitute a Claude-lens pass and carry on. Never wait for it to come back; the substituted review counts as complete, including before merge or deploy.
The substitute is at least three independent, blind reviewers with distinct adversarial lenses (four or five for a high-risk Full review): skeptical bug-hunt, code-first, and the failure mode specific to this change (wire change: compatibility and serialization; auth: authorization bypass; migration: data loss and rollback). Use the reviewer subagents plus extra lens prompts. If you cannot spawn subagents, run the lenses serially in your own context, one distinct pass each, then synthesize as in Step 5.
Record in the posted review which external model you tried, the exact failure, and which lenses ran.
Do this for Full reviews, and for Light reviews whose change has non-trivial logic. For freenet-core, read the sections of .claude/rules/ that match the paths the PR touches (code-style.md, ring.md, transport.md, channel-safety.md, deployment.md, bug-prevention-patterns.md) and check the PR against them. Those files, not this skill, are the pattern list.
When all spawned subagents and the external model pass (or its Claude-lens substitute) have returned, do not just concatenate their reports. Synthesize them with the Step 4 findings:
file:line and confirm the finding is real before it
goes in the report. Drop false positives; downgrade speculative ones to questions.Post the synthesized report to the PR as a review comment:
gh pr review "$PR" --comment --body-file <report-file>
Use --comment — not --approve or --request-changes. This skill produces a
review; it does not gate merge or speak for a human approver. Also print the report
in the conversation.
Produce a consolidated review report:
## Comprehensive PR Review: #<NUMBER>
### Summary
- **PR Title:** <title>
- **Type:** <feat/fix/refactor/etc>
- **CI Status:** <passing/failing/pending>
- **Linked Issues:** <issue numbers or "none">
- **Review tier:** <Light / Full>
- **Reviewers run:** <the tier's standard lenses that ran, by name (`code-first`, `testing`, `skeptical`, `big-picture`), then any added lenses and external models. A review that does not list the tier's standard lenses is not the required review>
---
### Lens findings
One section per lens that actually ran (code-first, testing, skeptical, big-picture, external model), each containing only findings you verified, with `file:line`, severity and why. The testing lens states whether a regression test fails without the fix. Omit lenses that did not run; say so in "Reviewers run".
---
### Documentation
- Code docs: <complete/incomplete/missing>
- Architecture docs: <up-to-date/needs-update/n/a>
- User docs: <up-to-date/needs-update/n/a>
---
### Recommendations
#### Must Fix (Blocking)
1. <critical issues that must be addressed>
#### Should Fix (Important)
1. <significant issues that should be addressed>
#### Consider (Suggestions)
1. <minor improvements or style suggestions>
---
### Verdict
**State:** <Ready to Merge / Needs Changes — Re-review Required After Fix / Needs Changes — Light Re-Check Sufficient / Needs Discussion>
**HEAD SHA reviewed:** <sha>
<If not ready, summarize what's needed. If re-review is required, list which findings triggered it so the next pass can confirm they're addressed.>
A review is per-CODE-CONTENT, not per-PR. If the review surfaced significant problems and the author then pushed fixes, the previously-completed review is stale and does not authorize merge — the new code has not been reviewed. Run the full review process again on the updated HEAD.
Re-run the full review (all of Steps 1–6) if any of the following is true after fixes are pushed:
git commit --amend, or any force-push altered the diff vs. main — this counts as new code even if no review finding prompted it.When in doubt, re-review. The cost of a second pass is small; the cost of merging unreviewed code is large.
Only skip re-review if all of these hold:
// TODO comment).In that case, do a focused diff-of-the-diff check (just the new commits since the prior review) and note in the verdict that a light re-check was performed rather than a full re-review.
Confirm CI is green on the current HEAD SHA (gh pr view <NUMBER> --json statusCheckRollup,headRefOid), then re-run Steps 1-6 on the new HEAD, reading the full diff, not only the fix commits. Re-triage against the whole PR diff; the tier may rise but never falls below the original. In the Verdict, say this is a re-review and list the prior findings it resolves. Repeat until a pass on the current HEAD is clean; there is no cap on rounds. Never give "Ready to Merge" on a review whose HEAD SHA differs from the PR's current HEAD.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/dapp-builderBuild and maintain decentralized applications on Freenet using river as a template. Guides through designing contracts (shared state), delegates (private state), and UI, and through upgrading a live dApp safely. Use when user wants to create a new Freenet dApp, design contract state, implement delegates, build a Freenet-connected UI, OR upgrade an existing dApp — bump freenet-stdlib, ship a new contract/delegate version (v2), fix a bug that re-keys the WASM, or migrate state across a contract/delegate key change without breaking invites or losing data. Also use when INTEGRATING with a contract or delegate published by another app — reading another project's contract state, depending on a platform delegate, or deciding how to address someone else's artifact so it survives their re-keys./linux-testRun integration tests that require Linux (full loopback range 127.x.x.x) via Docker. Use when a test fails on macOS with "Can't assign requested address" or when the user says "/linux-test"./local-devSet up and manage local Freenet development environments and interact with a running node. Use when the user wants to test contract changes locally, debug UI issues, run a local node, query connections/diagnostics, inspect the dashboard, use the WebSocket API, or iterate on a Freenet application without deploying to the live network./pr-creationGuidelines for creating high-quality Freenet pull requests. This skill should be used when creating PRs for freenet-core, freenet-stdlib, or related repositories. Emphasizes quality over speed, thorough testing, and proper review process./releaseOrchestrate a new freenet-core release. Runs the MANDATORY pre-cut gates (no concurrent cut, auto-update updater diff + canary suites, a 30-minute real-NAT soak of the exact ship SHA, a telemetry baseline), then determines the version, confirms with the user, triggers the release pipeline via GitHub Actions, and monitors telemetry through the 0-4h auto-update stagger. Use when the user says "do a release", "new release", "cut a release", "release", or "/release"./systematic-debuggingMethodology for debugging non-trivial problems systematically. This skill should be used automatically when investigating bugs, test failures, or unexpected behavior that isn't immediately obvious. Emphasizes hypothesis formation, parallel investigation with subagents, and avoiding common anti-patterns like jumping to conclusions or weakening tests./freenet:pr-reviewfrom freenet
npx claudepluginhub freenet/freenet-agent-skills --plugin freenetOther plugins' skills for the same job