pi-lens: Agent for Claude Code

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

pi-lens-investigator is an agent for Claude Code from apmantza/pi-lens. It costs 82 tokens per session (404 once invoked), scanned A, original, MIT.

A read-only investigation procedure for finding the cause of unusual pi-lens runtime behavior, where pi-lens is a VS Code coding-agent extension. It uses logs, timestamps, counts, and reproduced behavior to support a diagnosis.

In plain words
What is it for?
Use it to investigate what happened and why by examining pi-lens logs, session records, cascade runs, and project worklogs. It can attribute symptoms to a supported cause and reports architectural problems instead of forcing a repair.
Why use it?
It separates evidence-based root-cause analysis from guesses and from making a fix. This helps explain issues such as stale findings, crashes, missing coverage, or unexpected dogfooding-session behavior.

Agent for Claude Code

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

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-investigator.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-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/apmantza/pi-lens/pi-lens-investigator/github.svg)](https://agentmods.dev/agents/apmantza/pi-lens/pi-lens-investigator)
Your own site
<a href="https://agentmods.dev/agents/apmantza/pi-lens/pi-lens-investigator"><img src="https://agentmods.dev/badge/agents/apmantza/pi-lens/pi-lens-investigator/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-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/apmantza/pi-lens/pi-lens-investigator"><img src="https://agentmods.dev/badge/agents/apmantza/pi-lens/pi-lens-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 404 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.00082 $0.00404
Opus 5.5 $0.00033 $0.00162
Sonnet 5.5 $0.00016 $0.00081
Haiku 4.5 $0.00008 $0.00040

Measured 6d ago against content hash 45d23d91546a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pi-lens-investigator 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 6d ago.

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-investigator.md · 28 lines

What it actually says

You are the pi-lens forensic investigator. Before any other step, read docs/pi-lens-subagent.md and docs/pi-lens-investigator.md in full, then follow them. They own every role rule, after the engineering principles (already in your global instructions) and AGENTS.md. This file adds only what is specific to the Claude Code harness.

  • You are a leaf: never spawn agents (the disallowedTools grant enforces it).
  • Loops and instrumentation live in the worktree the brief names and are reverted before you report. Your session scratchpad is shared with every lane of the session and sits on /tmp; write nothing there (#3526, #3850).
  • Every GitHub write belongs to the orchestrator unless the brief grants gh access.
  • Deliver the final report through SubagentHandback when the harness offers it; trailing text does not reach the orchestrator.
  • When the brief names a hand-back file, the harness default against report .md files does not cover it. Write that file first, then call SubagentHandback with the summary and its path.
  • The handback-cap hook refuses a SubagentHandback call over 30 non-blank lines; the per-lane caps live in docs/pi-lens-subagent.md "Deliverable".
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. 6d ago Changed · +2 lines 45d23d91546a
  2. 10d ago Changed · +3 lines ef0594458071
  3. 1mo ago Changed · -109 lines 90877f6c84a6
  4. 2mo ago Changed · +1 lines 1812fbfd2f53
  5. 2mo ago Changed · +20 lines 5722bc9dcfcd
  6. 2mo ago First seen · 111 lines · 82 tokens per session scan A e622ade2ee54

Subscribe to this mod's changes

pi-lens-investigator is an agent published in the GitHub repository apmantza/pi-lens (514 stars, last pushed yesterday), licensed MIT. It adds 82 tokens to every session and 404 once invoked, about $0.0003 per session on Opus 5.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

pi-lens-investigator compared with agents from other repositories

pi-lens-investigator next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pi-lens-investigatorapmantza/pi-lensAgent514yesterdayMITA82Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent662yesterdayMITA63Claude Code
debuggerTT-Wang/forgeAgent353d agoMITA17Claude Code
debuggerbostonaholic/rpikitAgent204d agoMITA28Claude Code
loom-advisorcosmix/loomAgent655d agoMITA53Claude Code
evolve-retrospectivemickeyyaya/evolve-loopAgent6todayApache-2.0A51Claude Code
type-reconstructormarcosd4h/DeepExtractRuntimeAgent211mo agoMITA63Claude Code