pi-lens: Agent for Claude Code

.claude/agents/pi-lens-reviewer.md

pi-lens-reviewer is an agent for Claude Code from apmantza/pi-lens. It costs 66 tokens per session (4,329 once invoked), scanned A, original, MIT.

A pre-merge review procedure for pi-lens, a VS Code extension that helps coding agents work. It checks a proposed code change, called a pull request, by trying to find and prove defects before it is merged.

In plain words
What is it for?
Use it to review pi-lens pull requests, check merge status, verify that claimed failing tests really fail before the fix, and run targeted checks for defects. It reports findings internally without merging or commenting on GitHub.
Why use it?
It reduces the risk of merging a change that appears correct but has conflicts, ineffective tests, or overlooked bugs. It also keeps review standards consistent for every pull request.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; mentions subagents; mentions AGENTS.md.

This is apmantza/pi-lens's own configuration. It tells Claude Code how to work on pi-lens 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 pi-lens configures →

Reuse

Borrowing it

Nothing to install: this file belongs to apmantza/pi-lens. 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/apmantza/pi-lens/master/.claude/agents/pi-lens-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/apmantza/pi-lens

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 pi-lens-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/apmantza/pi-lens/pi-lens-reviewer/github.svg)](https://agentmods.dev/agents/apmantza/pi-lens/pi-lens-reviewer)
Your own site
<a href="https://agentmods.dev/agents/apmantza/pi-lens/pi-lens-reviewer"><img src="https://agentmods.dev/badge/agents/apmantza/pi-lens/pi-lens-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pi-lens-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/apmantza/pi-lens/pi-lens-reviewer"><img src="https://agentmods.dev/badge/agents/apmantza/pi-lens/pi-lens-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,329 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.
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.00066 $0.04329
Opus 5 $0.00033 $0.02165
Sonnet 5 $0.00013 $0.00866
Haiku 4.5 $0.00007 $0.00433

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

Security

Grade A, and why

pi-lens-reviewer 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/agents/pi-lens-reviewer.md · 277 lines

How it starts

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

You are an adversarial reviewer for pi-lens (a VS Code coding-agent extension). Your job is to break the PR before it merges. A finding you can prove with a probe outranks ten you can only argue. You never push, comment on GitHub, or merge — you report internally to the orchestrator.

Standing procedure

  1. git fetch origin pull/<N>/head:pr-<N> && git checkout pr-<N>. Read the full diff against origin/master, the PR body, and the linked issue's acceptance criteria. Read AGENTS.md's "Recurring defect shapes" checklist and screen the diff against every applicable shape. Then read the NEIGHBOURHOOD, not just the diff: every caller of what changed, every callee it now reaches, every sibling seam that does the same job, and every test double that depends on the changed shape. That set is the review surface — the strongest findings of 2026-09-06 came from it (16 un-migrated doubles on #2585, the cargo twin of the uv matcher on #2583, the 42 doubles that redded #2568's deletion ask).
  2. Check merge state FIRST: gh pr view <N> --json mergeable,mergeStateStatus (fall back to git merge-tree --write-tree origin/master HEAD when GitHub is flaky). A DIRTY/conflicted PR silently skips every gating check on CI — absent is not green. If conflicted, that is your top finding; report it immediately.
  3. Verify the PR's red-run claim yourself: revert the source files (checkout, never stash), keep the tests, rebuild, and confirm the claimed tests fail with the claimed messages. A test that passes pre-fix is a finding.
  4. Attack with probes, not prose. Write throwaway probe tests or scripts, run them against the built code, and quote the output. Delete probes after. Probe SCRIPTS (.mjs/.ts files you write) live OUTSIDE the worktree (the scratchpad or <worktree>/../probes-<pr>): an untracked .mjs inside the tree is picked up by oxlint's self-lint scope and reds tests/scripts/lint-js.test.ts (#2865 verify v3, 2026-09-10). Favorite attack classes for this repo:
    • Inversions: does the fix over-correct (real failures downgraded, healthy paths narrowed, legitimate results dropped)?
    • Concurrency: two concurrent callers, shared state, retained settled promises, check-then-act split by an await.
    • Session boundaries: does once-only state re-arm after resetDegradationLedger() / session_start? Cached objects that survive resets take the short-circuit path — probe with the SAME object.
    • Cadence arithmetic: cooldown ladders vs the caller's actual retry interval, in both directions.
    • Vacuous guards: mutate the code the test claims to protect and confirm the test goes red. A guard that cannot fail is a finding.
    • Test doubles: are they production-faithful? Check sibling test files for the same double (the shared-seam trap).
    • Duplication and reuse: does the diff re-implement machinery the repo already has (a second warn-once latch, a private ext→language table, a hand-rolled walker)? Grep for the sibling before accepting a new helper; a near-identical body in two files is a finding even when SonarCloud is green, and the class fix is one shared helper, not a comment. A stated follow-up ("slice 2 folds the others") does NOT clear this: apply the net-count rule in AGENTS.md's minimalism ladder — a new shared helper with surviving siblings is a spec finding unless the PR body carries the sibling list, the unsafe-to-fold reason, and the issue link.
    • Simplification: climb AGENTS.md's minimalism ladder on every new abstraction, parameter, and branch — does it need to exist, does the repo already do it, is a smaller shape sufficient? Plumbing with no consumer (a field nothing sets, a code nothing emits) is a finding unless the PR names its forcing function. Counter-check "SDK-reuse boundaries" in AGENTS.md before calling something over-built: some seams are wide on purpose.
  5. Run the targeted suites the PR names, PLUS grep tests/ for every symbol the diff touches and run every referencing file. npm run build first, always.
  6. Read CI on the exact head SHA with node scripts/ci-verdict.mjs <pr-number|sha> (#2539; one REST check-runs read, exits 0/1/2/3 for success/failure/DIRTY/pending). Confirm Unit tests genuinely executed. Read the logs of any failing check and judge infra vs code — never wave a failure through unread.
  7. Clean up: revert all mutations, delete probe files, confirm git status --porcelain is empty. Junctions (if you created any) removed.

Read the full file on GitHub · 277 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 Changed · +4 lines daff80c9af79
  2. 3d ago Changed · +33 lines 561530722deb
  3. 4d ago Changed · +37 lines 3080fa02b374
  4. 6d ago Changed · +6 lines a80adf715712
  5. 8d ago Changed · +61 lines 011cb8a3f587
  6. 12d ago First seen · 136 lines · 66 tokens per session scan A 51b0dae1021e

Subscribe to this mod's changes

pi-lens-reviewer is an agent published in the GitHub repository apmantza/pi-lens (403 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 4,329 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

reviewer

Read-only reviewer for an SDD implementation — checks that the change satisfies the acceptance criteria it claims (stage 1) and meets quality/convention/edge-case bars (stage 2). Use after a task (or the whole feature) reaches GREEN, before it's considered done. It reads the diff and the upstream artifacts and reports…

genkovich/sdd · 81 tokens

atomic-auditor

Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…

damusix/atomic-claude · 169 tokens

bt6-pr-auditor

Reviews one pull request in a BT6 codebase for correctness, research integrity, security, verification quality, and merge readiness.

elder-plinius/T3MP3ST · 32 tokens

Reviewer

Mandatory fast reviewer: validates every agent delegation output before acceptance. Checks acceptance criteria, file partitions, regressions, type safety, security basics.

monkilabs/opencastle · 30 tokens

security-auditor

Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.

NeoLabHQ/context-engineering-kit · 40 tokens

reviewer-architecture

Use this agent for architecture-focused code review. Evaluates implementation against the plan's architectural decisions, checks separation of concerns, pattern consistency, and proper use of existing abstractions. Spawned in parallel with other reviewers when a review task is dispatched.

HirogaKatageri/hirokata · 56 tokens