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.
curl -O https://raw.githubusercontent.com/freibergergarcia/phone-a-friend/main/AGENTS.mdgit clone --depth 1 https://github.com/freibergergarcia/phone-a-friendWrote 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.
[](https://agentmods.dev/instructions/freibergergarcia/phone-a-friend/agents-md)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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)
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.
- today Changed · +12 lines · +764 tokens per session 3102ea428f4a
- yesterday Changed · +57 lines · +1,568 tokens per session 06a9dfbca738
- 10d ago First seen · 539 lines · 9,647 tokens per session scan A 6b8a85589cdb
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.
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.
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.
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).
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.
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).
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.