From freenet-freenet-agent-skills
Executes comprehensive PR reviews following Freenet standards. Performs four-perspective review covering code-first analysis, testing, skeptical review, and big-picture assessment.
npx claudepluginhub freenet/freenet-agent-skills --plugin freenetThis skill uses the workspace's default tool permissions.
Execute a comprehensive PR review covering all four review perspectives from Freenet quality standards.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Execute a comprehensive PR review covering all four review perspectives from Freenet quality standards.
Use /freenet:pr-review <PR-NUMBER> after a PR is ready for review, before merging.
# Get PR details
gh pr view <NUMBER>
# Get the diff
gh pr diff <NUMBER>
# Check for linked issues
# Look for "Fixes #XXX" or "Closes #XXX" in description
gh issue view <ISSUE_NUMBER> # if linked
# List affected files
gh pr diff <NUMBER> --name-only
# Check CI status
gh pr checks <NUMBER>
Review the code before reading the PR description to form an independent understanding.
Process:
Look for:
Analyze test coverage at all levels.
Check for:
Questions to answer:
Red flags:
#[ignore] annotationsAdversarial review looking for bugs, race conditions, and edge cases.
Attack vectors to explore:
For each change, ask:
5 Recurring Bug Patterns (from Feb 2025 fix review — 25/25 bugs):
Check if the PR introduces or touches code matching these patterns:
| Pattern | What to Look For |
|---|---|
biased; select starvation | Per-iteration caps? Cancellation safety? Which arm starves? |
| Fire-and-forget spawns | JoinHandle stored? try_send on critical paths? Catch-all _ => in metrics? |
| State cleanup on failure | ALL related maps cleaned up? Peer lists filtered to live connections? GC exemptions time-bounded? |
| Backoff without jitter | Jitter ±20%? Sleep interruptible via select!? Zero-connection re-bootstrap? Critical msgs retried? |
| Deployment gaps | Exit codes declared? Auto-update gated on release? Security tested against app needs? Unused deps? |
Ensure the PR actually solves the stated problem and doesn't exhibit "CI chasing" anti-patterns.
Check for removed code:
# Look for deleted tests or fix code
gh pr diff <NUMBER> | grep -E '^-.*#\[test\]|^-.*fn test_|^-.*assert'
Anti-patterns to detect:
| Anti-Pattern | What to Look For |
|---|---|
| Ignored tests | #[ignore], skip, @Ignore |
| Weakened assertions | Looser tolerances, .ok() on Results |
| Commented code | Especially tests or validation |
| Magic numbers | Hardcoded values replacing logic |
| Error swallowing | .unwrap_or_default(), silent fallbacks |
Big picture questions:
Check if documentation is complete:
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">
---
### Code-First Analysis
**Independent Understanding:** <what the code appears to do>
**Stated Intent:** <from PR description>
**Alignment:** <matches/partially matches/misaligned>
**Gaps:** <any discrepancies>
---
### Testing Assessment
**Coverage Level:** <adequate/insufficient/excessive>
| Test Type | Status | Notes |
|-----------|--------|-------|
| Unit | ✅/❌/⚠️ | <details> |
| Integration | ✅/❌/⚠️ | <details> |
| Simulation | ✅/❌/N/A | <details> |
| E2E | ✅/❌/N/A | <details> |
**Regression Test:** <present and valid / missing / insufficient>
**Missing Tests:** <list specific gaps>
---
### Skeptical Findings
**Risk Level:** <low/medium/high>
| Concern | Severity | Location | Details |
|---------|----------|----------|---------|
| <issue> | <high/med/low> | <file:line> | <explanation> |
---
### Big Picture Assessment
**Goal Alignment:** <yes/partial/no>
**Anti-Patterns Detected:** <list or "none">
**Removed Code Concerns:** <list or "none">
**Scope Assessment:** <focused/some creep/significant creep>
---
### 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
**Ready to Merge:** <Yes / No - needs changes / No - needs discussion>
<If not ready, summarize what's needed>
For deeper analysis, spawn the specialized review agents in parallel using the Task tool with subagent_type="general-purpose". Include the agent definition (from agents/) in each prompt so the subagent follows the correct review methodology.
Spawn all four in parallel using Task tool (all use subagent_type="general-purpose"):
1. "You are a code-first-reviewer. [Include agents/code-first-reviewer.md instructions]
Review PR #<NUMBER> in freenet/freenet-core"
2. "You are a testing-reviewer. [Include agents/testing-reviewer.md instructions]
Review test coverage for PR #<NUMBER> in freenet/freenet-core"
3. "You are a skeptical-reviewer. [Include agents/skeptical-reviewer.md instructions]
Do a skeptical review of PR #<NUMBER> in freenet/freenet-core"
4. "You are a big-picture-reviewer. [Include agents/big-picture-reviewer.md instructions]
Do a big-picture review of PR #<NUMBER> in freenet/freenet-core"
After completing the internal review, ask Codex to do a skeptical review of the PR. Codex uses a different model and catches different classes of issues — having an independent perspective reduces blind spots. Share the PR number and ask it to look for bugs, race conditions, edge cases, and failure modes. Incorporate any findings into the final review report.