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.
npx agentmods add instructions/ghostwright/phantom/claude-mdgit clone --depth 1 https://github.com/ghostwright/phantomWhat 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 | $0.09391 | $0.09391 |
| Opus 5 | $0.04695 | $0.04695 |
| Sonnet 5 | $0.01878 | $0.01878 |
| Haiku 4.5 | $0.00939 | $0.00939 |
Grade D, and why
phantom CLAUDE.md scanned grade D with 3 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 yesterday.
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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- **Don't run as root in Docker.** Claude Code CLI rejects --dangerously-skip-permissions as root. The non-root phantom user with group_add for Docker socket is the correct pattern. Cloud metadata endpointhighServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
**Key fetch.** `src/email/key-fetcher.ts` exposes `ResendKeyFetcher` (gateway-backed, 15-minute cache; `GET http://169.254.169.254/v1/secrets/resend_api_key`) and `EnvKeyFetcher` (env-backed for local dev / OSS Docker wi Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl https://<slug>.phantom.ghostwright.dev/health/build-info How it starts
The opening of the file, as written. The whole thing — 434 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Phantom
Phantom is an autonomous AI co-worker that runs as a persistent Bun process on a VM. It wraps the Claude Agent SDK as a subprocess (Anthropic by default, swappable via a provider: config block to Z.AI/GLM-5.1, OpenRouter, Ollama, vLLM, LiteLLM, or any Anthropic Messages API compatible endpoint). It maintains vector-backed memory across sessions, rewrites its own configuration through a validated self-evolution engine, communicates via Slack/Web Chat/Telegram/Email/Webhook, and exposes all capabilities as an MCP server. 30,000+ lines of TypeScript, 1,819 tests, v0.20.2. Apache 2.0, repo at ghostwright/phantom.
Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Bun (TypeScript-native, built-in SQLite, no bundler) |
| Agent | Claude Agent SDK (@anthropic-ai/claude-agent-sdk) subprocess. Provider is configurable via src/config/providers.ts: Anthropic (default), Z.AI, OpenRouter, Ollama, vLLM, LiteLLM, custom. |
| Memory | Qdrant (vector DB, Docker) + Ollama (nomic-embed-text, local embeddings) |
| State | SQLite via Bun (sessions, tasks, metrics, evolution versions, scheduled jobs) |
| Channels | Slack (Socket Mode), Web Chat (SSE streaming), Telegram (long polling), Email (IMAP/SMTP), Webhook (HMAC-SHA256), CLI |
| Chat Client | React 19 + Vite + shadcn/ui + Tailwind v4 SPA at /chat |
| Web UI | Tailwind v4 Browser CDN + DaisyUI v5, static files from public/ |
| MCP | Streamable HTTP on /mcp, bearer token auth, 17+ tools |
| Infrastructure | Docker (compose), Specter VMs (Hetzner), systemd (bare metal) |
| Lint/Format | Biome |
| Test | bun:test |
The Cardinal Rule
TypeScript is plumbing. The Agent SDK is the brain.
The Agent SDK (Opus 4.7) has full computer access: Read, Write, Edit, Bash, Glob, Grep, WebSearch, Agent tools. It can understand natural language, read code, explore repos, detect tech stacks, clone repos, install packages, write configs, and reason about anything.
TypeScript handles: starting processes, routing messages, managing sessions, storing data, serving HTTP endpoints, tracking state. Mechanical, deterministic work.
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.
- yesterday First seen · 434 lines · 9,391 tokens per session scan D a3489a52dc14
phantom CLAUDE.md is an instructions file published in the GitHub repository ghostwright/phantom (1,463 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 9,391 tokens to every session, about $0.0470 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, cloud metadata endpoint, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
warren AGENTS.md
Instructions for jayminwest/warren, covering agents.md, what this project is, runtime topology, the burrow absorption (plan pl-3007) and per-project config (.warren/config.yaml).
norma CLAUDE.md
Instructions for yanlingLabs/norma, covering claude.md, what this is, commands, tests and swift.
factory CLAUDE.md
Instructions for watt-mind/factory: Claude, please refer to AGENTS.md and docs/protocol.md for the primary repository context, architecture, commands, operational rules, and tracker issue management standards.
factory GEMINI.md
Instructions for watt-mind/factory: Gemini, please refer to AGENTS.md and docs/protocol.md for the primary repository context, architecture, commands, operational rules, and tracker issue management standards.
useagent CLAUDE.md
Claude Code instructions for useagenthq/useagent, covering useagent - claude.md and hard rules.
factory AGENTS.md
Instructions for watt-mind/factory, covering commands, agent operating floor, handoff, never auto-merge and protected branches.