
implementing-agent-modes
Guidelines to create/update a new mode for PostHog AI agent
by posthogFree
Description
implementing-agent-modes is an agent skill from the PostHog repository that gives contributors the steps for creating or updating a mode for PostHog's AI agent. A mode manages the context the agent works in: it decides which tools, prompts and mode-specific behavior apply for a product, a use case or a job to be done. The agent has a switch_mode tool that lets it move into another mode, which can change its tools and prompt while keeping the current context, and some tools are contextual, appearing only on certain pages of the frontend. The skill begins by determining the mode's name. Before creating one, the contributor should check the presets directory in the codebase for an existing mode that fits, and a new mode should be scoped to a PostHog product such as product analytics, a product area such as SQL, or an agent such as the instrumentation agent. If a new mode needs a schema entry, the skill directs the contributor to add an AgentMode to the schema file for assistant messages and regenerate the schema with the project's build command. The skill is for engineers working inside the PostHog codebase, and it applies to planning or implementing a mode. Changes to the agent's tools and prompts affect what it can do, so they should be reviewed and tested before they reach users. The skill is installed with the skills CLI from the posthog/posthog repository. Its skills.sh page showed about 2.6K installs and passing results from three security audits at the time of the scan.…
Highlights
- Steps for creating or updating an agent mode
- Mode controls tools, prompts and behavior
- switch_mode tool and contextual tools explained
- Checks existing presets before adding a mode
- Schema update and regeneration steps
- Installs with the skills CLI
Ratings & Reviews
No ratings yet
Be the first to rate implementing-agent-modes.
People also visit

write-agentmemory-skill
The house format and rules for writing or updating an agentmemory skill
implementing-agent-modes FAQ
What is an agent mode?
A way to manage the agent's context, injecting the tools, prompts and behavior that suit a product, use case or job.
Who is it for?
Contributors working on PostHog's AI agent inside the PostHog codebase.
How should a new mode be scoped?
By a PostHog product, a product area such as SQL, or an agent such as the instrumentation agent.
What if a new schema entry is needed?
The skill says to add an AgentMode to the assistant messages schema and regenerate it with the project's build command.
How do I install it?
Run npx skills add https://github.com/posthog/posthog --skill implementing-agent-modes.
What security audits does it have?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.
What are the best implementing-agent-modes alternatives?
Popular alternatives to implementing-agent-modes include agent-governance, agentic-eval and copilot-sdk. See all implementing-agent-modes alternatives





