implementing-agent-modes

Create and update agent modes for the PostHog AI agent.

37.6k|3.2k|Updated Jan 23, 2020
One-click install
npx skills add https://github.com/PostHog/posthog --skill implementing-agent-modes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-agent-modes
Source: https://github.com/PostHog/posthog/tree/main/.claude/skills/implementing-agent-modes
Command: npx skills add https://github.com/PostHog/posthog --skill implementing-agent-modes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

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.

Core Features & Use Cases

  • Mode naming and scoping guidance for PostHog AI agent modes.
  • Scaffolding guidance: AgentToolkit, AgentModeDefinition, and schema integration.
  • JTBD trajectory examples and frontend/backend integration guidelines.
  • Best practices for tool inclusion, prompt management, and feature flags.

Quick Start

Determine the mode name from the preset catalog, create or update a new AgentMode in the frontend schema, scaffold with toolkit and executables, add tools, write trajectory examples, implement frontend changes, enable the feature flag, and run tests.

Frequently Asked Questions about implementing-agent-modes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are agent modes in PostHog AI and when do I need to create one?

Agent modes in PostHog AI limit what tools, prompts, and prompt injections are applied under specific conditions. You need to create a new mode to achieve better, scoped results for distinct product analytics workflows.

How do I scaffold a new agent mode for PostHog AI?

To scaffold a PostHog AI agent mode, create or update an AgentMode in the frontend schema, scaffold the AgentToolkit and AgentModeDefinition, add tools, write trajectory examples, implement frontend changes, enable the feature flag, and run tests.

How do I scope tools and prompts for PostHog AI agent modes?

Scoping tools and prompts for PostHog AI agent modes involves using the preset catalog to determine the mode name, then defining mode-specific behavior through the AgentToolkit and AgentModeDefinition to restrict tool inclusion and prompt injections.

Do I need feature flags to deploy PostHog AI agent modes?

Yes, you need feature flags to deploy PostHog AI agent modes. Enabling the mode-specific feature flag is a required step in the integration workflow to safely roll out and test the new agent behavior.

How do I write trajectory examples for PostHog AI agent modes?

Writing trajectory examples for PostHog AI agent modes involves defining expected job-to-be-done (JTBD) scenarios that guide the agent's behavior. These examples are integrated into the mode definition to establish predictable workflow trajectories.

What are the limitations when updating a PostHog AI agent mode?

Limitations when updating a PostHog AI agent mode include ensuring the frontend schema and AgentToolkit are correctly extended without breaking existing workflows. Mode-specific behavior must be thoroughly tested with feature flags before full deployment.