Agent skill · Workflow & Productivity

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill implementing-agent-modes --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/agent/implementing-agent-modes/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 `switch_mode` 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/agent_modes/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). ## (optionally) Create a new mode in schema Add a new AgentMode to `frontend/src/queries/schema/schema-assistant-messages.ts` and regenerate the schema using: ```bash hogli build:schema ``` Alternatively, you may use this command: ```bash pnpm run schema:build ``` ## Create or update mode's scaffolding A mode should typically contain a

What's inside
Steps it walks through
  1. Determine mode name
  2. (optionally) Create a new mode in schema
  3. Create or update mode's scaffolding
  4. Adding tools to the mode
  5. Review the default toolkit
  6. Write JTBD-like trajectory examples
  7. Implement frontend
  8. Example
  9. Add feature flag
  10. Implement and update tests
Ships with 1 file
  • metadata.json
Commands it runs
hogli build:schema
pnpm run schema:build
More from claude-skill-registry
All skills →
About this skill
What does the implementing-agent-modes skill do?

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.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill implementing-agent-modes --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going