phone-a-friend: Instructions file for Claude Code

AGENTS.md

phone-a-friend AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from freibergergarcia/phone-a-friend. It costs 11,979 tokens per session, scanned A, original, Apache-2.0.

A guide for AI coding agents working on phone-a-friend, a TypeScript command-line tool that sends prompts and repository information to several coding systems.

In plain words
What is it for?
Use it when modifying phone-a-friend, adding or updating backends, changing prompt relaying or streaming, or working on setup, configuration, health checks, and host integrations.
Why use it?
It gives agents the project layout and core behavior they need to make safe, informed changes. It also explains how the command line, configuration, streaming responses, and backend detection fit together.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: Claude Code plugin machinery, but also runs codex exec. Also seen: mentions subagents; mentions Claude Code; mentions AGENTS.md.

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

Reuse

Borrowing it

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

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 phone-a-friend AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/freibergergarcia/phone-a-friend/agents-md"><img src="https://agentmods.dev/badge/instructions/freibergergarcia/phone-a-friend/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11,979 This file is loaded in full into every session.
When invoked 11,979 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.11979 $0.11979
Opus 5 $0.05990 $0.05990
Sonnet 5 $0.02396 $0.02396
Haiku 4.5 $0.01198 $0.01198

Measured today against content hash 3102ea428f4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

phone-a-friend 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 today.

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

How it starts

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

AGENTS.md

Guidance for AI coding agents working in phone-a-friend.

What This Is

phone-a-friend is a TypeScript CLI for relaying prompts + repository context to coding backends (Claude, Antigravity, Codex, Gemini, Ollama, OpenCode). Available via npm install -g @freibergergarcia/phone-a-friend or from source. All backend run() methods are async (Promise<string>). Backends may also implement runStream() returning AsyncIterable<string> for token-level streaming.

Project Structure

src/
  index.ts           Entry point — imports backends, runs CLI
  cli.ts             Commander.js CLI with subcommands
  relay.ts           Backend-agnostic relay core (relay + relayStream + reviewRelay)
  stream-parsers.ts  Stream parsers — SSE (OpenAI-compatible), NDJSON (Ollama), Claude JSON snapshots
  context.ts         RelayContext interface
  version.ts         Shared version reader
  detection.ts       Backend detection (CLI, Local, Host)
  config.ts          TOML configuration system
  doctor.ts          Health check command
  diagnostics.ts     PATH/executable identity and bounded version probes for doctor
  setup.ts           Interactive setup wizard
  installer.ts       Claude/OpenCode host integration installer (symlink/copy)
  theme.ts           Shared semantic theme (chalk) for CLI styling + banner
  display.ts         Display helpers (mark, formatBackendLine)
  jobs.ts            Background job manager (JSON persistence at ~/.config/phone-a-friend/jobs.json)
  sessions.ts        Relay session store (JSON persistence at ~/.config/phone-a-friend/sessions.json)
  tasks.ts           Task store (SQLite at ~/.config/phone-a-friend/tasks.db): durable records + events for every relay/review
  task-tracking.ts   Bridges one CLI run to the task store (RelayObserver, retention modes, drift warning)
  progress.ts        Progress reporter: observer hooks -> stderr lines or spinner text, plus the end-of-run receipt
  status-line.ts     One-row status for Claude Code's status line (running or recently finished task for the cwd repo)
  backends/
    index.ts         Backend interface, registry, types, BackendCapabilities, spawnCli() async subprocess utility
    antigravity.ts  Google Antigravity CLI subprocess backend (`agy`, read-only, one-shot)
    claude.ts        Claude CLI subprocess backend (`claude -p`)
    codex.ts         Codex subprocess backend
    gemini.ts        Gemini subprocess backend
    ollama.ts        Ollama HTTP API backend (native fetch)
    opencode.ts      OpenCode CLI subprocess backend (`opencode run`, agentic with tool calling)
  agentic/
    index.ts         Public API — Orchestrator, TranscriptBus exports
    types.ts         AgentConfig, AgenticSessionConfig, AgentState, Message, AGENTIC_DEFAULTS
    orchestrator.ts  Main loop — spawn agents, route messages, guardrails, emit events
    session.ts       SessionManager — Claude CLI subprocess with UUID-based sessions
    bus.ts           SQLite transcript bus (better-sqlite3) — append-only session log
    queue.ts         In-memory MessageQueue for runtime routing
    events.ts        AgenticEvent discriminated union + EventChannel (push/pull bridge)
    parser.ts        @mention extraction + system prompt builder
    names.ts         Creative agent name assignment (e.g., ada.reviewer)
  tui/
    App.tsx          Root TUI component — tab bar + panel routing
    render.tsx       Ink render entry point
    StatusPanel.tsx  System info + backend detection display
    BackendsPanel.tsx Per-backend list with detail pane
    ConfigPanel.tsx  Config view + inline editing
    ActionsPanel.tsx Async-wrapped executable actions
    AgenticPanel.tsx Session browser with list view
    hooks/
      useDetection.ts    Async detection with throttled refresh
      usePluginStatus.ts Host integration install status (sync FS check)
      useAgenticSessions.ts  SQLite session loader for Agentic panel
    components/
      TabBar.tsx             Tab navigation bar
      PluginStatusBar.tsx    Persistent host integration install indicator
      Badge.tsx              Status badges (✓ ✗ ! ·)
      KeyHint.tsx            Footer keyboard hints
      ListSelect.tsx         Scrollable selectable list
tests/               Vitest tests (mirrors src/ structure, includes spawn-cli, jobs, background-relay)
commands/<name>.md   Rich Claude Code slash commands (full workflow, argument-hint, Gemini model selection, etc.)
agents/paf-reviewer.md   Claude plugin subagent (background, Bash+Read, sonnet): runs one PaF command and reports receipt + verbatim findings
skills/<name>/SKILL.md         Canonical Agent Skills — primary OpenCode entry point, also auto-discovered by Claude Code as plugin-namespaced skills
skills/<name>/COMMAND.opencode.md  Thin OpenCode command shim (overlay). Installer prefers this over commands/<name>.md when present, so OpenCode users get a small shim that delegates into SKILL.md while Claude users get the rich commands/<name>.md inline.
dist/                Built bundle (committed, self-contained)

Read the full file on GitHub · 608 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. today Changed · +12 lines · +764 tokens per session 3102ea428f4a
  2. yesterday Changed · +57 lines · +1,568 tokens per session 06a9dfbca738
  3. 10d ago First seen · 539 lines · 9,647 tokens per session scan A 6b8a85589cdb

Subscribe to this mod's changes

phone-a-friend AGENTS.md is an instructions file published in the GitHub repository freibergergarcia/phone-a-friend (10 stars, last pushed yesterday), licensed Apache-2.0. It adds 11,979 tokens to every session, about $0.0599 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

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,296 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,153 tokens

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

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

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,469 tokens