/posthog-all:omnibus-instrument-llm-analyticsfrom posthog-all
Adds PostHog LLM analytics to trace AI model usage with token counts, latency, and costs. Handles initial PostHog SDK setup if needed. Supports major providers and frameworks.
Ships in posthog-all. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to add PostHog LLM analytics that trace AI model usage in new or changed code. Use it after implementing LLM features or reviewing PRs to ensure all generations are captured with token counts, latency, and costs. If PostHog is not yet installed, this skill also covers initial SDK setup. Supports any provider or framework.
Supported providers: OpenAI, Azure OpenAI, Anthropic, Google, Cohere, Mistral, Perplexity, DeepSeek, Groq, Together AI, Fireworks AI, xAI, Cerebras, Hugging Face, Ollama, OpenRouter.
Supported frameworks: LangChain, LlamaIndex, CrewAI, AutoGen, DSPy, LangGraph, Pydantic AI, Vercel AI, LiteLLM, Instructor, Semantic Kernel, Mirascope, Mastra, SmolAgents, OpenAI Agents.
Proxy/gateway: Portkey, Helicone.
Follow these steps IN ORDER:
STEP 1: Analyze the codebase and detect the LLM stack.
STEP 2: Research instrumentation. (Skip if PostHog LLM tracing is already set up.) 2.1. Find the reference file below that matches the detected provider or framework — it is the source of truth for callback setup, middleware configuration, and event capture. Read it now. 2.2. If no reference matches, use manual-capture.md as a fallback — it covers the generic event capture approach that works with any provider.
STEP 3: Install the PostHog SDK. (Skip if PostHog is already set up.)
STEP 4: Add LLM tracing.
STEP 5: Link to users.
STEP 6: Set up environment variables.
references/openai.md - Openai llm analytics installation - docsreferences/azure-openai.md - Azure openai llm analytics installation - docsreferences/anthropic.md - Anthropic llm analytics installation - docsreferences/google.md - Google llm analytics installation - docsreferences/cohere.md - Cohere llm analytics installation - docsreferences/mistral.md - Mistral llm analytics installation - docsreferences/perplexity.md - Perplexity llm analytics installation - docsreferences/deepseek.md - Deepseek llm analytics installation - docsreferences/groq.md - Groq llm analytics installation - docsreferences/together-ai.md - Together ai llm analytics installation - docsreferences/fireworks-ai.md - Fireworks ai llm analytics installation - docsreferences/xai.md - Xai llm analytics installation - docsreferences/cerebras.md - Cerebras llm analytics installation - docsreferences/hugging-face.md - Hugging face llm analytics installation - docsreferences/ollama.md - Ollama llm analytics installation - docsreferences/openrouter.md - Openrouter llm analytics installation - docsreferences/langchain.md - Langchain llm analytics installation - docsreferences/llamaindex.md - Llamaindex llm analytics installation - docsreferences/crewai.md - Crewai llm analytics installation - docsreferences/autogen.md - Autogen llm analytics installation - docsreferences/dspy.md - Dspy llm analytics installation - docsreferences/langgraph.md - Langgraph llm analytics installation - docsreferences/pydantic-ai.md - Pydantic ai llm analytics installation - docsreferences/vercel-ai.md - Vercel ai SDK llm analytics installation - docsreferences/litellm.md - Litellm llm analytics installation - docsreferences/instructor.md - Instructor llm analytics installation - docsreferences/semantic-kernel.md - Semantic kernel llm analytics installation - docsreferences/mirascope.md - Mirascope llm analytics installation - docsreferences/mastra.md - Mastra llm analytics installation - docsreferences/smolagents.md - Smolagents llm analytics installation - docsreferences/openai-agents.md - Openai agents SDK llm analytics installation - docsreferences/portkey.md - Portkey llm analytics installation - docsreferences/helicone.md - Helicone llm analytics installation - docsreferences/manual-capture.md - Manual capture llm analytics installation - docsreferences/basics.md - Llm analytics basics - docsreferences/traces.md - Traces - docsreferences/calculating-costs.md - Calculating llm costs - docsEach provider reference contains installation instructions, SDK setup, and code examples specific to that provider or framework. Find the reference that matches the user's stack.
If the user's provider isn't listed, use manual-capture.md as a fallback — it covers the generic event capture approach that works with any provider.
references/anthropic.md (opens in a new tab)references/autogen.md (opens in a new tab)references/azure-openai.md (opens in a new tab)references/basics.md (opens in a new tab)references/calculating-costs.md (opens in a new tab)references/cerebras.md (opens in a new tab)references/cohere.md (opens in a new tab)references/crewai.md (opens in a new tab)references/deepseek.md (opens in a new tab)references/dspy.md (opens in a new tab)references/fireworks-ai.md (opens in a new tab)references/google.md (opens in a new tab)references/groq.md (opens in a new tab)references/helicone.md (opens in a new tab)references/hugging-face.md (opens in a new tab)references/instructor.md (opens in a new tab)references/langchain.md (opens in a new tab)references/langgraph.md (opens in a new tab)references/litellm.md (opens in a new tab)references/llamaindex.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
79 skills in this plugin
/error-tracking-androidPostHog error tracking for Android/error-tracking-angularPostHog error tracking for Angular/error-tracking-flutterPostHog error tracking for Flutter/error-tracking-goPostHog error tracking for Go/error-tracking-honoPostHog error tracking for Hono/error-tracking-nextjsPostHog error tracking for Next.jsposthog@bokendell-skills is listed by aaronkendell/skills-marketplace — review the source before installing
npx claudepluginhub aaronkendell/skills-marketplace --plugin posthogOther plugins' skills for the same job