Borrowing it
Nothing to install: this file belongs to PostHog/wizard. 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/PostHog/wizard/main/AGENTS.mdgit clone --depth 1 https://github.com/PostHog/wizardWrote 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/posthog/wizard/agents-md)<a href="https://agentmods.dev/instructions/posthog/wizard/agents-md"><img src="https://agentmods.dev/badge/instructions/posthog/wizard/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/posthog/wizard/agents-md"><img src="https://agentmods.dev/badge/instructions/posthog/wizard/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.04676 | $0.04676 |
| Opus 5.5 | $0.01870 | $0.01870 |
| Sonnet 5.5 | $0.00935 | $0.00935 |
| Haiku 4.5 | $0.00468 | $0.00468 |
Grade A, and why
wizard 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 14d 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.
How it starts
The opening of the file, as written. The whole thing — 315 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — PostHog Wizard
Instructions for all agents (and humans) working in this repo. This is the
single source of truth; CLAUDE.md just points here. User-facing
docs: https://posthog.com/docs/ai-engineering/ai-wizard
The PostHog wizard (npx @posthog/wizard) is a CLI that adds PostHog to a
user's project using an AI agent. It authenticates the user, detects their
framework, runs an agent that integrates the SDK and instruments events, and
walks the user through their first dashboard. All from the terminal.
Design discipline
This codebase follows a specific design discipline: product knowledge never enters infrastructure code. The runner pipeline, the TUI store, the detection loop, and the prompt assembler are machinery. They don't know what PostHog is. They don't know what a framework is. They execute a pipeline driven by typed configuration surfaces.
Each domain has a dedicated boundary:
- Frameworks →
FrameworkConfiginsrc/services/frameworks/<name>/ - Integration knowledge → markdown skills in the context-mill repo
- Security policy → YARA-X rules in the
warlock sibling repo. The wizard wires
the scanner through SDK hooks and Pi tool events; see
security boundaries.
Gateway admission and required safety prompts live in
ai-gateway. To disable scanning in
the field without a release, see the kill-switch runbook:
docs/runbooks/warlock-kill-switch.md. ONLY USE THIS IF ABSOLUTELY NECESSARY. - Agent →
src/agent/. Layer source outside it imports it only through@agent(values) and@agent/types(types); see src/agent/README.md - Shared →
src/shared/, library code with no upward imports. It also holds process-global state: the log file, the analytics client, the exit cleanup list and the process's one OAuth login session (@shared/oauth-session); see src/shared/README.md - Host →
src/host/(@host/*), how the hosts end a run:startHostExit,wizardAbortandregisterShutdown. EverywizardAbortcall passes the presenter that shows its outro. A host resolves an exit code and only the CLI callsprocess.exit. It imports env and shared only. Headless, the TUI, the CLI and the e2e harness may import it. The agent and the programs may not; see src/host/README.md - Services →
src/services/, part of the program layer: what programs consume, such as the session store, detection, the framework configs, the codebase scan and the tool catalog. It imports env, shared, the agent and the program contract (@programs/program-contract, insrc/programs/program-contract/), which sits below it and imports no service. Code outside it imports a service through its entry,@services/<service>; see src/services/README.md - Programs → one folder per program in
src/programs/<id>/, which other layer source enters only through itsindex.ts, plusrunProgram. A program is an agent run; see src/programs/README.md and the developer interfaces - Tools →
src/tools/(@tools, one entry), the commands that run no agent:mcp add,mcp remove,mcp tutorial,slack,doctor,provision,cli addandskill list. A tool may import env, shared and the@agententry (the MCP tutorial's prompt stream only), never the programs, host, TUI, headless or CLI, and no program imports it. Its screens live insrc/tui/tools/<id>/, run byrunTuiTool; every tool runner resolves an exit code. See src/tools/README.md - TUI → the interactive host (
runTui), screens, primitives and the screen store insrc/tui/, which other layers enter only through its one entry,@tui(src/tui/index.ts); see src/tui/README.md. Each program's flow, deck and screens live insrc/tui/programs/<id>/, and each tool's insrc/tui/tools/<id>/, entered through itsindexmodule; the TUI core reaches them only through the TUI program and tool registries. A program's flow uses a step a tool also shows, such as the MCP install, by its core screen id - Headless → the host with no screens (
runHeadless) andLoggingUIinsrc/headless/, which other layers enter only through its one entry,@headless(src/headless/index.ts); see src/headless/README.md. The two hosts share only the kind of session store they build,SessionStorein@programs, and the host layer; neither loads the other's code, and each callsrunProgram; see what calls what - CLI → commands, runners and the choice of host in
src/cli/, the only layer that imports both the TUI and headless, each through its entry.bin.tschecks the Node version and loadsmain.ts, which imports the CLI through its entry,@cli(src/cli/index.ts); see src/cli/README.md - Layers → one tsconfig project per layer folder, on TypeScript project
references, and
pnpm typecheckistsc -b. A project'sreferencesname the layers it may import, so importing a file of any other fails with TS6307. Outside the TUI,ink,react,@inkjs/uiandink-testing-libraryresolve to a fence that fails every import form. ESLint rules inpnpm lintclose the paths the compiler can't see: a relative import that leaves its layer's folder and a deep alias outside its own layer; a.tsbuild/ornode_modules/path in an import, re-export,import()ortypeof import(); any import ofmoduleornode:module; a barerequire; and triple-slashpathreferences; see layer boundaries and import aliases. Code outside a layer imports it only through its public entries. Each layer's tests sit in its project, so a test deep-imports only its own layer and mocks another through its entry, except that it may mock a service's internal module by its@services/*path.
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.
- 14d ago Changed · +8 lines · +141 tokens per session 48d6f61dde40
- 1mo ago Changed · +1 tokens per session 4b51ccb6bc8a
- 1mo ago Changed · +67 lines · +1,361 tokens per session be4356f2558c
- 1mo ago Changed a720cdae7521
- 1mo ago Changed · +3 lines · +63 tokens per session 4048f3beb659
- 1mo ago Changed · +9 lines · +173 tokens per session d68f02741436
- 1mo ago Changed · -3 tokens per session 1911ab16c1d0
- 1mo ago Changed · +9 lines · +110 tokens per session dfaa98ad0826
- 1mo ago Changed · +49 lines · +477 tokens per session 417ebd359dbe
- 2mo ago First seen · 170 lines · 2,353 tokens per session scan A 31101ad0e0b8
wizard AGENTS.md is an instructions file published in the GitHub repository PostHog/wizard (201 stars, last pushed yesterday), licensed MIT. It adds 4,676 tokens to every session, about $0.0187 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-08-30.
wizard AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| wizard AGENTS.mdPostHog/wizard | Instructions file | 201 | yesterday | MIT | A | 4,676 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |