implementing-agent-modes
Guidelines to create/update a new mode for PostHog AI agent. Modes are a way to limit what tools, prompts, and prompt injections are applied and under what conditions. Achieve better results using your plan mode.
Install
git clone https://github.com/PostHog/posthog /tmp/posthog && ln -s /tmp/posthog/.agents/skills/implementing-agent-modes ~/.claude/skills/implementing-agent-modes
From README
Agent modes Use the steps below to plan or implement a new mode. A mode is a way to manage the context of the agent and inject tools, prompts, and mode-related behavior relevant to a product, use case, JTBD, etc. The agent has the switchmode tool that allows it to switch itself to another mode, which might change tools, prompt, and executables, preserving the current context. Some previously created tools are contextual, meaning they're injected on particular pages of the frontend. The modes change the approach and always have tools in the mode context. Determine mode name Explore the ee/hogai/core/agentmodes/presets directory and check if there are already modes that match the user's intent. If you want to create a new mode, you should scope it by a PostHog product (Product analytics), product area (SQL), or agent (Instrumentation agent).
More from this repo
react-doctor
Diagnose and fix React codebase health issues.
debugging-ci-failures
Debugs failing GitHub Actions CI runs for PostHog PRs, commits, and branches, and answers broad CI-health questions...
diagnosing-failed-warehouse-syncs
Diagnose why a data warehouse sync is failing and recommend the right recovery action.
