Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/kunanonj-cursor-plugin-posthog-instrument-logs/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 99% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 36% | 0% |
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 API key instead.https://us.i.posthog.com for US Cloud or https://eu.i.posthog.com for EU Cloud.https://us.i.posthog.com/v1 (US) or https://eu.i.posthog.com/v1 (EU).references/nextjs.md - Next.js logs installation - docsreferences/nodejs.md - Node.js logs installation - docsreferences/python.md - Python logs installation - docsreferences/go.md - Go logs installation - docsreferences/java.md - Java logs installation - docsreferences/datadog.md - Datadog logs installation - docsreferences/android.md - Android logs installation - docsreferences/react-native.md - React native logs installation - docsreferences/ios.md - Ios logs installation - docsreferences/other.md - Other languages logs installation - docsreferences/start-here.md - Getting started with logs - docsreferences/search.md - Search logs - docsreferences/best-practices.md - Logging best practices - docsreferences/troubleshooting.md - Logs troubleshooting - docsreferences/link-session-replay.md - Link session replay - docsreferences/debug-logs-mcp.md - Debug logs with mcp - docsEach platform reference contains specific OTLP configuration, SDK setup, and integration patterns. Find the one matching the user's stack.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | fail→pass | 12,772 | 9,720 | -24% | 1 | 1 | 0% | 2,098 | 3,077 | +47% | 0 | 0 | — |
case-05 | pass→pass | 12,952 | 11,535 | -11% | 1 | 1 | 0% | 2,266 | 3,169 | +40% | 0 | 0 | — |
case-06 | pass→pass | 12,861 | 5,544 | -57% | 1 | 1 | 0% | 2,592 | 2,596 | +0% | 0 | 0 | — |
case-07 | pass→pass | 13,538 | 5,059 | -63% | 1 | 1 | 0% | 2,518 | 2,435 | -3% | 0 | 0 | — |
case-01 | fail→fail | 17,982 | 2,971 | -83% | 1 | 1 | 0% | 3,606 | 1,565 | -57% | 0 | 0 | — |
case-02 | fail→fail | 20,130 | 2,690 | -87% | 1 | 1 | 0% | 4,683 | 1,576 | -66% | 0 | 0 | — |
case-03 | fail→pass | 16,097 | 14,200 | -12% | 1 | 1 | 0% | 3,029 | 3,871 | +28% | 0 | 0 | — |
case-08 | pass→fail | 13,312 | 3,979 | -70% | 1 | 1 | 0% | 2,879 | 1,804 | -37% | 0 | 0 | — |
case-09 | fail→pass | 5,807 | 4,721 | -19% | 1 | 1 | 0% | 1,196 | 2,381 | +99% | 0 | 0 | — |
case-10 | fail→pass | 6,973 | 2,779 | -60% | 1 | 1 | 0% | 1,307 | 1,884 | +44% | 0 | 0 | — |
case-11 | pass→pass | 9,413 | 10,290 | +9% | 1 | 1 | 0% | 1,974 | 3,754 | +90% | 0 | 0 | — |
case-20 | pass→fail | 11,592 | 4,003 | -65% | 1 | 1 | 0% | 2,380 | 1,758 | -26% | 0 | 0 | — |
case-12 | pass→pass | 6,119 | 4,291 | -30% | 1 | 1 | 0% | 1,219 | 2,241 | +84% | 0 | 0 | — |
case-13 | fail→pass | 8,093 | 3,798 | -53% | 1 | 1 | 0% | 1,556 | 2,116 | +36% | 0 | 0 | — |
case-14 | fail→pass | 12,900 | 3,997 | -69% | 1 | 1 | 0% | 2,261 | 2,142 | -5% | 0 | 0 | — |
case-15 | fail→fail | 12,888 | 6,650 | -48% | 1 | 1 | 0% | 2,827 | 2,982 | +5% | 0 | 0 | — |
case-21 | pass→pass | 8,404 | 8,705 | +4% | 1 | 1 | 0% | 1,858 | 2,990 | +61% | 0 | 0 | — |
case-16 | pass→pass | 9,965 | 5,461 | -45% | 1 | 1 | 0% | 1,801 | 2,558 | +42% | 0 | 0 | — |
case-17 | pass→pass | 11,652 | 4,662 | -60% | 1 | 1 | 0% | 2,251 | 2,335 | +4% | 0 | 0 | — |
case-18 | pass→pass | 5,062 | 2,683 | -47% | 1 | 1 | 0% | 1,025 | 2,004 | +96% | 0 | 0 | — |
case-19 | pass→pass | 10,933 | 7,813 | -29% | 1 | 1 | 0% | 2,218 | 3,015 | +36% | 0 | 0 | — |
case-22 | pass→fail | 10,271 | 4,011 | -61% | 1 | 1 | 0% | 2,077 | 1,681 | -19% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 17 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.