🌾 Context mill
Contents
The context mill packages PostHog knowledge for AI agents. It turns docs, prompts, and example apps into skills that the wizard, the PostHog MCP server, and the AI plugin load.

What goes in the context mill
Knowledge about PostHog goes in the context mill. Code that runs the agent goes in the wizard.
| Repo | What goes there |
|---|---|
| Context mill | Skills, agent prompts, example apps, and the cli: blocks that make skills into commands |
| Wizard | The agent, programs, TUI, CLI, and any new top-level command |
| Warlock | Security rules that scan what the agent writes |
If a change touches both repos, ship the context mill PR first.
How a skill gets built
- Sourcing. A skill pulls docs from posthog.com as Markdown, plus hand-written prompts and example apps.
- Assembly. The build packages each skill into a ZIP, and writes menus that list every skill and command.
- Delivery. A release publishes the ZIPs and menus to GitHub, with a mirror at
context-mill.posthog.com.
A skill can be docs only. Some docs pages already hold everything an agent needs, so the skill just points at them, like the logs skill.
Each skill is a folder in context/skills/ with a config.yaml. Expect to iterate on a skill until the wizard's output looks right.
Orchestrator flows
Some programs run as an orchestrator flow instead of one long conversation. Each flow is a folder in context/agents/. Every file in it is one task, with the model and effort it runs at, and a dependsOn field that says which tasks must finish first. A planner, the seed, starts the flow. Tasks with nothing left to wait on run in parallel, each as a focused conversation with only the skills and tools it needs.
This is the replay vision flow:

To see every flow, run this in the context mill repo. It writes the page to your temp folder and opens it in a browser.
Releases reach users right away
The wizard always loads the latest context mill release. When a release merges, every wizard run uses it right away. Test a skill change in the workbench before you merge it.
Who owns which skill
Each product team owns the skills for its product. The Wizard & Docs Team
Wizard & Docs Team owns the build and every skill without a product owner.
Skills in context/skills/ | Owner |
|---|---|
integration, integration-v2 | |
migrate, audit, audit-*, events-audit | |
error-tracking, error-tracking-upload-source-maps, error-tracking-link-releases | |
revenue-analytics, web-analytics | |
data-warehouse-source | |
self-driving | |
mcp-analytics | |
metrics | |
replay-vision, replay-vision-* | |
ai-observability, llm-analytics | |
Every other skill, like feature-flags, logs, and tracing |
CODEOWNERS requests reviews from these owners.
Future work
The context mill is a band-aid. We built it when it was unclear where skills should live, and what context would still be useful for humans if everyone codes with agents. The goal is to retire it, so the docs themselves package cleanly into skills.











