Omnibus
Skill 80 of 200
Add PostHog log capture to track application logs. Use after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties.
3 minutes · 763 words · 4 sections
Install
npx skills add PostHog/skills --skill instrument-logsnpx skills add PostHog/skills/plugin marketplace add PostHog/skillsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Use this skill to add PostHog log capture for new or changed code. Use it after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. If PostHog log export is not yet configured, this skill also covers initial OTLP exporter setup. Supports any platform or language.
Supported platforms: Next.js, Node.js, Python, Go, Java, Datadog, Android, React Native, iOS, and any language via OpenTelemetry.
Follow these steps IN ORDER:
STEP 1: Analyze the codebase and detect the platform.
STEP 2: Research log capture. (Skip if PostHog log export is already configured.) 2.1. Find the reference file below that matches the detected platform — it is the source of truth for OTLP exporter configuration and integration with existing logging. Read it now. 2.2. If no reference matches, use the “Other Languages” reference as a fallback — it covers the generic OpenTelemetry approach.
STEP 3: Install dependencies. (Skip if PostHog log export is already configured.)
STEP 4: Configure the OTLP exporter. (Skip if PostHog log export is already configured.)
STEP 5: Integrate with existing logging.
STEP 6: Add structured properties.
STEP 7: Set up environment variables.
.env, .env.local, or framework-specific env files). If valid values already exist, skip this step.projects-get tool to retrieve the project’s api_token. If multiple projects are returned, ask the user which project to use. If the MCP server is not connected or not authenticated, ask the user for their PostHog project token instead.projects-get MCP response for a region field — US maps to https://us.i.posthog.com, EU maps to https://eu.i.posthog.com. If the region is not available from the MCP response or from existing project configuration, ask the user: “Are you on PostHog US Cloud or EU Cloud?” Do not assume US Cloud.https://us.i.posthog.com/v1 (US) or https://eu.i.posthog.com/v1 (EU), matching the region determined above.references/nextjs.md - Next.js logs installationreferences/nodejs.md - Node.js logs installationreferences/python.md - Python logs installationreferences/go.md - Go logs installationreferences/java.md - Java logs installationreferences/datadog.md - Datadog logs installationreferences/android.md - Android logs installationreferences/react-native.md - React native logs installationreferences/ios.md - Ios logs installationreferences/flutter.md - Flutter logs installationreferences/other.md - Other languages logs installationreferences/start-here.md - Getting started with logsreferences/search.md - Search logsreferences/best-practices.md - Logging best practicesreferences/troubleshooting.md - Logs troubleshootingreferences/link-session-replay.md - Link session replayreferences/mcp.md - Use logs over PostHog mcpreferences/COMMANDMENTS.md - Framework-specific rules the integration must followEach platform reference contains specific OTLP configuration, SDK setup, and integration patterns. Find the one matching the user’s stack.
Add PostHog log capture to track application logs. Use after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. Also handles initial OTLP exporter setup if not yet configured.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: skills/omnibus/*/SKILL.md, skills/posthog/all/skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by PostHog, declaring 6 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./PostHog/skills.md, and each skill at its own .md URL.18 files · 133 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 80.
Documentation the agent loads on demand, rather than up front.