phren CLAUDE.md

phren CLAUDE.md is an instructions file for coding agents from alaarab/phren. It costs 1,446 tokens per session, scanned A, original, MIT.

Project instructions for Phren, an open-source knowledge tool for AI agents, including its code layout and development commands. A monorepo is one repository containing multiple related packages or applications.

In plain words
What is it for?
Use it when developing, testing, or navigating Phren's command-line tool, VS Code extension, experimental agent, or iOS app.
Why use it?
It helps an agent find the right project files and understand which parts are published, experimental, or outside the main workspace.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/alaarab/phren/claude-md
Clone the repo
git clone --depth 1 https://github.com/alaarab/phren

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/alaarab/phren/claude-md.svg)](https://agentmods.dev/instructions/alaarab/phren/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/alaarab/phren/claude-md"><img src="https://agentmods.dev/badge/instructions/alaarab/phren/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,446 This file is loaded in full into every session.
When invoked 1,446 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01446 $0.01446
Opus 5 $0.00723 $0.00723
Sonnet 5 $0.00289 $0.00289
Haiku 4.5 $0.00145 $0.00145

Measured 3d ago against content hash 0a7afee9844c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

phren CLAUDE.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 3d 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.md · 87 lines

How it starts

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

CLAUDE.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/cli packages/cli/ Published CLI, MCP server, data layer
@phren/vscode packages/vscode/ VS Code Marketplace VS Code extension

Experimental (not published, not wired into the phren CLI):

Package Path Status Description
@phren/agent experimental/agent/ Private, experimental Standalone coding agent. Built by root pnpm build; tested by the CI agent-test job (pnpm exec turbo run test --filter=@phren/agent). Run via the built phren-agent binary — not via phren.

Outside the pnpm workspace:

App Path Description
phren for iOS apps/ios/ Native SwiftUI app: GitHub sign-in, live-syncing view/manage of findings, notes, tasks, and the review queue straight against the store repo (serverless — GitHub REST API only). PhrenKit/ is the testable Swift package; its markdown parsers are transcriptions of the CLI's TS (fixtures generated by apps/ios/scripts/generate-fixtures.mjs from real CLI code). Xcode project generated via XcodeGen from project.yml; CI in .github/workflows/ios.yml. See apps/ios/README.md.

Key Files

File Purpose
packages/cli/src/index.ts Entry point: top-level invocation routing + MCP server with 59 tools
packages/cli/src/entrypoint.ts Top-level dispatcher: resolves --help/--version/--health/MCP/manage invocations and routes via the command registry
packages/cli/src/cli-registry.ts Command catalog. Single source of truth for help generation and dispatch (Command type, REGISTRY, lookupCommand, DOC_TOPICS).
packages/cli/src/cli-help.ts Help formatters over the registry: formatCheatSheet, formatTopic, formatCommand, formatFullHelp
packages/cli/src/cli-handlers.ts Native handlers for add, init, uninstall, status, verify, mcp-mode, hooks-mode, plus argv parsing helpers
packages/cli/src/shared.ts Shared infrastructure: findPhrenPath, getProjectDirs, runtimeFile, sessionMarker
packages/cli/src/content/ Content operations: finding CRUD, trust filtering, dedup, consolidation
packages/cli/src/governance/ Governance: policy/access/workflow config, review queue, audit log, locks
packages/cli/src/shared/index.ts FTS5 indexer: buildIndex, queryRows, @import resolution, file classification
packages/cli/src/utils.ts Utilities: FTS5 sanitization, synonym expansion, keyword extraction
packages/cli/src/init/init.ts phren init: configures MCP + hooks for all detected agents
packages/cli/src/link/ Reconciles an existing install's machine/profile wiring, hooks, and local context
packages/cli/src/data/access.ts Data layer: task CRUD, machine/profile listing, finding management
packages/cli/src/telemetry.ts Opt-in usage telemetry: tool call and CLI command tracking
packages/cli/browser/graph/ Shared 3D memory-viewer renderer (bundled for the web UI and the VS Code webview): scene, project navigator, contents/review pane, labels
packages/cli/src/status.ts phren status: health, project, stats overview
packages/cli/starter/global/skills/ The phren-* slash commands phren init provisions into ~/.phren/global/skills (and symlinks into ~/.claude/skills under the managed preset). This is the source init actually readssetup.ts copies from here.
packages/cli/skills/ Older un-prefixed copies of the same five skills plus the maintainer-only docs skill. Nothing reads this at runtime: every skill lookup resolves against the store (<phrenPath>/global/skills, <project>/skills), never the package. Edit starter/global/skills/ instead.
packages/cli/starter/ Bundled starter templates (4 project types, copied to ~/.phren on init)
packages/cli/starter/templates/ Project templates: python-project, monorepo, library, frontend
docs/index.html GitHub Pages site
global/CLAUDE.md User-level instructions shipped with the package

Read the full file on GitHub · 87 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. 3d ago First seen · 87 lines · 1,446 tokens per session scan A 0a7afee9844c

Subscribe to this mod's changes

phren CLAUDE.md is an instructions file published in the GitHub repository alaarab/phren (4 stars, last pushed 9d ago), licensed MIT. It adds 1,446 tokens to every session, about $0.0072 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-31.

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 · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 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,345 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js 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,296 tokens