[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-copying-endpoints-across-projects":3,"mdc--w4cleq-key":46,"related-repo-posthog-copying-endpoints-across-projects":955,"related-org-posthog-copying-endpoints-across-projects":1057},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":41,"sourceUrl":44,"mdContent":45},"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},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,16,17],{"name":13,"slug":14,"type":15},"Operations","operations","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"API Development","api-development",35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-15T05:29:58.442727",null,2977,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"ab-testing","ai-analytics","analytics","cdp","data-warehouse","experiments","feature-flags","javascript","product-analytics","python","react","session-replay","surveys","typescript","web-analytics",{"repoUrl":21,"stars":20,"forks":24,"topics":42,"description":43},[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"🦔 PostHog is an all-in-one developer platform for building successful products. We offer product analytics, web analytics, session replay, error tracking, feature flags, experimentation, surveys, data warehouse, a CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog\u002Ftree\u002FHEAD\u002Fproducts\u002Fendpoints\u002Fskills\u002Fcopying-endpoints-across-projects","---\nname: copying-endpoints-across-projects\ndescription: >\n  Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project\n  in the same organization, or duplicate it under a new name in the same project. Use when the user\n  wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an\n  endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate\n  on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool —\n  this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the\n  active-project switching it requires, name-collision checks, and the safe defaults (land\n  unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions\n  (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see\n  creating-an-endpoint).\n---\n\n# Copying endpoints across projects\n\nThis skill duplicates a PostHog **endpoint** — a saved HogQL or insight query exposed as a callable API route — either into another project in the same organization, or under a new name in the same project.\n\n## The one thing to know first\n\nThere is **no server-side endpoint copy operation**. Feature flags have `feature-flags-copy-flags-create` and experiments have `experiment-copy-to-project`; endpoints have **neither**. Copying an endpoint means:\n\n1. Read the full source config with `endpoint-get`.\n2. Recreate it with `endpoint-create` (in the target project, or under a new name in the same project).\n\nBoth `endpoint-get` and `endpoint-create` operate **only on the active MCP project** — neither takes a project id. So a cross-project copy requires the active project to be **switched** between the read (source) and the write (target). Read the source first, capture the config, then switch to the target and create. If you cannot switch projects in this session, tell the user rather than creating the copy in the wrong project.\n\n## When to use this skill\n\n- \"Copy this endpoint to another project\", \"duplicate this endpoint\", \"clone the endpoint\"\n- \"Promote the endpoint from staging to production\" (projects-as-environments)\n- \"Make a copy so I can iterate without touching the live one\" (same-project duplicate under a new name)\n- Replicating an endpoint's query, variables, and freshness config in a different workspace\n\n## What this skill does not cover\n\n- **Cross-organization copy.** Endpoints (and their queries) can only be recreated in projects you have editor access to; there is no org-to-org path.\n- **Editing versions of an existing endpoint** — see `managing-endpoint-versions`.\n- **Designing a new endpoint from scratch** — see `creating-an-endpoint` (this skill assumes the source endpoint already exists and is configured correctly).\n- **Bulk-copying every endpoint in a project.** Copy one at a time; loop `endpoints-get-all` → per-endpoint copy if the user really wants all of them, and tell them you're doing so.\n\n## Workflow\n\n### 1. Resolve the source endpoint\n\nYou need the endpoint's **name** and the **source project**.\n\n- If the user gave a name, use it. If they gave a fuzzy description, call `endpoints-get-all` in the source project and match on name\u002Fdescription.\n- If the user didn't say which project the endpoint lives in, ask — don't assume the active MCP project is the source. Copying out of the wrong source is the most common foot-gun.\n- Confirm the active project is the source (call `project-get` with no id to see the active project) before reading.\n\n### 2. Read the full source config\n\nCall `endpoint-get` with the source name. Capture everything you'll need to recreate it:\n\n- `name`\n- `query` (the whole HogQL\u002Finsight query definition — including any declared variables \u002F `code_name`s)\n- `description`\n- `data_freshness_seconds`\n- `is_materialized` (source state — see step 5 for why you usually don't copy this as-is)\n- `tags`\n\nPresent a short summary to the user before copying: what the query returns, its variables, its freshness setting, and whether the source is materialised.\n\n### 3. Resolve the target and check for a name collision\n\n**Cross-project:** confirm the target project belongs to the same org and the user has editor access there. The copy will be created in whatever project is active at `endpoint-create` time, so plan to switch the active project to the target between step 2 and step 6.\n\n**Same-project duplicate:** the new endpoint needs a **different name** — names are unique within a project and the URL path (`\u002Fapi\u002Fprojects\u002F{team_id}\u002Fendpoints\u002F{name}\u002Frun`) depends on it. Agree a new name with the user.\n\nEither way, run `endpoints-get-all` in the target project and check whether the intended name already exists. If it does, stop and ask: creating over an existing name is not a safe silent action. Get the name right up front — it's baked into the caller URL and not trivially renameable later.\n\n### 4. Decide the name in the target\n\n- Cross-project, same purpose: keep the same name so caller code ports unchanged.\n- Same-project or \"copy to iterate\": pick a clearly-derived new name (e.g. `weekly_active_users_v2`, `weekly_active_users_staging`). Snake_case, URL-safe, starts with a letter, max 128 chars.\n\n### 5. Choose materialisation for the copy (default: OFF)\n\n**Default to `is_materialized: false` on the copy, even when the source is materialised.** Rationale mirrors the safe default in `copying-flags-across-projects` (land disabled): materialisation costs recompute\u002Fstorage on a cadence, and a freshly-copied endpoint has no proven traffic in the target yet. Ship it unmaterialised, confirm it's actually called, then enable materialisation later once usage justifies the cost.\n\nOverride to `is_materialized: true` only if the user explicitly wants the copy materialised from day one (e.g. a like-for-like production promotion of a high-traffic endpoint). Note the caveats from `creating-an-endpoint`: queries with cohort breakdowns or compare mode, and insight kinds other than Trends\u002FLifecycle\u002FRetention (e.g. Funnels), are **not materialisable** — `endpoint-create` will simply create them unmaterialised regardless.\n\nCarry `data_freshness_seconds` over unchanged unless the user wants different freshness in the target (remember it doubles as the materialisation refresh cadence).\n\n### 6. Create the copy\n\nWith the target project active, call `endpoint-create` with:\n\n- `name` — from step 4\n- `query` — the source query captured in step 2, verbatim (this carries the variables\u002F`code_name`s)\n- `description` — from source (optionally note it's a copy)\n- `data_freshness_seconds` — from source unless the user changed it\n- `is_materialized` — from step 5 (default `false`)\n- `tags` — from source if the user wants them; drop tags that are meaningless in the target project\n\n### 7. Verify\n\nCall `endpoint-run` on the new endpoint with a representative `variables` payload and confirm the response shape matches the source. For a cross-project promotion, sanity-check that the underlying events\u002Fproperties the query references actually exist in the target project — a query that's valid in staging can return empty or error in a project with different taxonomy. If the copy is HogQL and callers rely on `offset` pagination, note that `offset` on `endpoint-run` is only supported for HogQL endpoints (not insight endpoints).\n\n### 8. Report\n\nTell the user: the new endpoint's name and project, its materialisation state, its freshness setting, and the result of the verification run. If you switched the active project to do the copy, say which project is active now so they aren't surprised on their next call.\n\n## Important notes\n\n- **The query is a copy, not a link.** Like creating an endpoint from an insight, the target endpoint owns its own copy of the query. Later edits to the source endpoint do **not** propagate to the copy.\n- **Variables come along inside `query`.** HogQL `code_name` variable declarations and insight breakdown variables live inside the query definition, so copying `query` verbatim preserves them. Double-check the copy's variables in the verification run.\n- **No undo.** `endpoint-create` makes a new endpoint (or fails if the name is taken). Always confirm the target name and project with the user before creating, especially when the target is production.\n- **Access.** The user needs editor access on the target project's team; without it `endpoint-create` will be rejected.\n\n## Available tools\n\n- `endpoint-get` — read the full source endpoint config (query, variables, freshness, materialisation, tags). Supports `?version=N`.\n- `endpoint-create` — create the copy in the active project. Fields: `name`, `query`, `description`, `data_freshness_seconds`, `is_materialized`, `tags`.\n- `endpoints-get-all` — list endpoints in the active project; use to resolve a fuzzy source name and to check for a name collision in the target.\n- `endpoint-run` — execute the new endpoint to verify the copy's response shape.\n- `project-get` — call with no id to confirm which project is currently active before reading the source or creating the copy.\n",{"data":47,"body":48},{"name":4,"description":6},{"type":49,"children":50},"root",[51,59,73,80,116,147,180,186,210,216,281,287,294,312,345,351,363,431,436,442,459,484,496,502,531,537,563,597,609,615,627,704,710,752,758,763,769,853,859],{"type":52,"tag":53,"props":54,"children":55},"element","h1",{"id":4},[56],{"type":57,"value":58},"text","Copying endpoints across projects",{"type":52,"tag":60,"props":61,"children":62},"p",{},[63,65,71],{"type":57,"value":64},"This skill duplicates a PostHog ",{"type":52,"tag":66,"props":67,"children":68},"strong",{},[69],{"type":57,"value":70},"endpoint",{"type":57,"value":72}," — a saved HogQL or insight query exposed as a callable API route — either into another project in the same organization, or under a new name in the same project.",{"type":52,"tag":74,"props":75,"children":77},"h2",{"id":76},"the-one-thing-to-know-first",[78],{"type":57,"value":79},"The one thing to know first",{"type":52,"tag":60,"props":81,"children":82},{},[83,85,90,92,99,101,107,109,114],{"type":57,"value":84},"There is ",{"type":52,"tag":66,"props":86,"children":87},{},[88],{"type":57,"value":89},"no server-side endpoint copy operation",{"type":57,"value":91},". Feature flags have ",{"type":52,"tag":93,"props":94,"children":96},"code",{"className":95},[],[97],{"type":57,"value":98},"feature-flags-copy-flags-create",{"type":57,"value":100}," and experiments have ",{"type":52,"tag":93,"props":102,"children":104},{"className":103},[],[105],{"type":57,"value":106},"experiment-copy-to-project",{"type":57,"value":108},"; endpoints have ",{"type":52,"tag":66,"props":110,"children":111},{},[112],{"type":57,"value":113},"neither",{"type":57,"value":115},". Copying an endpoint means:",{"type":52,"tag":117,"props":118,"children":119},"ol",{},[120,134],{"type":52,"tag":121,"props":122,"children":123},"li",{},[124,126,132],{"type":57,"value":125},"Read the full source config with ",{"type":52,"tag":93,"props":127,"children":129},{"className":128},[],[130],{"type":57,"value":131},"endpoint-get",{"type":57,"value":133},".",{"type":52,"tag":121,"props":135,"children":136},{},[137,139,145],{"type":57,"value":138},"Recreate it with ",{"type":52,"tag":93,"props":140,"children":142},{"className":141},[],[143],{"type":57,"value":144},"endpoint-create",{"type":57,"value":146}," (in the target project, or under a new name in the same project).",{"type":52,"tag":60,"props":148,"children":149},{},[150,152,157,159,164,166,171,173,178],{"type":57,"value":151},"Both ",{"type":52,"tag":93,"props":153,"children":155},{"className":154},[],[156],{"type":57,"value":131},{"type":57,"value":158}," and ",{"type":52,"tag":93,"props":160,"children":162},{"className":161},[],[163],{"type":57,"value":144},{"type":57,"value":165}," operate ",{"type":52,"tag":66,"props":167,"children":168},{},[169],{"type":57,"value":170},"only on the active MCP project",{"type":57,"value":172}," — neither takes a project id. So a cross-project copy requires the active project to be ",{"type":52,"tag":66,"props":174,"children":175},{},[176],{"type":57,"value":177},"switched",{"type":57,"value":179}," between the read (source) and the write (target). Read the source first, capture the config, then switch to the target and create. If you cannot switch projects in this session, tell the user rather than creating the copy in the wrong project.",{"type":52,"tag":74,"props":181,"children":183},{"id":182},"when-to-use-this-skill",[184],{"type":57,"value":185},"When to use this skill",{"type":52,"tag":187,"props":188,"children":189},"ul",{},[190,195,200,205],{"type":52,"tag":121,"props":191,"children":192},{},[193],{"type":57,"value":194},"\"Copy this endpoint to another project\", \"duplicate this endpoint\", \"clone the endpoint\"",{"type":52,"tag":121,"props":196,"children":197},{},[198],{"type":57,"value":199},"\"Promote the endpoint from staging to production\" (projects-as-environments)",{"type":52,"tag":121,"props":201,"children":202},{},[203],{"type":57,"value":204},"\"Make a copy so I can iterate without touching the live one\" (same-project duplicate under a new name)",{"type":52,"tag":121,"props":206,"children":207},{},[208],{"type":57,"value":209},"Replicating an endpoint's query, variables, and freshness config in a different workspace",{"type":52,"tag":74,"props":211,"children":213},{"id":212},"what-this-skill-does-not-cover",[214],{"type":57,"value":215},"What this skill does not cover",{"type":52,"tag":187,"props":217,"children":218},{},[219,229,246,263],{"type":52,"tag":121,"props":220,"children":221},{},[222,227],{"type":52,"tag":66,"props":223,"children":224},{},[225],{"type":57,"value":226},"Cross-organization copy.",{"type":57,"value":228}," Endpoints (and their queries) can only be recreated in projects you have editor access to; there is no org-to-org path.",{"type":52,"tag":121,"props":230,"children":231},{},[232,237,239,245],{"type":52,"tag":66,"props":233,"children":234},{},[235],{"type":57,"value":236},"Editing versions of an existing endpoint",{"type":57,"value":238}," — see ",{"type":52,"tag":93,"props":240,"children":242},{"className":241},[],[243],{"type":57,"value":244},"managing-endpoint-versions",{"type":57,"value":133},{"type":52,"tag":121,"props":247,"children":248},{},[249,254,255,261],{"type":52,"tag":66,"props":250,"children":251},{},[252],{"type":57,"value":253},"Designing a new endpoint from scratch",{"type":57,"value":238},{"type":52,"tag":93,"props":256,"children":258},{"className":257},[],[259],{"type":57,"value":260},"creating-an-endpoint",{"type":57,"value":262}," (this skill assumes the source endpoint already exists and is configured correctly).",{"type":52,"tag":121,"props":264,"children":265},{},[266,271,273,279],{"type":52,"tag":66,"props":267,"children":268},{},[269],{"type":57,"value":270},"Bulk-copying every endpoint in a project.",{"type":57,"value":272}," Copy one at a time; loop ",{"type":52,"tag":93,"props":274,"children":276},{"className":275},[],[277],{"type":57,"value":278},"endpoints-get-all",{"type":57,"value":280}," → per-endpoint copy if the user really wants all of them, and tell them you're doing so.",{"type":52,"tag":74,"props":282,"children":284},{"id":283},"workflow",[285],{"type":57,"value":286},"Workflow",{"type":52,"tag":288,"props":289,"children":291},"h3",{"id":290},"_1-resolve-the-source-endpoint",[292],{"type":57,"value":293},"1. Resolve the source endpoint",{"type":52,"tag":60,"props":295,"children":296},{},[297,299,304,306,311],{"type":57,"value":298},"You need the endpoint's ",{"type":52,"tag":66,"props":300,"children":301},{},[302],{"type":57,"value":303},"name",{"type":57,"value":305}," and the ",{"type":52,"tag":66,"props":307,"children":308},{},[309],{"type":57,"value":310},"source project",{"type":57,"value":133},{"type":52,"tag":187,"props":313,"children":314},{},[315,327,332],{"type":52,"tag":121,"props":316,"children":317},{},[318,320,325],{"type":57,"value":319},"If the user gave a name, use it. If they gave a fuzzy description, call ",{"type":52,"tag":93,"props":321,"children":323},{"className":322},[],[324],{"type":57,"value":278},{"type":57,"value":326}," in the source project and match on name\u002Fdescription.",{"type":52,"tag":121,"props":328,"children":329},{},[330],{"type":57,"value":331},"If the user didn't say which project the endpoint lives in, ask — don't assume the active MCP project is the source. Copying out of the wrong source is the most common foot-gun.",{"type":52,"tag":121,"props":333,"children":334},{},[335,337,343],{"type":57,"value":336},"Confirm the active project is the source (call ",{"type":52,"tag":93,"props":338,"children":340},{"className":339},[],[341],{"type":57,"value":342},"project-get",{"type":57,"value":344}," with no id to see the active project) before reading.",{"type":52,"tag":288,"props":346,"children":348},{"id":347},"_2-read-the-full-source-config",[349],{"type":57,"value":350},"2. Read the full source config",{"type":52,"tag":60,"props":352,"children":353},{},[354,356,361],{"type":57,"value":355},"Call ",{"type":52,"tag":93,"props":357,"children":359},{"className":358},[],[360],{"type":57,"value":131},{"type":57,"value":362}," with the source name. Capture everything you'll need to recreate it:",{"type":52,"tag":187,"props":364,"children":365},{},[366,374,393,402,411,422],{"type":52,"tag":121,"props":367,"children":368},{},[369],{"type":52,"tag":93,"props":370,"children":372},{"className":371},[],[373],{"type":57,"value":303},{"type":52,"tag":121,"props":375,"children":376},{},[377,383,385,391],{"type":52,"tag":93,"props":378,"children":380},{"className":379},[],[381],{"type":57,"value":382},"query",{"type":57,"value":384}," (the whole HogQL\u002Finsight query definition — including any declared variables \u002F ",{"type":52,"tag":93,"props":386,"children":388},{"className":387},[],[389],{"type":57,"value":390},"code_name",{"type":57,"value":392},"s)",{"type":52,"tag":121,"props":394,"children":395},{},[396],{"type":52,"tag":93,"props":397,"children":399},{"className":398},[],[400],{"type":57,"value":401},"description",{"type":52,"tag":121,"props":403,"children":404},{},[405],{"type":52,"tag":93,"props":406,"children":408},{"className":407},[],[409],{"type":57,"value":410},"data_freshness_seconds",{"type":52,"tag":121,"props":412,"children":413},{},[414,420],{"type":52,"tag":93,"props":415,"children":417},{"className":416},[],[418],{"type":57,"value":419},"is_materialized",{"type":57,"value":421}," (source state — see step 5 for why you usually don't copy this as-is)",{"type":52,"tag":121,"props":423,"children":424},{},[425],{"type":52,"tag":93,"props":426,"children":428},{"className":427},[],[429],{"type":57,"value":430},"tags",{"type":52,"tag":60,"props":432,"children":433},{},[434],{"type":57,"value":435},"Present a short summary to the user before copying: what the query returns, its variables, its freshness setting, and whether the source is materialised.",{"type":52,"tag":288,"props":437,"children":439},{"id":438},"_3-resolve-the-target-and-check-for-a-name-collision",[440],{"type":57,"value":441},"3. Resolve the target and check for a name collision",{"type":52,"tag":60,"props":443,"children":444},{},[445,450,452,457],{"type":52,"tag":66,"props":446,"children":447},{},[448],{"type":57,"value":449},"Cross-project:",{"type":57,"value":451}," confirm the target project belongs to the same org and the user has editor access there. The copy will be created in whatever project is active at ",{"type":52,"tag":93,"props":453,"children":455},{"className":454},[],[456],{"type":57,"value":144},{"type":57,"value":458}," time, so plan to switch the active project to the target between step 2 and step 6.",{"type":52,"tag":60,"props":460,"children":461},{},[462,467,469,474,476,482],{"type":52,"tag":66,"props":463,"children":464},{},[465],{"type":57,"value":466},"Same-project duplicate:",{"type":57,"value":468}," the new endpoint needs a ",{"type":52,"tag":66,"props":470,"children":471},{},[472],{"type":57,"value":473},"different name",{"type":57,"value":475}," — names are unique within a project and the URL path (",{"type":52,"tag":93,"props":477,"children":479},{"className":478},[],[480],{"type":57,"value":481},"\u002Fapi\u002Fprojects\u002F{team_id}\u002Fendpoints\u002F{name}\u002Frun",{"type":57,"value":483},") depends on it. Agree a new name with the user.",{"type":52,"tag":60,"props":485,"children":486},{},[487,489,494],{"type":57,"value":488},"Either way, run ",{"type":52,"tag":93,"props":490,"children":492},{"className":491},[],[493],{"type":57,"value":278},{"type":57,"value":495}," in the target project and check whether the intended name already exists. If it does, stop and ask: creating over an existing name is not a safe silent action. Get the name right up front — it's baked into the caller URL and not trivially renameable later.",{"type":52,"tag":288,"props":497,"children":499},{"id":498},"_4-decide-the-name-in-the-target",[500],{"type":57,"value":501},"4. Decide the name in the target",{"type":52,"tag":187,"props":503,"children":504},{},[505,510],{"type":52,"tag":121,"props":506,"children":507},{},[508],{"type":57,"value":509},"Cross-project, same purpose: keep the same name so caller code ports unchanged.",{"type":52,"tag":121,"props":511,"children":512},{},[513,515,521,523,529],{"type":57,"value":514},"Same-project or \"copy to iterate\": pick a clearly-derived new name (e.g. ",{"type":52,"tag":93,"props":516,"children":518},{"className":517},[],[519],{"type":57,"value":520},"weekly_active_users_v2",{"type":57,"value":522},", ",{"type":52,"tag":93,"props":524,"children":526},{"className":525},[],[527],{"type":57,"value":528},"weekly_active_users_staging",{"type":57,"value":530},"). Snake_case, URL-safe, starts with a letter, max 128 chars.",{"type":52,"tag":288,"props":532,"children":534},{"id":533},"_5-choose-materialisation-for-the-copy-default-off",[535],{"type":57,"value":536},"5. Choose materialisation for the copy (default: OFF)",{"type":52,"tag":60,"props":538,"children":539},{},[540,553,555,561],{"type":52,"tag":66,"props":541,"children":542},{},[543,545,551],{"type":57,"value":544},"Default to ",{"type":52,"tag":93,"props":546,"children":548},{"className":547},[],[549],{"type":57,"value":550},"is_materialized: false",{"type":57,"value":552}," on the copy, even when the source is materialised.",{"type":57,"value":554}," Rationale mirrors the safe default in ",{"type":52,"tag":93,"props":556,"children":558},{"className":557},[],[559],{"type":57,"value":560},"copying-flags-across-projects",{"type":57,"value":562}," (land disabled): materialisation costs recompute\u002Fstorage on a cadence, and a freshly-copied endpoint has no proven traffic in the target yet. Ship it unmaterialised, confirm it's actually called, then enable materialisation later once usage justifies the cost.",{"type":52,"tag":60,"props":564,"children":565},{},[566,568,574,576,581,583,588,590,595],{"type":57,"value":567},"Override to ",{"type":52,"tag":93,"props":569,"children":571},{"className":570},[],[572],{"type":57,"value":573},"is_materialized: true",{"type":57,"value":575}," only if the user explicitly wants the copy materialised from day one (e.g. a like-for-like production promotion of a high-traffic endpoint). Note the caveats from ",{"type":52,"tag":93,"props":577,"children":579},{"className":578},[],[580],{"type":57,"value":260},{"type":57,"value":582},": queries with cohort breakdowns or compare mode, and insight kinds other than Trends\u002FLifecycle\u002FRetention (e.g. Funnels), are ",{"type":52,"tag":66,"props":584,"children":585},{},[586],{"type":57,"value":587},"not materialisable",{"type":57,"value":589}," — ",{"type":52,"tag":93,"props":591,"children":593},{"className":592},[],[594],{"type":57,"value":144},{"type":57,"value":596}," will simply create them unmaterialised regardless.",{"type":52,"tag":60,"props":598,"children":599},{},[600,602,607],{"type":57,"value":601},"Carry ",{"type":52,"tag":93,"props":603,"children":605},{"className":604},[],[606],{"type":57,"value":410},{"type":57,"value":608}," over unchanged unless the user wants different freshness in the target (remember it doubles as the materialisation refresh cadence).",{"type":52,"tag":288,"props":610,"children":612},{"id":611},"_6-create-the-copy",[613],{"type":57,"value":614},"6. Create the copy",{"type":52,"tag":60,"props":616,"children":617},{},[618,620,625],{"type":57,"value":619},"With the target project active, call ",{"type":52,"tag":93,"props":621,"children":623},{"className":622},[],[624],{"type":57,"value":144},{"type":57,"value":626}," with:",{"type":52,"tag":187,"props":628,"children":629},{},[630,640,656,666,676,694],{"type":52,"tag":121,"props":631,"children":632},{},[633,638],{"type":52,"tag":93,"props":634,"children":636},{"className":635},[],[637],{"type":57,"value":303},{"type":57,"value":639}," — from step 4",{"type":52,"tag":121,"props":641,"children":642},{},[643,648,650,655],{"type":52,"tag":93,"props":644,"children":646},{"className":645},[],[647],{"type":57,"value":382},{"type":57,"value":649}," — the source query captured in step 2, verbatim (this carries the variables\u002F",{"type":52,"tag":93,"props":651,"children":653},{"className":652},[],[654],{"type":57,"value":390},{"type":57,"value":392},{"type":52,"tag":121,"props":657,"children":658},{},[659,664],{"type":52,"tag":93,"props":660,"children":662},{"className":661},[],[663],{"type":57,"value":401},{"type":57,"value":665}," — from source (optionally note it's a copy)",{"type":52,"tag":121,"props":667,"children":668},{},[669,674],{"type":52,"tag":93,"props":670,"children":672},{"className":671},[],[673],{"type":57,"value":410},{"type":57,"value":675}," — from source unless the user changed it",{"type":52,"tag":121,"props":677,"children":678},{},[679,684,686,692],{"type":52,"tag":93,"props":680,"children":682},{"className":681},[],[683],{"type":57,"value":419},{"type":57,"value":685}," — from step 5 (default ",{"type":52,"tag":93,"props":687,"children":689},{"className":688},[],[690],{"type":57,"value":691},"false",{"type":57,"value":693},")",{"type":52,"tag":121,"props":695,"children":696},{},[697,702],{"type":52,"tag":93,"props":698,"children":700},{"className":699},[],[701],{"type":57,"value":430},{"type":57,"value":703}," — from source if the user wants them; drop tags that are meaningless in the target project",{"type":52,"tag":288,"props":705,"children":707},{"id":706},"_7-verify",[708],{"type":57,"value":709},"7. Verify",{"type":52,"tag":60,"props":711,"children":712},{},[713,714,720,722,728,730,736,738,743,745,750],{"type":57,"value":355},{"type":52,"tag":93,"props":715,"children":717},{"className":716},[],[718],{"type":57,"value":719},"endpoint-run",{"type":57,"value":721}," on the new endpoint with a representative ",{"type":52,"tag":93,"props":723,"children":725},{"className":724},[],[726],{"type":57,"value":727},"variables",{"type":57,"value":729}," payload and confirm the response shape matches the source. For a cross-project promotion, sanity-check that the underlying events\u002Fproperties the query references actually exist in the target project — a query that's valid in staging can return empty or error in a project with different taxonomy. If the copy is HogQL and callers rely on ",{"type":52,"tag":93,"props":731,"children":733},{"className":732},[],[734],{"type":57,"value":735},"offset",{"type":57,"value":737}," pagination, note that ",{"type":52,"tag":93,"props":739,"children":741},{"className":740},[],[742],{"type":57,"value":735},{"type":57,"value":744}," on ",{"type":52,"tag":93,"props":746,"children":748},{"className":747},[],[749],{"type":57,"value":719},{"type":57,"value":751}," is only supported for HogQL endpoints (not insight endpoints).",{"type":52,"tag":288,"props":753,"children":755},{"id":754},"_8-report",[756],{"type":57,"value":757},"8. Report",{"type":52,"tag":60,"props":759,"children":760},{},[761],{"type":57,"value":762},"Tell the user: the new endpoint's name and project, its materialisation state, its freshness setting, and the result of the verification run. If you switched the active project to do the copy, say which project is active now so they aren't surprised on their next call.",{"type":52,"tag":74,"props":764,"children":766},{"id":765},"important-notes",[767],{"type":57,"value":768},"Important notes",{"type":52,"tag":187,"props":770,"children":771},{},[772,789,819,836],{"type":52,"tag":121,"props":773,"children":774},{},[775,780,782,787],{"type":52,"tag":66,"props":776,"children":777},{},[778],{"type":57,"value":779},"The query is a copy, not a link.",{"type":57,"value":781}," Like creating an endpoint from an insight, the target endpoint owns its own copy of the query. Later edits to the source endpoint do ",{"type":52,"tag":66,"props":783,"children":784},{},[785],{"type":57,"value":786},"not",{"type":57,"value":788}," propagate to the copy.",{"type":52,"tag":121,"props":790,"children":791},{},[792,803,805,810,812,817],{"type":52,"tag":66,"props":793,"children":794},{},[795,797,802],{"type":57,"value":796},"Variables come along inside ",{"type":52,"tag":93,"props":798,"children":800},{"className":799},[],[801],{"type":57,"value":382},{"type":57,"value":133},{"type":57,"value":804}," HogQL ",{"type":52,"tag":93,"props":806,"children":808},{"className":807},[],[809],{"type":57,"value":390},{"type":57,"value":811}," variable declarations and insight breakdown variables live inside the query definition, so copying ",{"type":52,"tag":93,"props":813,"children":815},{"className":814},[],[816],{"type":57,"value":382},{"type":57,"value":818}," verbatim preserves them. Double-check the copy's variables in the verification run.",{"type":52,"tag":121,"props":820,"children":821},{},[822,827,829,834],{"type":52,"tag":66,"props":823,"children":824},{},[825],{"type":57,"value":826},"No undo.",{"type":57,"value":828}," ",{"type":52,"tag":93,"props":830,"children":832},{"className":831},[],[833],{"type":57,"value":144},{"type":57,"value":835}," makes a new endpoint (or fails if the name is taken). Always confirm the target name and project with the user before creating, especially when the target is production.",{"type":52,"tag":121,"props":837,"children":838},{},[839,844,846,851],{"type":52,"tag":66,"props":840,"children":841},{},[842],{"type":57,"value":843},"Access.",{"type":57,"value":845}," The user needs editor access on the target project's team; without it ",{"type":52,"tag":93,"props":847,"children":849},{"className":848},[],[850],{"type":57,"value":144},{"type":57,"value":852}," will be rejected.",{"type":52,"tag":74,"props":854,"children":856},{"id":855},"available-tools",[857],{"type":57,"value":858},"Available tools",{"type":52,"tag":187,"props":860,"children":861},{},[862,879,925,935,945],{"type":52,"tag":121,"props":863,"children":864},{},[865,870,872,878],{"type":52,"tag":93,"props":866,"children":868},{"className":867},[],[869],{"type":57,"value":131},{"type":57,"value":871}," — read the full source endpoint config (query, variables, freshness, materialisation, tags). Supports ",{"type":52,"tag":93,"props":873,"children":875},{"className":874},[],[876],{"type":57,"value":877},"?version=N",{"type":57,"value":133},{"type":52,"tag":121,"props":880,"children":881},{},[882,887,889,894,895,900,901,906,907,912,913,918,919,924],{"type":52,"tag":93,"props":883,"children":885},{"className":884},[],[886],{"type":57,"value":144},{"type":57,"value":888}," — create the copy in the active project. Fields: ",{"type":52,"tag":93,"props":890,"children":892},{"className":891},[],[893],{"type":57,"value":303},{"type":57,"value":522},{"type":52,"tag":93,"props":896,"children":898},{"className":897},[],[899],{"type":57,"value":382},{"type":57,"value":522},{"type":52,"tag":93,"props":902,"children":904},{"className":903},[],[905],{"type":57,"value":401},{"type":57,"value":522},{"type":52,"tag":93,"props":908,"children":910},{"className":909},[],[911],{"type":57,"value":410},{"type":57,"value":522},{"type":52,"tag":93,"props":914,"children":916},{"className":915},[],[917],{"type":57,"value":419},{"type":57,"value":522},{"type":52,"tag":93,"props":920,"children":922},{"className":921},[],[923],{"type":57,"value":430},{"type":57,"value":133},{"type":52,"tag":121,"props":926,"children":927},{},[928,933],{"type":52,"tag":93,"props":929,"children":931},{"className":930},[],[932],{"type":57,"value":278},{"type":57,"value":934}," — list endpoints in the active project; use to resolve a fuzzy source name and to check for a name collision in the target.",{"type":52,"tag":121,"props":936,"children":937},{},[938,943],{"type":52,"tag":93,"props":939,"children":941},{"className":940},[],[942],{"type":57,"value":719},{"type":57,"value":944}," — execute the new endpoint to verify the copy's response shape.",{"type":52,"tag":121,"props":946,"children":947},{},[948,953],{"type":52,"tag":93,"props":949,"children":951},{"className":950},[],[952],{"type":57,"value":342},{"type":57,"value":954}," — call with no id to confirm which project is currently active before reading the source or creating the copy.",{"items":956,"total":1056},[957,973,985,997,1010,1025,1039],{"slug":958,"name":958,"fn":959,"description":960,"org":961,"tags":962,"stars":20,"repoUrl":21,"updatedAt":972},"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},[963,965,968,971],{"name":964,"slug":28,"type":15},"Analytics",{"name":966,"slug":967,"type":15},"Cost Optimization","cost-optimization",{"name":969,"slug":970,"type":15},"Observability","observability",{"name":9,"slug":8,"type":15},"2026-07-28T05:34:11.117757",{"slug":974,"name":974,"fn":975,"description":976,"org":977,"tags":978,"stars":20,"repoUrl":21,"updatedAt":984},"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},[979,980,983],{"name":964,"slug":28,"type":15},{"name":981,"slug":982,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},"2026-06-08T08:08:33.693989",{"slug":986,"name":986,"fn":987,"description":988,"org":989,"tags":990,"stars":20,"repoUrl":21,"updatedAt":996},"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},[991,992,994,995],{"name":981,"slug":982,"type":15},{"name":993,"slug":30,"type":15},"Data Warehouse",{"name":969,"slug":970,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:22:57.67984",{"slug":998,"name":998,"fn":999,"description":1000,"org":1001,"tags":1002,"stars":20,"repoUrl":21,"updatedAt":1009},"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},[1003,1004,1005,1008],{"name":981,"slug":982,"type":15},{"name":993,"slug":30,"type":15},{"name":1006,"slug":1007,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-06-18T08:25:10.936787",{"slug":1011,"name":1011,"fn":1012,"description":1013,"org":1014,"tags":1015,"stars":20,"repoUrl":21,"updatedAt":1024},"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},[1016,1019,1022,1023],{"name":1017,"slug":1018,"type":15},"Alerting","alerting",{"name":1020,"slug":1021,"type":15},"Debugging","debugging",{"name":969,"slug":970,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:24:40.318583",{"slug":1026,"name":1026,"fn":1027,"description":1028,"org":1029,"tags":1030,"stars":20,"repoUrl":21,"updatedAt":1038},"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},[1031,1032,1035,1036,1037],{"name":964,"slug":28,"type":15},{"name":1033,"slug":1034,"type":15},"Monitoring","monitoring",{"name":969,"slug":970,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-18T05:10:54.430898",{"slug":1040,"name":1040,"fn":1041,"description":1042,"org":1043,"tags":1044,"stars":20,"repoUrl":21,"updatedAt":1055},"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},[1045,1048,1051,1052],{"name":1046,"slug":1047,"type":15},"Automation","automation",{"name":1049,"slug":1050,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},{"name":1053,"slug":1054,"type":15},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",61,{"items":1058,"total":1168},[1059,1066,1072,1079,1086,1093,1101,1108,1122,1135,1141,1159],{"slug":958,"name":958,"fn":959,"description":960,"org":1060,"tags":1061,"stars":20,"repoUrl":21,"updatedAt":972},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1062,1063,1064,1065],{"name":964,"slug":28,"type":15},{"name":966,"slug":967,"type":15},{"name":969,"slug":970,"type":15},{"name":9,"slug":8,"type":15},{"slug":974,"name":974,"fn":975,"description":976,"org":1067,"tags":1068,"stars":20,"repoUrl":21,"updatedAt":984},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1069,1070,1071],{"name":964,"slug":28,"type":15},{"name":981,"slug":982,"type":15},{"name":9,"slug":8,"type":15},{"slug":986,"name":986,"fn":987,"description":988,"org":1073,"tags":1074,"stars":20,"repoUrl":21,"updatedAt":996},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1075,1076,1077,1078],{"name":981,"slug":982,"type":15},{"name":993,"slug":30,"type":15},{"name":969,"slug":970,"type":15},{"name":9,"slug":8,"type":15},{"slug":998,"name":998,"fn":999,"description":1000,"org":1080,"tags":1081,"stars":20,"repoUrl":21,"updatedAt":1009},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1082,1083,1084,1085],{"name":981,"slug":982,"type":15},{"name":993,"slug":30,"type":15},{"name":1006,"slug":1007,"type":15},{"name":9,"slug":8,"type":15},{"slug":1011,"name":1011,"fn":1012,"description":1013,"org":1087,"tags":1088,"stars":20,"repoUrl":21,"updatedAt":1024},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1089,1090,1091,1092],{"name":1017,"slug":1018,"type":15},{"name":1020,"slug":1021,"type":15},{"name":969,"slug":970,"type":15},{"name":9,"slug":8,"type":15},{"slug":1026,"name":1026,"fn":1027,"description":1028,"org":1094,"tags":1095,"stars":20,"repoUrl":21,"updatedAt":1038},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1096,1097,1098,1099,1100],{"name":964,"slug":28,"type":15},{"name":1033,"slug":1034,"type":15},{"name":969,"slug":970,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":1040,"name":1040,"fn":1041,"description":1042,"org":1102,"tags":1103,"stars":20,"repoUrl":21,"updatedAt":1055},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1104,1105,1106,1107],{"name":1046,"slug":1047,"type":15},{"name":1049,"slug":1050,"type":15},{"name":9,"slug":8,"type":15},{"name":1053,"slug":1054,"type":15},{"slug":1109,"name":1109,"fn":1110,"description":1111,"org":1112,"tags":1113,"stars":20,"repoUrl":21,"updatedAt":1121},"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},[1114,1115,1116,1119,1120],{"name":964,"slug":28,"type":15},{"name":1020,"slug":1021,"type":15},{"name":1117,"slug":1118,"type":15},"Frontend","frontend",{"name":969,"slug":970,"type":15},{"name":9,"slug":8,"type":15},"2026-05-07T05:56:19.828048",{"slug":1123,"name":1123,"fn":1124,"description":1125,"org":1126,"tags":1127,"stars":20,"repoUrl":21,"updatedAt":1134},"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},[1128,1129,1130,1131],{"name":18,"slug":19,"type":15},{"name":1117,"slug":1118,"type":15},{"name":9,"slug":8,"type":15},{"name":1132,"slug":1133,"type":15},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":4,"name":4,"fn":5,"description":6,"org":1136,"tags":1137,"stars":20,"repoUrl":21,"updatedAt":22},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1138,1139,1140],{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":1142,"name":1142,"fn":1143,"description":1144,"org":1145,"tags":1146,"stars":20,"repoUrl":21,"updatedAt":1158},"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},[1147,1148,1151,1152,1155],{"name":1046,"slug":1047,"type":15},{"name":1149,"slug":1150,"type":15},"Email","email",{"name":9,"slug":8,"type":15},{"name":1153,"slug":1154,"type":15},"Reporting","reporting",{"name":1156,"slug":1157,"type":15},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":260,"name":260,"fn":1160,"description":1161,"org":1162,"tags":1163,"stars":20,"repoUrl":21,"updatedAt":1167},"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},[1164,1165,1166],{"name":964,"slug":28,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:29.624498",231]