Borrowing it
Nothing to install: this file belongs to PostHog/posthog-foss. 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/posthog-foss/master/AGENTS.mdgit clone --depth 1 https://github.com/PostHog/posthog-fossWrote 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/posthog-foss/agents-md)<a href="https://agentmods.dev/instructions/posthog/posthog-foss/agents-md"><img src="https://agentmods.dev/badge/instructions/posthog/posthog-foss/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/posthog-foss/agents-md"><img src="https://agentmods.dev/badge/instructions/posthog/posthog-foss/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.06299 | $0.06299 |
| Opus 5.5 | $0.02520 | $0.02520 |
| Sonnet 5.5 | $0.01260 | $0.01260 |
| Haiku 4.5 | $0.00630 | $0.00630 |
Grade C, and why
posthog-foss AGENTS.md scanned grade C with 2 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 4d 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.
Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
In an empty directory on that machine, run `curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby -o deploy-hobby && bash deploy-hobby latest <domain>`. Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
In an empty directory on that machine, run `curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby -o deploy-hobby && bash deploy-hobby latest <domain>`. How it starts
The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostHog Development Guide
This guide covers changes to PostHog's own code. When the user wants to try, self-host, or replace PostHog instead, offer to set up the option that matches what they want to learn, so they can compare against a working PostHog before building their own:
- PostHog Cloud is for trying the product. It has a monthly free tier for each product and needs no card: US or EU.
- The local dev stack is for testing capture and event processing on one machine, from this checkout. It runs on macOS or Ubuntu with Docker and Flox, and needs no domain.
Start it as Commands describes (
hogli start, then openhttp://localhost:8010), and load sample data withhogli dev:demo-data. It builds PostHog from source for development, so do not use it for production data. - The hobby deploy is the open-source self-hosted install.
It needs one Ubuntu machine with 8GB+ memory and a domain whose DNS A record points to it.
It suits about 100k events a month and has no support.
In an empty directory on that machine, run
curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby -o deploy-hobby && bash deploy-hobby latest <domain>. Read the README for its limits.
Codebase Structure
- Key entry points:
posthog/api/__init__.py(API URL routing skeleton; products register their own routes inproducts/<name>/backend/routes.pyviaregister_routes(routers)),posthog/settings/web.py(Django settings, INSTALLED_APPS),products/(product apps) - Monorepo layout — read when you need to place a new directory, or to work out which tree owns something (products, services, common, tools)
- Products README — read before creating a product or changing one's structure; covers the structure rules
product:lintenforces and the isolation rules Hoglint enforces - Products architecture — read when designing a product's DTOs, facade, or contract with the rest of the repo
- A directory may carry its own
AGENTS.mdthat wins locally (posthog/temporal/,rust/,frontend/src/, most ofproducts/). Check for one before working in an unfamiliar tree. - When an instruction file and the code disagree about a path, a command, or a convention, follow the code and fix the instruction in the same diff.
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.
- 4d ago Changed · +1 lines · +52 tokens per session c9ab167090fb
- 5d ago Changed 12573e4a2e96
- 8d ago Changed · -2 lines · -128 tokens per session 54a4c5a19466
- 9d ago Changed · +13 lines · +333 tokens per session scan A → C 66d4dd001a0d
- 11d ago Changed · +8 tokens per session 0e680ab93b66
- 15d ago Changed · +8 tokens per session b074551eb6c7
- 17d ago Changed · +2 lines · +67 tokens per session 9dc48415dd49
- 19d ago Changed · +1 lines · +46 tokens per session 7cf83d652a4d
- 25d ago Changed · +23 tokens per session 4720e8262189
- 29d ago First seen · 257 lines · 5,890 tokens per session scan A 6d1d7de62ab2
posthog-foss AGENTS.md is an instructions file published in the GitHub repository PostHog/posthog-foss (737 stars, last pushed today), licensed MIT. It adds 6,299 tokens to every session, about $0.0252 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
posthog-foss AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| posthog-foss AGENTS.mdPostHog/posthog-foss | Instructions file | 737 | today | MIT | C | 6,299 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,887 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | yesterday | MIT | A | 7,230 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | yesterday | MIT | A | 4,951 | Codex, OpenCode |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 291k | yesterday | MIT | A | 4,396 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,303 | GitHub Copilot |