[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-instrument-logs":3,"mdc-6bbxbi-key":38,"related-org-posthog-instrument-logs":602,"related-repo-posthog-instrument-logs":775},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":33,"sourceUrl":36,"mdContent":37},"instrument-logs","instrument applications with PostHog log capture","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.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,16,19,20],{"name":13,"slug":14,"type":15},"Observability","observability","tag",{"name":17,"slug":18,"type":15},"Logs","logs",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"Integrations","integrations",59,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fai-plugin","2026-07-28T05:33:39.517469",null,11,[29,30,31,32],"claude-code-plugin","codex-plugin","cursor-plugin","gemini-cli-extension",{"repoUrl":24,"stars":23,"forks":27,"topics":34,"description":35},[29,30,31,32],"Official PostHog plugin for Claude Code, Cursor, Gemini, Codex and other AI coding tools","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fai-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Finstrument-logs","---\nname: instrument-logs\ndescription: >-\n  Add PostHog log capture to track application logs. Use after implementing\n  features or reviewing PRs to ensure meaningful log events are captured with\n  structured properties. Also handles initial OTLP exporter setup if not yet\n  configured.\nmetadata:\n  author: PostHog\n---\n\n# Add PostHog log capture\n\nUse 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.\n\nSupported platforms: Next.js, Node.js, Python, Go, Java, Datadog, Android, React Native, iOS, and any language via OpenTelemetry.\n\n## Instructions\n\nFollow these steps IN ORDER:\n\nSTEP 1: Analyze the codebase and detect the platform.\n  - Detect the language, framework, and existing logging setup.\n  - Look for dependency files and project files (package.json, Podfile, Package.swift, requirements.txt, go.mod, pom.xml, etc.).\n  - Look for log libraries (winston, pino, logging module, logrus, log4j, serilog, os_log, Logger, etc.).\n  - Look for lockfiles (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb, go.sum, Podfile.lock, Package.resolved, etc.) to determine the package manager.\n  - Check for existing PostHog log export setup. If the OTLP exporter is already configured, skip to STEP 5 to add log capture for new code.\n\nSTEP 2: Research log capture. (Skip if PostHog log export is already configured.)\n  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.\n  2.2. If no reference matches, use the \"Other Languages\" reference as a fallback — it covers the generic OpenTelemetry approach.\n\nSTEP 3: Install dependencies. (Skip if PostHog log export is already configured.)\n  - Install the OpenTelemetry SDK and OTLP exporter packages for the detected platform.\n  - Do not manually edit dependency files — use the package manager's install command.\n\nSTEP 4: Configure the OTLP exporter. (Skip if PostHog log export is already configured.)\n  - PostHog logs use the OpenTelemetry protocol. Set up an OTLP exporter pointed at PostHog's ingest endpoint.\n  - For SDK-native log support such as Android, React Native, and iOS, follow the platform reference instead of adding a separate OTLP exporter.\n  - Follow the platform-specific reference for the exact configuration.\n\nSTEP 5: Integrate with existing logging.\n  - Add the PostHog log exporter alongside existing logging. Don't replace existing log handlers or outputs.\n  - Do not alter the fundamental architecture of existing files. Make additions minimal and targeted.\n  - You must read a file immediately before attempting to write it.\n\nSTEP 6: Add structured properties.\n  - Ensure logs include structured key-value properties for filtering and search in PostHog.\n  - Prefer structured log formats with key-value properties over plain text messages.\n\nSTEP 7: Set up environment variables.\n  - Check if the project already has PostHog environment variables configured (e.g. in `.env`, `.env.local`, or framework-specific env files). If valid values already exist, skip this step.\n  - If the PostHog project token is missing, use the PostHog MCP server's `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.\n  - For the PostHog host URL: check the `projects-get` MCP response for a `region` field — `US` maps to `https:\u002F\u002Fus.i.posthog.com`, `EU` maps to `https:\u002F\u002Feu.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.\n  - For the OpenTelemetry endpoint, use `https:\u002F\u002Fus.i.posthog.com\u002Fv1` (US) or `https:\u002F\u002Feu.i.posthog.com\u002Fv1` (EU), matching the region determined above.\n  - Write these values to the appropriate env file using the framework's naming convention.\n  - Reference these environment variables in code instead of hardcoding them.\n\n## Reference files\n\n- `references\u002Fnextjs.md` - Next.js logs installation - docs\n- `references\u002Fnodejs.md` - Node.js logs installation - docs\n- `references\u002Fpython.md` - Python logs installation - docs\n- `references\u002Fgo.md` - Go logs installation - docs\n- `references\u002Fjava.md` - Java logs installation - docs\n- `references\u002Fdatadog.md` - Datadog logs installation - docs\n- `references\u002Fandroid.md` - Android logs installation - docs\n- `references\u002Freact-native.md` - React native logs installation - docs\n- `references\u002Fios.md` - Ios logs installation - docs\n- `references\u002Fflutter.md` - Flutter logs installation - docs\n- `references\u002Fother.md` - Other languages logs installation - docs\n- `references\u002Fstart-here.md` - Getting started with logs - docs\n- `references\u002Fsearch.md` - Search logs - docs\n- `references\u002Fbest-practices.md` - Logging best practices - docs\n- `references\u002Ftroubleshooting.md` - Logs troubleshooting - docs\n- `references\u002Flink-session-replay.md` - Link session replay - docs\n- `references\u002Fdebug-logs-mcp.md` - Debug logs with mcp - docs\n- `references\u002FCOMMANDMENTS.md` - Framework-specific rules the integration must follow\n\nEach platform reference contains specific OTLP configuration, SDK setup, and integration patterns. Find the one matching the user's stack.\n\n## Key principles\n\n- **Environment variables**: Always use environment variables for PostHog keys and OpenTelemetry endpoints. Never hardcode them.\n- **Minimal changes**: Add log export alongside existing logging. Don't replace or restructure existing logging code.\n- **OpenTelemetry**: PostHog logs use the OpenTelemetry protocol. Configure an OTLP exporter pointed at PostHog's ingest endpoint unless the platform SDK provides native log capture.\n- **SDK-native logs**: For Android, React Native, and iOS, use the SDK logger\u002Fcapture APIs from the platform reference instead of adding a separate OTLP exporter.\n- **Structured logging**: Prefer structured log formats with key-value properties over plain text messages.",{"data":39,"body":41},{"name":4,"description":6,"metadata":40},{"author":9},{"type":42,"children":43},"root",[44,53,59,64,71,76,81,111,116,121,134,139,157,162,180,185,198,203,330,336,537,542,548],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"add-posthog-log-capture",[50],{"type":51,"value":52},"text","Add PostHog log capture",{"type":45,"tag":54,"props":55,"children":56},"p",{},[57],{"type":51,"value":58},"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.",{"type":45,"tag":54,"props":60,"children":61},{},[62],{"type":51,"value":63},"Supported platforms: Next.js, Node.js, Python, Go, Java, Datadog, Android, React Native, iOS, and any language via OpenTelemetry.",{"type":45,"tag":65,"props":66,"children":68},"h2",{"id":67},"instructions",[69],{"type":51,"value":70},"Instructions",{"type":45,"tag":54,"props":72,"children":73},{},[74],{"type":51,"value":75},"Follow these steps IN ORDER:",{"type":45,"tag":54,"props":77,"children":78},{},[79],{"type":51,"value":80},"STEP 1: Analyze the codebase and detect the platform.",{"type":45,"tag":82,"props":83,"children":84},"ul",{},[85,91,96,101,106],{"type":45,"tag":86,"props":87,"children":88},"li",{},[89],{"type":51,"value":90},"Detect the language, framework, and existing logging setup.",{"type":45,"tag":86,"props":92,"children":93},{},[94],{"type":51,"value":95},"Look for dependency files and project files (package.json, Podfile, Package.swift, requirements.txt, go.mod, pom.xml, etc.).",{"type":45,"tag":86,"props":97,"children":98},{},[99],{"type":51,"value":100},"Look for log libraries (winston, pino, logging module, logrus, log4j, serilog, os_log, Logger, etc.).",{"type":45,"tag":86,"props":102,"children":103},{},[104],{"type":51,"value":105},"Look for lockfiles (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb, go.sum, Podfile.lock, Package.resolved, etc.) to determine the package manager.",{"type":45,"tag":86,"props":107,"children":108},{},[109],{"type":51,"value":110},"Check for existing PostHog log export setup. If the OTLP exporter is already configured, skip to STEP 5 to add log capture for new code.",{"type":45,"tag":54,"props":112,"children":113},{},[114],{"type":51,"value":115},"STEP 2: Research log capture. (Skip if PostHog log export is already configured.)\n2.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.\n2.2. If no reference matches, use the \"Other Languages\" reference as a fallback — it covers the generic OpenTelemetry approach.",{"type":45,"tag":54,"props":117,"children":118},{},[119],{"type":51,"value":120},"STEP 3: Install dependencies. (Skip if PostHog log export is already configured.)",{"type":45,"tag":82,"props":122,"children":123},{},[124,129],{"type":45,"tag":86,"props":125,"children":126},{},[127],{"type":51,"value":128},"Install the OpenTelemetry SDK and OTLP exporter packages for the detected platform.",{"type":45,"tag":86,"props":130,"children":131},{},[132],{"type":51,"value":133},"Do not manually edit dependency files — use the package manager's install command.",{"type":45,"tag":54,"props":135,"children":136},{},[137],{"type":51,"value":138},"STEP 4: Configure the OTLP exporter. (Skip if PostHog log export is already configured.)",{"type":45,"tag":82,"props":140,"children":141},{},[142,147,152],{"type":45,"tag":86,"props":143,"children":144},{},[145],{"type":51,"value":146},"PostHog logs use the OpenTelemetry protocol. Set up an OTLP exporter pointed at PostHog's ingest endpoint.",{"type":45,"tag":86,"props":148,"children":149},{},[150],{"type":51,"value":151},"For SDK-native log support such as Android, React Native, and iOS, follow the platform reference instead of adding a separate OTLP exporter.",{"type":45,"tag":86,"props":153,"children":154},{},[155],{"type":51,"value":156},"Follow the platform-specific reference for the exact configuration.",{"type":45,"tag":54,"props":158,"children":159},{},[160],{"type":51,"value":161},"STEP 5: Integrate with existing logging.",{"type":45,"tag":82,"props":163,"children":164},{},[165,170,175],{"type":45,"tag":86,"props":166,"children":167},{},[168],{"type":51,"value":169},"Add the PostHog log exporter alongside existing logging. Don't replace existing log handlers or outputs.",{"type":45,"tag":86,"props":171,"children":172},{},[173],{"type":51,"value":174},"Do not alter the fundamental architecture of existing files. Make additions minimal and targeted.",{"type":45,"tag":86,"props":176,"children":177},{},[178],{"type":51,"value":179},"You must read a file immediately before attempting to write it.",{"type":45,"tag":54,"props":181,"children":182},{},[183],{"type":51,"value":184},"STEP 6: Add structured properties.",{"type":45,"tag":82,"props":186,"children":187},{},[188,193],{"type":45,"tag":86,"props":189,"children":190},{},[191],{"type":51,"value":192},"Ensure logs include structured key-value properties for filtering and search in PostHog.",{"type":45,"tag":86,"props":194,"children":195},{},[196],{"type":51,"value":197},"Prefer structured log formats with key-value properties over plain text messages.",{"type":45,"tag":54,"props":199,"children":200},{},[201],{"type":51,"value":202},"STEP 7: Set up environment variables.",{"type":45,"tag":82,"props":204,"children":205},{},[206,228,249,299,320,325],{"type":45,"tag":86,"props":207,"children":208},{},[209,211,218,220,226],{"type":51,"value":210},"Check if the project already has PostHog environment variables configured (e.g. in ",{"type":45,"tag":212,"props":213,"children":215},"code",{"className":214},[],[216],{"type":51,"value":217},".env",{"type":51,"value":219},", ",{"type":45,"tag":212,"props":221,"children":223},{"className":222},[],[224],{"type":51,"value":225},".env.local",{"type":51,"value":227},", or framework-specific env files). If valid values already exist, skip this step.",{"type":45,"tag":86,"props":229,"children":230},{},[231,233,239,241,247],{"type":51,"value":232},"If the PostHog project token is missing, use the PostHog MCP server's ",{"type":45,"tag":212,"props":234,"children":236},{"className":235},[],[237],{"type":51,"value":238},"projects-get",{"type":51,"value":240}," tool to retrieve the project's ",{"type":45,"tag":212,"props":242,"children":244},{"className":243},[],[245],{"type":51,"value":246},"api_token",{"type":51,"value":248},". 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.",{"type":45,"tag":86,"props":250,"children":251},{},[252,254,259,261,267,269,275,277,283,284,290,291,297],{"type":51,"value":253},"For the PostHog host URL: check the ",{"type":45,"tag":212,"props":255,"children":257},{"className":256},[],[258],{"type":51,"value":238},{"type":51,"value":260}," MCP response for a ",{"type":45,"tag":212,"props":262,"children":264},{"className":263},[],[265],{"type":51,"value":266},"region",{"type":51,"value":268}," field — ",{"type":45,"tag":212,"props":270,"children":272},{"className":271},[],[273],{"type":51,"value":274},"US",{"type":51,"value":276}," maps to ",{"type":45,"tag":212,"props":278,"children":280},{"className":279},[],[281],{"type":51,"value":282},"https:\u002F\u002Fus.i.posthog.com",{"type":51,"value":219},{"type":45,"tag":212,"props":285,"children":287},{"className":286},[],[288],{"type":51,"value":289},"EU",{"type":51,"value":276},{"type":45,"tag":212,"props":292,"children":294},{"className":293},[],[295],{"type":51,"value":296},"https:\u002F\u002Feu.i.posthog.com",{"type":51,"value":298},". 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.",{"type":45,"tag":86,"props":300,"children":301},{},[302,304,310,312,318],{"type":51,"value":303},"For the OpenTelemetry endpoint, use ",{"type":45,"tag":212,"props":305,"children":307},{"className":306},[],[308],{"type":51,"value":309},"https:\u002F\u002Fus.i.posthog.com\u002Fv1",{"type":51,"value":311}," (US) or ",{"type":45,"tag":212,"props":313,"children":315},{"className":314},[],[316],{"type":51,"value":317},"https:\u002F\u002Feu.i.posthog.com\u002Fv1",{"type":51,"value":319}," (EU), matching the region determined above.",{"type":45,"tag":86,"props":321,"children":322},{},[323],{"type":51,"value":324},"Write these values to the appropriate env file using the framework's naming convention.",{"type":45,"tag":86,"props":326,"children":327},{},[328],{"type":51,"value":329},"Reference these environment variables in code instead of hardcoding them.",{"type":45,"tag":65,"props":331,"children":333},{"id":332},"reference-files",[334],{"type":51,"value":335},"Reference files",{"type":45,"tag":82,"props":337,"children":338},{},[339,350,361,372,383,394,405,416,427,438,449,460,471,482,493,504,515,526],{"type":45,"tag":86,"props":340,"children":341},{},[342,348],{"type":45,"tag":212,"props":343,"children":345},{"className":344},[],[346],{"type":51,"value":347},"references\u002Fnextjs.md",{"type":51,"value":349}," - Next.js logs installation - docs",{"type":45,"tag":86,"props":351,"children":352},{},[353,359],{"type":45,"tag":212,"props":354,"children":356},{"className":355},[],[357],{"type":51,"value":358},"references\u002Fnodejs.md",{"type":51,"value":360}," - Node.js logs installation - docs",{"type":45,"tag":86,"props":362,"children":363},{},[364,370],{"type":45,"tag":212,"props":365,"children":367},{"className":366},[],[368],{"type":51,"value":369},"references\u002Fpython.md",{"type":51,"value":371}," - Python logs installation - docs",{"type":45,"tag":86,"props":373,"children":374},{},[375,381],{"type":45,"tag":212,"props":376,"children":378},{"className":377},[],[379],{"type":51,"value":380},"references\u002Fgo.md",{"type":51,"value":382}," - Go logs installation - docs",{"type":45,"tag":86,"props":384,"children":385},{},[386,392],{"type":45,"tag":212,"props":387,"children":389},{"className":388},[],[390],{"type":51,"value":391},"references\u002Fjava.md",{"type":51,"value":393}," - Java logs installation - docs",{"type":45,"tag":86,"props":395,"children":396},{},[397,403],{"type":45,"tag":212,"props":398,"children":400},{"className":399},[],[401],{"type":51,"value":402},"references\u002Fdatadog.md",{"type":51,"value":404}," - Datadog logs installation - docs",{"type":45,"tag":86,"props":406,"children":407},{},[408,414],{"type":45,"tag":212,"props":409,"children":411},{"className":410},[],[412],{"type":51,"value":413},"references\u002Fandroid.md",{"type":51,"value":415}," - Android logs installation - docs",{"type":45,"tag":86,"props":417,"children":418},{},[419,425],{"type":45,"tag":212,"props":420,"children":422},{"className":421},[],[423],{"type":51,"value":424},"references\u002Freact-native.md",{"type":51,"value":426}," - React native logs installation - docs",{"type":45,"tag":86,"props":428,"children":429},{},[430,436],{"type":45,"tag":212,"props":431,"children":433},{"className":432},[],[434],{"type":51,"value":435},"references\u002Fios.md",{"type":51,"value":437}," - Ios logs installation - docs",{"type":45,"tag":86,"props":439,"children":440},{},[441,447],{"type":45,"tag":212,"props":442,"children":444},{"className":443},[],[445],{"type":51,"value":446},"references\u002Fflutter.md",{"type":51,"value":448}," - Flutter logs installation - docs",{"type":45,"tag":86,"props":450,"children":451},{},[452,458],{"type":45,"tag":212,"props":453,"children":455},{"className":454},[],[456],{"type":51,"value":457},"references\u002Fother.md",{"type":51,"value":459}," - Other languages logs installation - docs",{"type":45,"tag":86,"props":461,"children":462},{},[463,469],{"type":45,"tag":212,"props":464,"children":466},{"className":465},[],[467],{"type":51,"value":468},"references\u002Fstart-here.md",{"type":51,"value":470}," - Getting started with logs - docs",{"type":45,"tag":86,"props":472,"children":473},{},[474,480],{"type":45,"tag":212,"props":475,"children":477},{"className":476},[],[478],{"type":51,"value":479},"references\u002Fsearch.md",{"type":51,"value":481}," - Search logs - docs",{"type":45,"tag":86,"props":483,"children":484},{},[485,491],{"type":45,"tag":212,"props":486,"children":488},{"className":487},[],[489],{"type":51,"value":490},"references\u002Fbest-practices.md",{"type":51,"value":492}," - Logging best practices - docs",{"type":45,"tag":86,"props":494,"children":495},{},[496,502],{"type":45,"tag":212,"props":497,"children":499},{"className":498},[],[500],{"type":51,"value":501},"references\u002Ftroubleshooting.md",{"type":51,"value":503}," - Logs troubleshooting - docs",{"type":45,"tag":86,"props":505,"children":506},{},[507,513],{"type":45,"tag":212,"props":508,"children":510},{"className":509},[],[511],{"type":51,"value":512},"references\u002Flink-session-replay.md",{"type":51,"value":514}," - Link session replay - docs",{"type":45,"tag":86,"props":516,"children":517},{},[518,524],{"type":45,"tag":212,"props":519,"children":521},{"className":520},[],[522],{"type":51,"value":523},"references\u002Fdebug-logs-mcp.md",{"type":51,"value":525}," - Debug logs with mcp - docs",{"type":45,"tag":86,"props":527,"children":528},{},[529,535],{"type":45,"tag":212,"props":530,"children":532},{"className":531},[],[533],{"type":51,"value":534},"references\u002FCOMMANDMENTS.md",{"type":51,"value":536}," - Framework-specific rules the integration must follow",{"type":45,"tag":54,"props":538,"children":539},{},[540],{"type":51,"value":541},"Each platform reference contains specific OTLP configuration, SDK setup, and integration patterns. Find the one matching the user's stack.",{"type":45,"tag":65,"props":543,"children":545},{"id":544},"key-principles",[546],{"type":51,"value":547},"Key principles",{"type":45,"tag":82,"props":549,"children":550},{},[551,562,572,582,592],{"type":45,"tag":86,"props":552,"children":553},{},[554,560],{"type":45,"tag":555,"props":556,"children":557},"strong",{},[558],{"type":51,"value":559},"Environment variables",{"type":51,"value":561},": Always use environment variables for PostHog keys and OpenTelemetry endpoints. Never hardcode them.",{"type":45,"tag":86,"props":563,"children":564},{},[565,570],{"type":45,"tag":555,"props":566,"children":567},{},[568],{"type":51,"value":569},"Minimal changes",{"type":51,"value":571},": Add log export alongside existing logging. Don't replace or restructure existing logging code.",{"type":45,"tag":86,"props":573,"children":574},{},[575,580],{"type":45,"tag":555,"props":576,"children":577},{},[578],{"type":51,"value":579},"OpenTelemetry",{"type":51,"value":581},": PostHog logs use the OpenTelemetry protocol. Configure an OTLP exporter pointed at PostHog's ingest endpoint unless the platform SDK provides native log capture.",{"type":45,"tag":86,"props":583,"children":584},{},[585,590],{"type":45,"tag":555,"props":586,"children":587},{},[588],{"type":51,"value":589},"SDK-native logs",{"type":51,"value":591},": For Android, React Native, and iOS, use the SDK logger\u002Fcapture APIs from the platform reference instead of adding a separate OTLP exporter.",{"type":45,"tag":86,"props":593,"children":594},{},[595,600],{"type":45,"tag":555,"props":596,"children":597},{},[598],{"type":51,"value":599},"Structured logging",{"type":51,"value":601},": Prefer structured log formats with key-value properties over plain text messages.",{"items":603,"total":774},[604,621,633,646,659,674,690,707,721,736,746,764],{"slug":605,"name":605,"fn":606,"description":607,"org":608,"tags":609,"stars":618,"repoUrl":619,"updatedAt":620},"analyzing-expensive-users","analyze expensive users in AI observability","Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[610,613,616,617],{"name":611,"slug":612,"type":15},"Analytics","analytics",{"name":614,"slug":615,"type":15},"Cost Optimization","cost-optimization",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-28T05:34:11.117757",{"slug":622,"name":622,"fn":623,"description":624,"org":625,"tags":626,"stars":618,"repoUrl":619,"updatedAt":632},"auditing-endpoints","audit PostHog project endpoints","Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks \"what endpoints can I clean up?\", \"are any of my endpoints broken?\", \"which materialised versions are still being called?\", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[627,628,631],{"name":611,"slug":612,"type":15},{"name":629,"slug":630,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},"2026-06-08T08:08:33.693989",{"slug":634,"name":634,"fn":635,"description":636,"org":637,"tags":638,"stars":618,"repoUrl":619,"updatedAt":645},"auditing-warehouse-source-health","audit PostHog data warehouse source health","Audit the health of a PostHog project's data warehouse sources and syncs — find every broken or degraded source connection, sync schema, and webhook channel. Use when the user asks \"why are my imports failing?\", \"what's broken with my sources?\", \"why is my warehouse data stale?\", or wants a one-shot triage of source\u002Fsync health before deciding where to dig in. Produces a prioritized report grouped by severity, with recommended next steps. For materialized-view health use `auditing-warehouse-view-health`; for a single failing sync use `diagnosing-failed-warehouse-syncs`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[639,640,643,644],{"name":629,"slug":630,"type":15},{"name":641,"slug":642,"type":15},"Data Warehouse","data-warehouse",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:22:57.67984",{"slug":647,"name":647,"fn":648,"description":649,"org":650,"tags":651,"stars":618,"repoUrl":619,"updatedAt":658},"auditing-warehouse-view-health","audit PostHog materialized view health","Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks \"which of my views are broken?\", \"why is this materialized view failing?\", \"are any of my views wasting compute?\", or wants a one-shot triage of view health. For source\u002Fsync health use `auditing-warehouse-source-health`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[652,653,654,657],{"name":629,"slug":630,"type":15},{"name":641,"slug":642,"type":15},{"name":655,"slug":656,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-06-18T08:25:10.936787",{"slug":660,"name":660,"fn":661,"description":662,"org":663,"tags":664,"stars":618,"repoUrl":619,"updatedAt":673},"authoring-error-tracking-alerts","author PostHog error tracking alerts","Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack\u002Fwebhook\u002FLinear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[665,668,671,672],{"name":666,"slug":667,"type":15},"Alerting","alerting",{"name":669,"slug":670,"type":15},"Debugging","debugging",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:24:40.318583",{"slug":675,"name":675,"fn":676,"description":677,"org":678,"tags":679,"stars":618,"repoUrl":619,"updatedAt":689},"authoring-log-alerts","author log alerts in PostHog","Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[680,681,684,685,688],{"name":611,"slug":612,"type":15},{"name":682,"slug":683,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},{"name":686,"slug":687,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-18T05:10:54.430898",{"slug":691,"name":691,"fn":692,"description":693,"org":694,"tags":695,"stars":618,"repoUrl":619,"updatedAt":706},"building-workflows","build and edit PostHog workflows","Build, edit, test, enable, and monitor PostHog workflows over MCP. Author the action\u002Fedge graph so it runs and opens cleanly in the visual editor, then change drafts surgically with patch operations. Use when asked to build, set up, automate, change, fix, or debug a workflow, campaign, broadcast, drip sequence, or event-triggered automation in the workflows product.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[696,699,702,703],{"name":697,"slug":698,"type":15},"Automation","automation",{"name":700,"slug":701,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},{"name":704,"slug":705,"type":15},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",{"slug":708,"name":708,"fn":709,"description":710,"org":711,"tags":712,"stars":618,"repoUrl":619,"updatedAt":720},"check-posthog-loading","inspect PostHog SDK loading across URLs","Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[713,714,715,718,719],{"name":611,"slug":612,"type":15},{"name":669,"slug":670,"type":15},{"name":716,"slug":717,"type":15},"Frontend","frontend",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-05-07T05:56:19.828048",{"slug":722,"name":722,"fn":723,"description":724,"org":725,"tags":726,"stars":618,"repoUrl":619,"updatedAt":735},"consuming-endpoints-from-client-code","integrate PostHog endpoints into client applications","Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api\u002Fopenapi-ts, sending the right auth header, shaping the variables payload (HogQL code_name vs insight breakdown property), handling rate-limit and materialised-endpoint error responses. Use when the user says \"how do I call my endpoint\", \"generate a client for this\", or \"what auth header do I use\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[727,730,731,732],{"name":728,"slug":729,"type":15},"API Development","api-development",{"name":716,"slug":717,"type":15},{"name":9,"slug":8,"type":15},{"name":733,"slug":734,"type":15},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":737,"name":737,"fn":738,"description":739,"org":740,"tags":741,"stars":618,"repoUrl":619,"updatedAt":745},"copying-endpoints-across-projects","copy PostHog endpoints across projects","Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[742,743,744],{"name":728,"slug":729,"type":15},{"name":686,"slug":687,"type":15},{"name":9,"slug":8,"type":15},"2026-07-15T05:29:58.442727",{"slug":747,"name":747,"fn":748,"description":749,"org":750,"tags":751,"stars":618,"repoUrl":619,"updatedAt":763},"creating-ai-subscription","schedule recurring AI-generated PostHog reports","Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email or Slack on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight\u002Fdashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[752,753,756,757,760],{"name":697,"slug":698,"type":15},{"name":754,"slug":755,"type":15},"Email","email",{"name":9,"slug":8,"type":15},{"name":758,"slug":759,"type":15},"Reporting","reporting",{"name":761,"slug":762,"type":15},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":765,"name":765,"fn":766,"description":767,"org":768,"tags":769,"stars":618,"repoUrl":619,"updatedAt":773},"creating-an-endpoint","create PostHog API endpoints","Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says \"create an endpoint\", \"expose this query as an API\", \"turn this insight into an endpoint\", or asks for help structuring a new endpoint. Steers away from common mistakes: materialising a query with cohort breakdowns or compare mode, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[770,771,772],{"name":611,"slug":612,"type":15},{"name":728,"slug":729,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:29.624498",231,{"items":776,"total":882},[777,792,808,823,836,848,866],{"slug":778,"name":778,"fn":779,"description":780,"org":781,"tags":782,"stars":23,"repoUrl":24,"updatedAt":791},"analyzing-experiment-session-replays","analyze session replays for PostHog experiments","Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[783,784,787,788],{"name":611,"slug":612,"type":15},{"name":785,"slug":786,"type":15},"Design","design",{"name":9,"slug":8,"type":15},{"name":789,"slug":790,"type":15},"User Research","user-research","2026-04-06T18:44:38.291781",{"slug":793,"name":793,"fn":794,"description":795,"org":796,"tags":797,"stars":23,"repoUrl":24,"updatedAt":807},"assessing-heatmaps","analyze page heatmaps and suggest improvements","Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click \u002F rageclick \u002F scroll-depth data for a URL, names the hot elements by cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements.\nTRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap\u002Fclick data, or to 'analyze\u002Fassess\u002Freview the heatmap' for a URL.\nDO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[798,799,800,801,804],{"name":611,"slug":612,"type":15},{"name":716,"slug":717,"type":15},{"name":9,"slug":8,"type":15},{"name":802,"slug":803,"type":15},"Product Management","product-management",{"name":805,"slug":806,"type":15},"UX Design","ux-design","2026-06-05T07:40:43.37798",{"slug":809,"name":809,"fn":810,"description":811,"org":812,"tags":813,"stars":23,"repoUrl":24,"updatedAt":822},"auditing-experiments-flags","audit PostHog experiments and feature flags","Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[814,815,818,819],{"name":629,"slug":630,"type":15},{"name":816,"slug":817,"type":15},"Feature Flags","feature-flags",{"name":9,"slug":8,"type":15},{"name":820,"slug":821,"type":15},"QA","qa","2026-04-06T18:44:30.657553",{"slug":824,"name":824,"fn":825,"description":826,"org":827,"tags":828,"stars":23,"repoUrl":24,"updatedAt":835},"authoring-scouts","author and edit PostHog Signals scouts","How to author, edit, and adapt PostHog Signals scouts — the scheduled agents that scan a project and write reports into the Signals inbox. Use when a user wants to customize a canonical scout for their own setup (narrow its scope, retune its thresholds, add disqualifiers), tweak a scout's schedule or dry-run posture, or write a brand-new scout from scratch for a specific use case (a custom event, a product surface no canonical scout covers), or steer a scout without editing it at all by leaving it a note. Covers the scout SKILL.md anatomy, the report contract, the dedupe + scratchpad-memory conventions, the scout-notes steering channel, the per-team skills-store path vs the canonical in-repo path, and the write-and-inspect test loop (with dry-run as an optional safety net). Trigger on \"write\u002Fedit\u002Fcustomize a signals scout\", \"new scout for X\", \"tune my scout schedule\", \"make a scout that watches \u003Cevent>\", \"leave a note for \u002F give feedback to a scout\", \"tell the scouts about X\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[829,832,833,834],{"name":830,"slug":831,"type":15},"Agents","agents",{"name":697,"slug":698,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-28T05:33:45.509154",{"slug":837,"name":837,"fn":838,"description":839,"org":840,"tags":841,"stars":23,"repoUrl":24,"updatedAt":847},"building-a-dashboard","build and update PostHog dashboards","Build a new dashboard, or update an existing one, from a set of insights — the same job the in-app assistant does with its upsert-dashboard tool, but over MCP. Use when a user asks to create a dashboard, put several metrics\u002Fcharts together on one page, assemble a dashboard for a topic (product analytics, retention, revenue, activation, etc.), or add\u002Fremove\u002Freplace insights on a dashboard they already have. Covers deciding create vs update, reusing existing insights vs creating new ones, and using PostHog's vetted dashboard templates as reference for what a strong dashboard on a topic looks like.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[842,843,846],{"name":611,"slug":612,"type":15},{"name":844,"slug":845,"type":15},"Dashboards","dashboards",{"name":700,"slug":701,"type":15},"2026-07-21T06:07:38.060598",{"slug":849,"name":849,"fn":850,"description":851,"org":852,"tags":853,"stars":23,"repoUrl":24,"updatedAt":865},"checking-deploy-timing","correlate PostHog deployments with GitHub commits","Determine when a PostHog code change reached a given environment by reading the hidden GIT deploy annotations in the project and correlating them with the merge commit on GitHub. Use when PostHog staff ask \"when was X deployed\", \"is my change live in the US\u002FEU yet\", \"has my PR shipped\", \"did the fix roll out to prod-us\", or otherwise want to know whether\u002Fwhen a commit, PR, or feature went out to a region. Do not answer deploy-timing questions from event\u002Fdata volume alone — that only shows when data changed, not when code shipped.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[854,857,860,863,864],{"name":855,"slug":856,"type":15},"Deployment","deployment",{"name":858,"slug":859,"type":15},"Git","git",{"name":861,"slug":862,"type":15},"GitHub","github",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-28T07:46:59.53536",{"slug":867,"name":867,"fn":868,"description":869,"org":870,"tags":871,"stars":23,"repoUrl":24,"updatedAt":881},"choosing-trend-or-slope-view","visualize trends and growth over time","Clarify how to visualize change over a time range before building a trend. Use whenever the user asks how much something changed, grew, dropped, improved, or regressed between two points or periods — \"how much did X change from A to B\", \"before vs after\", \"start vs end\", \"week over week\", \"compare this month to last\", \"change over time\" — or mentions a \"slope chart\" \u002F \"slopegraph\". Two readings of \"change\" need different charts: the whole trend (a line, every interval) versus just the two endpoints (a slope, start vs end). Ask which they want, then render it. Not for choosing a saved insight ChartDisplayType in the insight editor.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[872,873,876,879,880],{"name":611,"slug":612,"type":15},{"name":874,"slug":875,"type":15},"Charts","charts",{"name":877,"slug":878,"type":15},"Data Visualization","data-visualization",{"name":9,"slug":8,"type":15},{"name":758,"slug":759,"type":15},"2026-06-18T08:18:57.960157",56]