pi-lens: Instructions file for Claude Code

AGENTS.md

pi-lens AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from apmantza/pi-lens. It costs 17,403 tokens per session, scanned C, original, MIT.

Repository instructions for pi-lens, a coding-agent extension that runs checks on changed files and collects diagnostics from language tools and command-line programs. They also define task routing, design rules, and testing requirements.

In plain words
What is it for?
Use them when changing or reviewing pi-lens code, including its language-tool integration, runners, installers, cache, sessions, telemetry, or review features.
Why use it?
They keep work consistent with the repository's contracts and direct the agent to the right rules and tests. They also prevent it from guessing how the agent software development kit works.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: PreToolUse hook event, but also the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is apmantza/pi-lens's own configuration. It tells Claude Code, Codex and OpenCode 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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/apmantza/pi-lens

Made for: Claude Code, Codex, OpenCode.

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 AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/apmantza/pi-lens/agents-md"><img src="https://agentmods.dev/badge/instructions/apmantza/pi-lens/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17,403 This file is loaded in full into every session.
When invoked 17,403 The same file — it is already loaded in full.
Security scan C 1 finding. 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.17403 $0.17403
Opus 5.5 $0.06961 $0.06961
Sonnet 5.5 $0.03481 $0.03481
Haiku 4.5 $0.01740 $0.01740

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

Security

Grade C, and why

pi-lens AGENTS.md scanned grade C with 1 finding 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 2d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

delete through such a link (`rm -rf node_modules/`, `node_modules/*`, `find
AGENTS.md · 1,003 lines

How it starts

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

pi-lens — agent context

How to use this file

Read order: the engineering principles (every harness here carries a verbatim copy in its global instructions; vendored at docs/engineering-principles.md, never hand-edited), then this file, then the role contract for the task. This file holds only what is specific to pi-lens and wins on conflict. Dated incidents and closed decisions live in HISTORY.md.

The principles, one line each, linked to their section of the vendored file. The vendored file wins on any difference from this digest.

  • Premise first: reproduce the defect through the production call path before the fix (§1 Building).
  • Speculative robustness needs buy-in: no new mechanism for an unreproduced race or edge case without the trigger path, evidence, cost and a maintainer decision (§1 Building).
  • Climb the minimalism ladder: reuse an existing seam before adding a line (§1 Building).
  • Net-count rule: a new shared helper deletes a same-shape sibling in the same change (§1 Building).
  • Sweep the pattern, not the instance, and record the consolidation verdict (§1 Building).
  • Design shared state once, before a second writer joins (§1 Building).
  • Give every new failure path one bounded, observable record (§1 Building).
  • Diff the blast radius as a call tree, with +/- on moved lines (§1 Building).
  • Red first, and paste the failing transcript (§2 Testing).
  • Ship the tests in the same commit as the code (§2 Testing).
  • Quote each mutation's red; a ticked box with no transcript is false (§2 Testing).
  • No tautological test: assert an independent effect through the real seam (§2 Testing).
  • Close only when every criterion is met; otherwise Refs and post the remainder (§4 Honesty and records).

Read the full file on GitHub · 1,003 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. 2d ago Changed · +10 lines · +192 tokens per session 90757e442b62
  2. 3d ago Changed · +4 lines · +106 tokens per session 7b3b54d5440f
  3. 3d ago Changed · +5 lines · +162 tokens per session 16efd7508744
  4. 5d ago Changed · +9 lines · +175 tokens per session a21837dda3e9
  5. 6d ago Changed · +15 lines · +249 tokens per session 90999aa860b9
  6. 8d ago Changed · +6 lines · +177 tokens per session 8f063f3b520b
  7. 9d ago Changed · +7 lines · +170 tokens per session f6f2b5f43268
  8. 10d ago Changed · -1,311 lines · -19,336 tokens per session 1b238a2717dc
  9. 12d ago Changed · +15 lines · +263 tokens per session d9b9fcd1f337
  10. 13d ago First seen · 2,243 lines · 35,245 tokens per session scan C 7dd3ba379c1f

Subscribe to this mod's changes

pi-lens AGENTS.md is an instructions file published in the GitHub repository apmantza/pi-lens (514 stars, last pushed yesterday), licensed MIT. It adds 17,403 tokens to every session, about $0.0696 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-15.

Related

pi-lens AGENTS.md compared with instructions from other repositories

pi-lens AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pi-lens AGENTS.mdapmantza/pi-lensInstructions file514yesterdayMITC17,403Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode