phren: Instructions file for Claude Code

AGENTS.md

phren AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from alaarab/phren. It costs 6,403 tokens per session, scanned A, original, MIT.

A project instruction document for the phren codebase. It explains where the project lives, how its monorepo is organised, and how its packages, tests, and releases work; a monorepo is one repository containing multiple related packages.

In plain words
What is it for?
Use it when working on the phren CLI, VS Code extension, experimental agent, tests, builds, or release workflows.
Why use it?
It gives coding agents the project-specific context they need instead of making them guess which files, commands, and package relationships matter.

Instructions file for Claude CodeCodexOpenCode

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

This is alaarab/phren's own configuration. It tells Claude Code, Codex and OpenCode how to work on phren 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 phren configures →

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/alaarab/phren/agents-md"><img src="https://agentmods.dev/badge/instructions/alaarab/phren/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,403 This file is loaded in full into every session.
When invoked 6,403 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.06403 $0.06403
Opus 5.5 $0.02561 $0.02561
Sonnet 5.5 $0.01281 $0.01281
Haiku 4.5 $0.00640 $0.00640

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

Security

Grade A, and why

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

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 · 156 lines

How it starts

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

AGENTS.md

Open-source knowledge layer for AI agents. Published as @phren/cli on npm.

Project Location

Source lives at ~phren. Published to npm. Starter templates are bundled in the package.

Monorepo Structure

pnpm workspace with turborepo. Shipped packages:

Package Path npm Description
@phren/code packages/code/ Published Optional code index, grammars and code skill
@phren/cli packages/cli/ Published CLI, MCP server, data layer
@phren/agent packages/agent/ Published, version-locked to @phren/cli phren's coding agent. Optional like @phren/code: phren agent lazy-loads it (packages/cli/src/modules/agent-package.ts) and spawns its phren-agent binary, which also works on its own. It pins the exact CLI version (its workspace:* dependency is rewritten by pnpm pack in release.yml, which publishes it right after the CLI); validate-docs fails if the two versions drift. Its suite runs under its own vitest config in the CI agent-test job (pnpm exec turbo run test --filter=@phren/agent), not the root pnpm test.
@phren/vscode packages/vscode/ VS Code Marketplace VS Code extension. Versions separately from the CLI (packages/vscode/CHANGELOG.md, shown on the Marketplace listing) and releases through the Release VS Code extension workflow. It is a thin client calling MCP tools by name, so it starts its server in the full tool profile, and a test in packages/cli fails if the CLI stops registering a tool it calls.
@phren/desktop packages/desktop/ Not on npm; installers on GitHub releases Phren desktop (owner-only): a daemon that is an SSH client of every computer's Hook with its own desktop key, a plain-ESM UI (ui/, contract in ui/CONTRACT.md) and an Electron shell. Versions separately, with release notes in packages/desktop/CHANGELOG.md (one section per version, required by the release and shown in the app's update chip); the Release desktop app workflow (desktop-v* tag or dispatch) builds the macOS .dmg, Windows .exe and Linux AppImage with electron-builder (scripts/package.mjs stages a pnpm deploy copy) and publishes them as the repo's latest release, which electron-updater reads. Guide: docs/desktop.md. Smoke tests: pnpm exec playwright test -c packages/desktop/playwright.config.ts against src/testing/fake-hook.ts.
@phren/desktop-kit packages/desktop-kit/ Private Client logic ported from the Android kit (transcript reader, chat timeline, tool presentation) with the Kotlin tests ported; served to the desktop UI at /vendor/kit/.
@phren/desktop-editor packages/desktop-editor/ Private VS Code's editor and extension host (monaco-vscode-api) built with Vite into packages/desktop/ui/editor-host; scripts/build-reh.sh builds the matching VS Code server for Node extensions.

Read the full file on GitHub · 156 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 743326b2af4d
  2. 4d ago Changed · +1 lines · +107 tokens per session 1ce1dc11ec15
  3. 5d ago Changed c1cb872179b7
  4. 6d ago Changed ecc25e75067e
  5. 7d ago Changed ef595c8bd9df
  6. 8d ago Changed 7ddccc0582c3
  7. 9d ago Changed ea6aa057ba49
  8. 11d ago Changed a57c57fd3707
  9. 12d ago Changed ee8a806875c6
  10. 18d ago First seen · 155 lines · 6,296 tokens per session scan A c1c39d240430

Subscribe to this mod's changes

phren AGENTS.md is an instructions file published in the GitHub repository alaarab/phren (4 stars, last pushed 2d ago), licensed MIT. It adds 6,403 tokens to every session, about $0.0256 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-09-20.

Related

phren AGENTS.md compared with instructions from other repositories

phren AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
phren AGENTS.mdalaarab/phrenInstructions file42d agoMITA6,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