pi-anthropic-auth: Instructions file for Codex

AGENTS.md

pi-anthropic-auth AGENTS.md is an instructions file for Codex, OpenCode from gotgenes/pi-anthropic-auth. It costs 12,053 tokens per session, scanned A, original, MIT.

A project guide for pi-anthropic-auth, a small pnpm package that changes how Pi, a command-line AI client, connects to Anthropic. Its goal is to improve Claude Pro and Max sign-in compatibility while preserving normal API-key use.

In plain words
What is it for?
Use it to understand the package layout, its OAuth and API-key compatibility goal, and where reusable workflows, prompts, and subagents belong.
Why use it?
It explains the package's narrow purpose and constraints, helping contributors avoid replacing more of Pi's built-in Anthropic behavior than necessary.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions Claude Code; mentions AGENTS.md.

This is gotgenes/pi-anthropic-auth's own configuration. It tells Codex and OpenCode how to work on pi-anthropic-auth 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-anthropic-auth configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/chris/development/pi/pi-anthropic-auth/src/index.ts.

Reuse

Borrowing it

Nothing to install: this file belongs to gotgenes/pi-anthropic-auth. 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/gotgenes/pi-anthropic-auth/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/gotgenes/pi-anthropic-auth

Made for: 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-anthropic-auth AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gotgenes/pi-anthropic-auth/agents-md"><img src="https://agentmods.dev/badge/instructions/gotgenes/pi-anthropic-auth/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12,053 This file is loaded in full into every session.
When invoked 12,053 The same file — it is already loaded in full.
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.12053 $0.12053
Opus 5.5 $0.04821 $0.04821
Sonnet 5.5 $0.02411 $0.02411
Haiku 4.5 $0.01205 $0.01205

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

Security

Grade A, and why

pi-anthropic-auth AGENTS.md 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 13d 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.

AGENTS.md · 681 lines

How it starts

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

AGENTS Guide: pi-anthropic-auth

This file contains shared context for agents working in this repository. Keep it focused on information that multiple agents need: repository purpose, current architecture, constraints, commands, and known gotchas. Do not turn this into a task log.

Project-level reusable workflows belong in .pi/skills/, reusable slash-command flows in .pi/prompts/, and custom subagents in .pi/agents/. This repo includes repo-specific skills (Anthropic OAuth debugging, Pi CLI repro, frontmatter, upstream watch) plus a shared workflow toolkit (code design, testing, fallow, improvement discovery, pre-completion, shell and edit-tool traps, and others) kept in parity with ~/development/pi/pi-packages/. The Skill Index under Architecture maps each task to the skill to load before it.

Admission test

This file is loaded into every session; a skill's body is loaded only when read. Before adding a passage here, answer three questions in order:

  1. Could a current model act correctly without it? If yes, it belongs nowhere.
  2. Is it needed before any workflow step has run, or is it an environment fact no model could infer? If neither, it belongs in the body of the topic skill whose trigger it fires at. Every rule has a loader now; a missing destination is a reason to create one, not to keep the rule here.
  3. Does the rule stand without its incident? If yes, keep the rule and drop the story; a (Refs #N) stays only when the issue encodes a constraint a reader may need to trace.

A rule whose incident has not recurred in any recent retro is a delete candidate — guidance, not a verdict, since the rule may be why it has not recurred.

Project

Overview

pi-anthropic-auth is a small pnpm-based Pi package. Its purpose is to minimally override Pi's built-in anthropic provider to improve Claude Pro/Max OAuth compatibility without breaking Pi's normal Anthropic API-key behavior.

The design intent is explicitly minimal. Prefer wrapping or extending Pi's existing Anthropic behavior over replacing it wholesale.

Read the full file on GitHub · 681 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. 13d ago Changed · +1 lines · +56 tokens per session e6eaf8c31777
  2. 28d ago Changed · +1 lines · +49 tokens per session 97a8cc9c0873
  3. 29d ago Changed · +19 lines · +487 tokens per session f8f9227cb9a9
  4. 1mo ago Changed · +7 tokens per session 3ae817e6fb78
  5. 1mo ago Changed · +20 lines · +928 tokens per session bbd9f809b3e5
  6. 1mo ago Changed · +52 lines · +1,324 tokens per session d8a413c4679c
  7. 1mo ago Changed · +20 lines · +850 tokens per session 825f86613d7b
  8. 1mo ago Changed · +11 lines · +366 tokens per session 42a7b87c8556
  9. 1mo ago Changed · +3 lines · +139 tokens per session 4ce7857a33a6
  10. 1mo ago First seen · 554 lines · 7,847 tokens per session scan A 3c0ac52e4f94

Subscribe to this mod's changes

pi-anthropic-auth AGENTS.md is an instructions file published in the GitHub repository gotgenes/pi-anthropic-auth (426 stars, last pushed 13d ago), licensed MIT. It adds 12,053 tokens to every session, about $0.0482 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

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens