[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-managing-path-cleaning-rules":3,"mdc--b9vbvz-key":48,"related-repo-posthog-managing-path-cleaning-rules":1758,"related-org-posthog-managing-path-cleaning-rules":1860},{"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":43,"sourceUrl":46,"mdContent":47},"managing-path-cleaning-rules","manage URL path cleaning rules","Inspects URL paths and proposes, tests, orders, and applies project-level path cleaning rules so dynamic segments (numeric IDs, UUIDs, slugs, dates) collapse into readable aliases. Use when the user says \"clean the paths\", \"normalize URLs\", \"group similar pages\", \"too many distinct paths\", \"\u002Fusers\u002F123 and \u002Fusers\u002F456 are the same page\", \"set up path cleaning\", or asks why a Web analytics or Paths breakdown is fragmented across thousands of nearly-identical URLs. Covers regex syntax (re2), alias placeholder convention, rule ordering, the test workflow, and applying rules via the path-cleaning-rules-update MCP tool.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,14,17,20],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Data Cleaning","data-cleaning",{"name":18,"slug":19,"type":13},"Analytics","analytics",{"name":21,"slug":22,"type":13},"Frontend","frontend",35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-31T05:52:00.945893",null,2977,[29,30,19,31,32,33,34,35,36,37,38,39,40,41,42],"ab-testing","ai-analytics","cdp","data-warehouse","experiments","feature-flags","javascript","product-analytics","python","react","session-replay","surveys","typescript","web-analytics",{"repoUrl":24,"stars":23,"forks":27,"topics":44,"description":45},[29,30,19,31,32,33,34,35,36,37,38,39,40,41,42],"🦔 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\u002Fweb_analytics\u002Fskills\u002Fmanaging-path-cleaning-rules","---\nname: managing-path-cleaning-rules\ndescription: 'Inspects URL paths and proposes, tests, orders, and applies project-level path cleaning rules so dynamic segments (numeric IDs, UUIDs, slugs, dates) collapse into readable aliases. Use when the user says \"clean the paths\", \"normalize URLs\", \"group similar pages\", \"too many distinct paths\", \"\u002Fusers\u002F123 and \u002Fusers\u002F456 are the same page\", \"set up path cleaning\", or asks why a Web analytics or Paths breakdown is fragmented across thousands of nearly-identical URLs. Covers regex syntax (re2), alias placeholder convention, rule ordering, the test workflow, and applying rules via the path-cleaning-rules-update MCP tool.'\n---\n\n# Managing path cleaning rules\n\nPath cleaning rules normalize `$pathname` and `$entry_pathname` so that pages\nsharing the same template (`\u002Fusers\u002F123\u002Fprofile`, `\u002Fusers\u002F456\u002Fprofile`, …) collapse\ninto one row (`\u002Fusers\u002F\u003Cid>\u002Fprofile`) in Web analytics tiles, Paths insights, and\nany HogQL query that calls `apply_path_cleaning`. They are the right answer when\na breakdown is fragmented across thousands of near-identical URLs.\n\nThis skill teaches you how to:\n\n- recognize when path cleaning is the right tool\n- inspect real paths to find what needs cleaning\n- write `regex` + `alias` rules in re2 syntax with the project's placeholder\n  convention\n- test rules before saving them\n- order rules so specific patterns aren't swallowed by generic ones\n- apply the rules via MCP\n\n## Data model\n\n`Team.path_cleaning_filters` is a JSON list of `PathCleaningFilter` objects:\n\n```json\n{\n  \"regex\": \"\u002Fusers\u002F\\\\d+\u002Fprofile\",\n  \"alias\": \"\u002Fusers\u002F\u003Cid>\u002Fprofile\",\n  \"order\": 0\n}\n```\n\n- **`regex`** — a [re2](https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fre2\u002Fwiki\u002FSyntax) pattern. No\n  need to escape `\u002F`. Anchor with `^` \u002F `$` when you mean it.\n- **`alias`** — the literal replacement. Use angle-bracket placeholders\n  (`\u003Cid>`, `\u003Cslug>`, `\u003Cuuid>`, `\u003Cdate>`) by convention so the cleaned path stays\n  human-readable. The alias is _not_ a regex template — backreferences are not\n  supported.\n- **`order`** — integer. Rules apply **sequentially** in `order` ascending,\n  each rule's output feeds the next.\n\nApplication is `replaceRegexpAll(pathname, regex, alias)` per rule, chained.\n\n## Workflow\n\n### 1. Confirm path cleaning is the right move\n\nAsk yourself: is the user complaining about cardinality (too many distinct paths\nin a chart), or do they want a per-URL drill-down? Path cleaning is for the\nformer. If they want per-URL data, suggest a property filter on `$pathname`\ninstead.\n\n### 2. Inspect the real paths\n\nDon't guess at patterns — query them. With the `execute-sql` MCP tool:\n\n```sql\nSELECT properties.$pathname AS path, count() AS views\nFROM events\nWHERE event = '$pageview'\n  AND timestamp > now() - INTERVAL 7 DAY\nGROUP BY path\nORDER BY views DESC\nLIMIT 200\n```\n\nScan the result for:\n\n- numeric IDs: `\u002Fusers\u002F123`, `\u002Forders\u002F4242`\n- UUIDs: `\u002Fsessions\u002F8f3c1a3b-…`\n- slugs: `\u002Fposts\u002Fwhy-i-love-posthog`\n- dates: `\u002Farchive\u002F2024-09-12`\n- locales: `\u002Fen-US\u002F`, `\u002Ffr-FR\u002F`\n- pagination: `?page=3`, `\u002Fpage\u002F3\u002F`\n\n### 3. Draft regex + alias\n\n| Pattern             | Example match          | `regex`                      | `alias`                |\n| ------------------- | ---------------------- | ---------------------------- | ---------------------- |\n| Numeric segment     | `\u002Fusers\u002F123\u002Fprofile`   | `\u002Fusers\u002F\\d+\u002Fprofile`         | `\u002Fusers\u002F\u003Cid>\u002Fprofile`  |\n| UUID v4             | `\u002Fsessions\u002F8f3c1a3b-…` | `\u002Fsessions\u002F[0-9a-f-]{36}`    | `\u002Fsessions\u002F\u003Cuuid>`     |\n| Slug                | `\u002Fposts\u002Fwhy-posthog`   | `\u002Fposts\u002F[a-z0-9-]+$`         | `\u002Fposts\u002F\u003Cslug>`        |\n| ISO date            | `\u002Farchive\u002F2024-09-12`  | `\u002Farchive\u002F\\d{4}-\\d{2}-\\d{2}` | `\u002Farchive\u002F\u003Cdate>`      |\n| Locale prefix       | `\u002Fen-US\u002Fabout`         | `^\u002F[a-z]{2}-[A-Z]{2}\u002F`       | `\u002F\u003Clocale>\u002F`           |\n| Trailing query\u002Fpage | `\u002Fblog?page=3`         | `\\?page=\\d+$`                | (empty alias drops it) |\n\nAnchoring rules of thumb:\n\n- start the regex with `^` only when the segment must be at the beginning of\n  the path\n- end with `$` to keep a generic rule (e.g. `\\d+$`) from matching mid-path\n  segments\n\n### 4. Test before saving\n\nThree options, pick one:\n\n- **Settings page tester**: `\u002Fsettings\u002Fproject#path_cleaning` has a built-in\n  \"test path\" input that replays the full ordered chain.\n- **Project HogQL** (via `execute-sql`):\n\n  ```sql\n  SELECT replaceRegexpAll('\u002Fusers\u002F42\u002Fprofile', '\u002Fusers\u002F\\d+\u002Fprofile', '\u002Fusers\u002F\u003Cid>\u002Fprofile')\n  ```\n\n  Chain `replaceRegexpAll` calls in the same order the rules will run if you\n  want to verify multi-rule interaction.\n\n- **Built-in AI helper**: there is already an `AiRegexHelper` modal accessible\n  from the rule editor (`Help me with Regex` button) that turns natural\n  language into a regex. Suggest it to the user when they say \"I don't know\n  regex\" — but always validate the output against real paths via the tester.\n\n### 5. Order rules from most-specific to most-general\n\nSequential application means a generic rule placed first will swallow\neverything that should have hit a specific rule.\n\n```text\norder=0  \u002Fusers\u002Fme\u002Fprofile        →  \u002Fusers\u002Fme\u002Fprofile     (specific, runs first)\norder=1  \u002Fusers\u002F\\d+\u002Fprofile       →  \u002Fusers\u002F\u003Cid>\u002Fprofile\norder=2  \u002Fusers\u002F[a-z0-9-]+        →  \u002Fusers\u002F\u003Cslug>          (catch-all, runs last)\n```\n\nIf `\u002Fusers\u002F[a-z0-9-]+` ran first it would also match `\u002Fusers\u002Fme\u002Fprofile` and\nmake the more specific rule unreachable.\n\n### 6. Apply via MCP\n\nPrefer the `path-cleaning-rules-update` tool. It reads the current rules,\napplies granular operations (`append`, `insert`, `replace`, `remove`,\n`reorder`), auto-numbers `order`, and — unless you pass `confirm: true` —\nreturns a **preview** of the resulting rules without saving. Pass\n`sample_paths` to see how the resulting set rewrites real paths.\n\nFirst call it without `confirm` to get the preview, surface that to the user,\nthen re-send the same call with `\"confirm\": true` to save:\n\n```json\n{\n  \"operations\": [{ \"action\": \"append\", \"alias\": \"\u002Fusers\u002F\u003Cid>\u002Fprofile\", \"regex\": \"\u002Fusers\u002F\\\\d+\u002Fprofile\" }],\n  \"sample_paths\": [\"\u002Fusers\u002F123\u002Fprofile\", \"\u002Fusers\u002Fme\u002Fprofile\"]\n}\n```\n\nBecause the tool does the read-modify-write for you, you don't have to fetch\nthe full list, renumber `order`, or risk clobbering existing rules — the common\nfailure mode when editing `path_cleaning_filters` directly.\n\nIf you must fall back to `project-settings-update` (whole-list overwrite),\nalways **read the existing rules first** and merge — overwriting silently\ndestroys whatever the team has already configured.\n\n## Where the rules apply\n\nWhen the user (or a HogQL query) opts in:\n\n- Web analytics: the **Path cleaning** toggle in the page header\n- Paths insights: the path cleaning toggle in the insight filters\n- HogQL: any query that calls `apply_path_cleaning(path_expr, team)`\n\nThe rules are stored once per project — they are not insight-scoped.\n\n## Common pitfalls\n\n- **Backreferences in `alias` need double-escaping** — ClickHouse's\n  `replaceRegexpAll` supports `\\0` (whole match) and `\\1`–`\\9` (capture\n  groups). In a JSON field or SQL string literal the backslash must be\n  doubled, so use `\\\\1` in `path_cleaning_filters` \u002F HogQL to get the `\\1`\n  backreference at the ClickHouse layer.\n- **Forgetting `$`** — `\\d+` without an end anchor matches every numeric run\n  in any path, so `\u002Fblog\u002F2024-09-12\u002Fpost` becomes\n  `\u002Fblog\u002F\u003Cnum>-\u003Cnum>-\u003Cnum>\u002Fpost` when you only meant to match the year\n  segment. Use `\\d+$` or `\\d+(\u002F|$)` depending on intent.\n- **Escaping `\u002F`** — re2 does not require it. `\\\u002F` works but adds noise.\n- **Case sensitivity** — re2 is case-sensitive by default. Use `(?i)` at the\n  start of the pattern for case-insensitive matching, e.g. `(?i)\u002Fusers\u002F\\d+`.\n- **Replacing the whole list** — the raw `path_cleaning_filters` field is\n  overwrite, not append. Use `path-cleaning-rules-update` (which does the\n  read-modify-write for you) instead of hand-editing the field; if you must\n  edit it directly, always start from the current list.\n- **Rules apply globally** — adding a rule can change historical numbers in\n  every Web analytics \u002F Paths chart that has cleaning enabled. Warn the user\n  before applying anything destructive.\n",{"data":49,"body":50},{"name":4,"description":6},{"type":51,"children":52},"root",[53,61,116,121,172,179,198,348,477,490,496,503,515,521,534,601,606,696,702,948,953,988,994,999,1091,1097,1102,1112,1133,1139,1218,1239,1450,1470,1490,1496,1501,1532,1537,1543,1752],{"type":54,"tag":55,"props":56,"children":57},"element","h1",{"id":4},[58],{"type":59,"value":60},"text","Managing path cleaning rules",{"type":54,"tag":62,"props":63,"children":64},"p",{},[65,67,74,76,82,84,90,92,98,100,106,108,114],{"type":59,"value":66},"Path cleaning rules normalize ",{"type":54,"tag":68,"props":69,"children":71},"code",{"className":70},[],[72],{"type":59,"value":73},"$pathname",{"type":59,"value":75}," and ",{"type":54,"tag":68,"props":77,"children":79},{"className":78},[],[80],{"type":59,"value":81},"$entry_pathname",{"type":59,"value":83}," so that pages\nsharing the same template (",{"type":54,"tag":68,"props":85,"children":87},{"className":86},[],[88],{"type":59,"value":89},"\u002Fusers\u002F123\u002Fprofile",{"type":59,"value":91},", ",{"type":54,"tag":68,"props":93,"children":95},{"className":94},[],[96],{"type":59,"value":97},"\u002Fusers\u002F456\u002Fprofile",{"type":59,"value":99},", …) collapse\ninto one row (",{"type":54,"tag":68,"props":101,"children":103},{"className":102},[],[104],{"type":59,"value":105},"\u002Fusers\u002F\u003Cid>\u002Fprofile",{"type":59,"value":107},") in Web analytics tiles, Paths insights, and\nany HogQL query that calls ",{"type":54,"tag":68,"props":109,"children":111},{"className":110},[],[112],{"type":59,"value":113},"apply_path_cleaning",{"type":59,"value":115},". They are the right answer when\na breakdown is fragmented across thousands of near-identical URLs.",{"type":54,"tag":62,"props":117,"children":118},{},[119],{"type":59,"value":120},"This skill teaches you how to:",{"type":54,"tag":122,"props":123,"children":124},"ul",{},[125,131,136,157,162,167],{"type":54,"tag":126,"props":127,"children":128},"li",{},[129],{"type":59,"value":130},"recognize when path cleaning is the right tool",{"type":54,"tag":126,"props":132,"children":133},{},[134],{"type":59,"value":135},"inspect real paths to find what needs cleaning",{"type":54,"tag":126,"props":137,"children":138},{},[139,141,147,149,155],{"type":59,"value":140},"write ",{"type":54,"tag":68,"props":142,"children":144},{"className":143},[],[145],{"type":59,"value":146},"regex",{"type":59,"value":148}," + ",{"type":54,"tag":68,"props":150,"children":152},{"className":151},[],[153],{"type":59,"value":154},"alias",{"type":59,"value":156}," rules in re2 syntax with the project's placeholder\nconvention",{"type":54,"tag":126,"props":158,"children":159},{},[160],{"type":59,"value":161},"test rules before saving them",{"type":54,"tag":126,"props":163,"children":164},{},[165],{"type":59,"value":166},"order rules so specific patterns aren't swallowed by generic ones",{"type":54,"tag":126,"props":168,"children":169},{},[170],{"type":59,"value":171},"apply the rules via MCP",{"type":54,"tag":173,"props":174,"children":176},"h2",{"id":175},"data-model",[177],{"type":59,"value":178},"Data model",{"type":54,"tag":62,"props":180,"children":181},{},[182,188,190,196],{"type":54,"tag":68,"props":183,"children":185},{"className":184},[],[186],{"type":59,"value":187},"Team.path_cleaning_filters",{"type":59,"value":189}," is a JSON list of ",{"type":54,"tag":68,"props":191,"children":193},{"className":192},[],[194],{"type":59,"value":195},"PathCleaningFilter",{"type":59,"value":197}," objects:",{"type":54,"tag":199,"props":200,"children":205},"pre",{"className":201,"code":202,"language":203,"meta":204,"style":204},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"regex\": \"\u002Fusers\u002F\\\\d+\u002Fprofile\",\n  \"alias\": \"\u002Fusers\u002F\u003Cid>\u002Fprofile\",\n  \"order\": 0\n}\n","json","",[206],{"type":54,"tag":68,"props":207,"children":208},{"__ignoreMap":204},[209,221,276,312,339],{"type":54,"tag":210,"props":211,"children":214},"span",{"class":212,"line":213},"line",1,[215],{"type":54,"tag":210,"props":216,"children":218},{"style":217},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[219],{"type":59,"value":220},"{\n",{"type":54,"tag":210,"props":222,"children":224},{"class":212,"line":223},2,[225,230,235,240,245,250,256,262,267,271],{"type":54,"tag":210,"props":226,"children":227},{"style":217},[228],{"type":59,"value":229},"  \"",{"type":54,"tag":210,"props":231,"children":233},{"style":232},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[234],{"type":59,"value":146},{"type":54,"tag":210,"props":236,"children":237},{"style":217},[238],{"type":59,"value":239},"\"",{"type":54,"tag":210,"props":241,"children":242},{"style":217},[243],{"type":59,"value":244},":",{"type":54,"tag":210,"props":246,"children":247},{"style":217},[248],{"type":59,"value":249}," \"",{"type":54,"tag":210,"props":251,"children":253},{"style":252},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[254],{"type":59,"value":255},"\u002Fusers\u002F",{"type":54,"tag":210,"props":257,"children":259},{"style":258},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[260],{"type":59,"value":261},"\\\\",{"type":54,"tag":210,"props":263,"children":264},{"style":252},[265],{"type":59,"value":266},"d+\u002Fprofile",{"type":54,"tag":210,"props":268,"children":269},{"style":217},[270],{"type":59,"value":239},{"type":54,"tag":210,"props":272,"children":273},{"style":217},[274],{"type":59,"value":275},",\n",{"type":54,"tag":210,"props":277,"children":279},{"class":212,"line":278},3,[280,284,288,292,296,300,304,308],{"type":54,"tag":210,"props":281,"children":282},{"style":217},[283],{"type":59,"value":229},{"type":54,"tag":210,"props":285,"children":286},{"style":232},[287],{"type":59,"value":154},{"type":54,"tag":210,"props":289,"children":290},{"style":217},[291],{"type":59,"value":239},{"type":54,"tag":210,"props":293,"children":294},{"style":217},[295],{"type":59,"value":244},{"type":54,"tag":210,"props":297,"children":298},{"style":217},[299],{"type":59,"value":249},{"type":54,"tag":210,"props":301,"children":302},{"style":252},[303],{"type":59,"value":105},{"type":54,"tag":210,"props":305,"children":306},{"style":217},[307],{"type":59,"value":239},{"type":54,"tag":210,"props":309,"children":310},{"style":217},[311],{"type":59,"value":275},{"type":54,"tag":210,"props":313,"children":315},{"class":212,"line":314},4,[316,320,325,329,333],{"type":54,"tag":210,"props":317,"children":318},{"style":217},[319],{"type":59,"value":229},{"type":54,"tag":210,"props":321,"children":322},{"style":232},[323],{"type":59,"value":324},"order",{"type":54,"tag":210,"props":326,"children":327},{"style":217},[328],{"type":59,"value":239},{"type":54,"tag":210,"props":330,"children":331},{"style":217},[332],{"type":59,"value":244},{"type":54,"tag":210,"props":334,"children":336},{"style":335},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[337],{"type":59,"value":338}," 0\n",{"type":54,"tag":210,"props":340,"children":342},{"class":212,"line":341},5,[343],{"type":54,"tag":210,"props":344,"children":345},{"style":217},[346],{"type":59,"value":347},"}\n",{"type":54,"tag":122,"props":349,"children":350},{},[351,400,450],{"type":54,"tag":126,"props":352,"children":353},{},[354,363,365,374,376,382,384,390,392,398],{"type":54,"tag":355,"props":356,"children":357},"strong",{},[358],{"type":54,"tag":68,"props":359,"children":361},{"className":360},[],[362],{"type":59,"value":146},{"type":59,"value":364}," — a ",{"type":54,"tag":366,"props":367,"children":371},"a",{"href":368,"rel":369},"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fre2\u002Fwiki\u002FSyntax",[370],"nofollow",[372],{"type":59,"value":373},"re2",{"type":59,"value":375}," pattern. No\nneed to escape ",{"type":54,"tag":68,"props":377,"children":379},{"className":378},[],[380],{"type":59,"value":381},"\u002F",{"type":59,"value":383},". Anchor with ",{"type":54,"tag":68,"props":385,"children":387},{"className":386},[],[388],{"type":59,"value":389},"^",{"type":59,"value":391}," \u002F ",{"type":54,"tag":68,"props":393,"children":395},{"className":394},[],[396],{"type":59,"value":397},"$",{"type":59,"value":399}," when you mean it.",{"type":54,"tag":126,"props":401,"children":402},{},[403,411,413,419,420,426,427,433,434,440,442,448],{"type":54,"tag":355,"props":404,"children":405},{},[406],{"type":54,"tag":68,"props":407,"children":409},{"className":408},[],[410],{"type":59,"value":154},{"type":59,"value":412}," — the literal replacement. Use angle-bracket placeholders\n(",{"type":54,"tag":68,"props":414,"children":416},{"className":415},[],[417],{"type":59,"value":418},"\u003Cid>",{"type":59,"value":91},{"type":54,"tag":68,"props":421,"children":423},{"className":422},[],[424],{"type":59,"value":425},"\u003Cslug>",{"type":59,"value":91},{"type":54,"tag":68,"props":428,"children":430},{"className":429},[],[431],{"type":59,"value":432},"\u003Cuuid>",{"type":59,"value":91},{"type":54,"tag":68,"props":435,"children":437},{"className":436},[],[438],{"type":59,"value":439},"\u003Cdate>",{"type":59,"value":441},") by convention so the cleaned path stays\nhuman-readable. The alias is ",{"type":54,"tag":443,"props":444,"children":445},"em",{},[446],{"type":59,"value":447},"not",{"type":59,"value":449}," a regex template — backreferences are not\nsupported.",{"type":54,"tag":126,"props":451,"children":452},{},[453,461,463,468,470,475],{"type":54,"tag":355,"props":454,"children":455},{},[456],{"type":54,"tag":68,"props":457,"children":459},{"className":458},[],[460],{"type":59,"value":324},{"type":59,"value":462}," — integer. Rules apply ",{"type":54,"tag":355,"props":464,"children":465},{},[466],{"type":59,"value":467},"sequentially",{"type":59,"value":469}," in ",{"type":54,"tag":68,"props":471,"children":473},{"className":472},[],[474],{"type":59,"value":324},{"type":59,"value":476}," ascending,\neach rule's output feeds the next.",{"type":54,"tag":62,"props":478,"children":479},{},[480,482,488],{"type":59,"value":481},"Application is ",{"type":54,"tag":68,"props":483,"children":485},{"className":484},[],[486],{"type":59,"value":487},"replaceRegexpAll(pathname, regex, alias)",{"type":59,"value":489}," per rule, chained.",{"type":54,"tag":173,"props":491,"children":493},{"id":492},"workflow",[494],{"type":59,"value":495},"Workflow",{"type":54,"tag":497,"props":498,"children":500},"h3",{"id":499},"_1-confirm-path-cleaning-is-the-right-move",[501],{"type":59,"value":502},"1. Confirm path cleaning is the right move",{"type":54,"tag":62,"props":504,"children":505},{},[506,508,513],{"type":59,"value":507},"Ask yourself: is the user complaining about cardinality (too many distinct paths\nin a chart), or do they want a per-URL drill-down? Path cleaning is for the\nformer. If they want per-URL data, suggest a property filter on ",{"type":54,"tag":68,"props":509,"children":511},{"className":510},[],[512],{"type":59,"value":73},{"type":59,"value":514},"\ninstead.",{"type":54,"tag":497,"props":516,"children":518},{"id":517},"_2-inspect-the-real-paths",[519],{"type":59,"value":520},"2. Inspect the real paths",{"type":54,"tag":62,"props":522,"children":523},{},[524,526,532],{"type":59,"value":525},"Don't guess at patterns — query them. With the ",{"type":54,"tag":68,"props":527,"children":529},{"className":528},[],[530],{"type":59,"value":531},"execute-sql",{"type":59,"value":533}," MCP tool:",{"type":54,"tag":199,"props":535,"children":539},{"className":536,"code":537,"language":538,"meta":204,"style":204},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","SELECT properties.$pathname AS path, count() AS views\nFROM events\nWHERE event = '$pageview'\n  AND timestamp > now() - INTERVAL 7 DAY\nGROUP BY path\nORDER BY views DESC\nLIMIT 200\n","sql",[540],{"type":54,"tag":68,"props":541,"children":542},{"__ignoreMap":204},[543,551,559,567,575,583,592],{"type":54,"tag":210,"props":544,"children":545},{"class":212,"line":213},[546],{"type":54,"tag":210,"props":547,"children":548},{},[549],{"type":59,"value":550},"SELECT properties.$pathname AS path, count() AS views\n",{"type":54,"tag":210,"props":552,"children":553},{"class":212,"line":223},[554],{"type":54,"tag":210,"props":555,"children":556},{},[557],{"type":59,"value":558},"FROM events\n",{"type":54,"tag":210,"props":560,"children":561},{"class":212,"line":278},[562],{"type":54,"tag":210,"props":563,"children":564},{},[565],{"type":59,"value":566},"WHERE event = '$pageview'\n",{"type":54,"tag":210,"props":568,"children":569},{"class":212,"line":314},[570],{"type":54,"tag":210,"props":571,"children":572},{},[573],{"type":59,"value":574},"  AND timestamp > now() - INTERVAL 7 DAY\n",{"type":54,"tag":210,"props":576,"children":577},{"class":212,"line":341},[578],{"type":54,"tag":210,"props":579,"children":580},{},[581],{"type":59,"value":582},"GROUP BY path\n",{"type":54,"tag":210,"props":584,"children":586},{"class":212,"line":585},6,[587],{"type":54,"tag":210,"props":588,"children":589},{},[590],{"type":59,"value":591},"ORDER BY views DESC\n",{"type":54,"tag":210,"props":593,"children":595},{"class":212,"line":594},7,[596],{"type":54,"tag":210,"props":597,"children":598},{},[599],{"type":59,"value":600},"LIMIT 200\n",{"type":54,"tag":62,"props":602,"children":603},{},[604],{"type":59,"value":605},"Scan the result for:",{"type":54,"tag":122,"props":607,"children":608},{},[609,627,638,649,660,678],{"type":54,"tag":126,"props":610,"children":611},{},[612,614,620,621],{"type":59,"value":613},"numeric IDs: ",{"type":54,"tag":68,"props":615,"children":617},{"className":616},[],[618],{"type":59,"value":619},"\u002Fusers\u002F123",{"type":59,"value":91},{"type":54,"tag":68,"props":622,"children":624},{"className":623},[],[625],{"type":59,"value":626},"\u002Forders\u002F4242",{"type":54,"tag":126,"props":628,"children":629},{},[630,632],{"type":59,"value":631},"UUIDs: ",{"type":54,"tag":68,"props":633,"children":635},{"className":634},[],[636],{"type":59,"value":637},"\u002Fsessions\u002F8f3c1a3b-…",{"type":54,"tag":126,"props":639,"children":640},{},[641,643],{"type":59,"value":642},"slugs: ",{"type":54,"tag":68,"props":644,"children":646},{"className":645},[],[647],{"type":59,"value":648},"\u002Fposts\u002Fwhy-i-love-posthog",{"type":54,"tag":126,"props":650,"children":651},{},[652,654],{"type":59,"value":653},"dates: ",{"type":54,"tag":68,"props":655,"children":657},{"className":656},[],[658],{"type":59,"value":659},"\u002Farchive\u002F2024-09-12",{"type":54,"tag":126,"props":661,"children":662},{},[663,665,671,672],{"type":59,"value":664},"locales: ",{"type":54,"tag":68,"props":666,"children":668},{"className":667},[],[669],{"type":59,"value":670},"\u002Fen-US\u002F",{"type":59,"value":91},{"type":54,"tag":68,"props":673,"children":675},{"className":674},[],[676],{"type":59,"value":677},"\u002Ffr-FR\u002F",{"type":54,"tag":126,"props":679,"children":680},{},[681,683,689,690],{"type":59,"value":682},"pagination: ",{"type":54,"tag":68,"props":684,"children":686},{"className":685},[],[687],{"type":59,"value":688},"?page=3",{"type":59,"value":91},{"type":54,"tag":68,"props":691,"children":693},{"className":692},[],[694],{"type":59,"value":695},"\u002Fpage\u002F3\u002F",{"type":54,"tag":497,"props":697,"children":699},{"id":698},"_3-draft-regex-alias",[700],{"type":59,"value":701},"3. Draft regex + alias",{"type":54,"tag":703,"props":704,"children":705},"table",{},[706,741],{"type":54,"tag":707,"props":708,"children":709},"thead",{},[710],{"type":54,"tag":711,"props":712,"children":713},"tr",{},[714,720,725,733],{"type":54,"tag":715,"props":716,"children":717},"th",{},[718],{"type":59,"value":719},"Pattern",{"type":54,"tag":715,"props":721,"children":722},{},[723],{"type":59,"value":724},"Example match",{"type":54,"tag":715,"props":726,"children":727},{},[728],{"type":54,"tag":68,"props":729,"children":731},{"className":730},[],[732],{"type":59,"value":146},{"type":54,"tag":715,"props":734,"children":735},{},[736],{"type":54,"tag":68,"props":737,"children":739},{"className":738},[],[740],{"type":59,"value":154},{"type":54,"tag":742,"props":743,"children":744},"tbody",{},[745,779,813,848,882,917],{"type":54,"tag":711,"props":746,"children":747},{},[748,754,762,771],{"type":54,"tag":749,"props":750,"children":751},"td",{},[752],{"type":59,"value":753},"Numeric segment",{"type":54,"tag":749,"props":755,"children":756},{},[757],{"type":54,"tag":68,"props":758,"children":760},{"className":759},[],[761],{"type":59,"value":89},{"type":54,"tag":749,"props":763,"children":764},{},[765],{"type":54,"tag":68,"props":766,"children":768},{"className":767},[],[769],{"type":59,"value":770},"\u002Fusers\u002F\\d+\u002Fprofile",{"type":54,"tag":749,"props":772,"children":773},{},[774],{"type":54,"tag":68,"props":775,"children":777},{"className":776},[],[778],{"type":59,"value":105},{"type":54,"tag":711,"props":780,"children":781},{},[782,787,795,804],{"type":54,"tag":749,"props":783,"children":784},{},[785],{"type":59,"value":786},"UUID v4",{"type":54,"tag":749,"props":788,"children":789},{},[790],{"type":54,"tag":68,"props":791,"children":793},{"className":792},[],[794],{"type":59,"value":637},{"type":54,"tag":749,"props":796,"children":797},{},[798],{"type":54,"tag":68,"props":799,"children":801},{"className":800},[],[802],{"type":59,"value":803},"\u002Fsessions\u002F[0-9a-f-]{36}",{"type":54,"tag":749,"props":805,"children":806},{},[807],{"type":54,"tag":68,"props":808,"children":810},{"className":809},[],[811],{"type":59,"value":812},"\u002Fsessions\u002F\u003Cuuid>",{"type":54,"tag":711,"props":814,"children":815},{},[816,821,830,839],{"type":54,"tag":749,"props":817,"children":818},{},[819],{"type":59,"value":820},"Slug",{"type":54,"tag":749,"props":822,"children":823},{},[824],{"type":54,"tag":68,"props":825,"children":827},{"className":826},[],[828],{"type":59,"value":829},"\u002Fposts\u002Fwhy-posthog",{"type":54,"tag":749,"props":831,"children":832},{},[833],{"type":54,"tag":68,"props":834,"children":836},{"className":835},[],[837],{"type":59,"value":838},"\u002Fposts\u002F[a-z0-9-]+$",{"type":54,"tag":749,"props":840,"children":841},{},[842],{"type":54,"tag":68,"props":843,"children":845},{"className":844},[],[846],{"type":59,"value":847},"\u002Fposts\u002F\u003Cslug>",{"type":54,"tag":711,"props":849,"children":850},{},[851,856,864,873],{"type":54,"tag":749,"props":852,"children":853},{},[854],{"type":59,"value":855},"ISO date",{"type":54,"tag":749,"props":857,"children":858},{},[859],{"type":54,"tag":68,"props":860,"children":862},{"className":861},[],[863],{"type":59,"value":659},{"type":54,"tag":749,"props":865,"children":866},{},[867],{"type":54,"tag":68,"props":868,"children":870},{"className":869},[],[871],{"type":59,"value":872},"\u002Farchive\u002F\\d{4}-\\d{2}-\\d{2}",{"type":54,"tag":749,"props":874,"children":875},{},[876],{"type":54,"tag":68,"props":877,"children":879},{"className":878},[],[880],{"type":59,"value":881},"\u002Farchive\u002F\u003Cdate>",{"type":54,"tag":711,"props":883,"children":884},{},[885,890,899,908],{"type":54,"tag":749,"props":886,"children":887},{},[888],{"type":59,"value":889},"Locale prefix",{"type":54,"tag":749,"props":891,"children":892},{},[893],{"type":54,"tag":68,"props":894,"children":896},{"className":895},[],[897],{"type":59,"value":898},"\u002Fen-US\u002Fabout",{"type":54,"tag":749,"props":900,"children":901},{},[902],{"type":54,"tag":68,"props":903,"children":905},{"className":904},[],[906],{"type":59,"value":907},"^\u002F[a-z]{2}-[A-Z]{2}\u002F",{"type":54,"tag":749,"props":909,"children":910},{},[911],{"type":54,"tag":68,"props":912,"children":914},{"className":913},[],[915],{"type":59,"value":916},"\u002F\u003Clocale>\u002F",{"type":54,"tag":711,"props":918,"children":919},{},[920,925,934,943],{"type":54,"tag":749,"props":921,"children":922},{},[923],{"type":59,"value":924},"Trailing query\u002Fpage",{"type":54,"tag":749,"props":926,"children":927},{},[928],{"type":54,"tag":68,"props":929,"children":931},{"className":930},[],[932],{"type":59,"value":933},"\u002Fblog?page=3",{"type":54,"tag":749,"props":935,"children":936},{},[937],{"type":54,"tag":68,"props":938,"children":940},{"className":939},[],[941],{"type":59,"value":942},"\\?page=\\d+$",{"type":54,"tag":749,"props":944,"children":945},{},[946],{"type":59,"value":947},"(empty alias drops it)",{"type":54,"tag":62,"props":949,"children":950},{},[951],{"type":59,"value":952},"Anchoring rules of thumb:",{"type":54,"tag":122,"props":954,"children":955},{},[956,968],{"type":54,"tag":126,"props":957,"children":958},{},[959,961,966],{"type":59,"value":960},"start the regex with ",{"type":54,"tag":68,"props":962,"children":964},{"className":963},[],[965],{"type":59,"value":389},{"type":59,"value":967}," only when the segment must be at the beginning of\nthe path",{"type":54,"tag":126,"props":969,"children":970},{},[971,973,978,980,986],{"type":59,"value":972},"end with ",{"type":54,"tag":68,"props":974,"children":976},{"className":975},[],[977],{"type":59,"value":397},{"type":59,"value":979}," to keep a generic rule (e.g. ",{"type":54,"tag":68,"props":981,"children":983},{"className":982},[],[984],{"type":59,"value":985},"\\d+$",{"type":59,"value":987},") from matching mid-path\nsegments",{"type":54,"tag":497,"props":989,"children":991},{"id":990},"_4-test-before-saving",[992],{"type":59,"value":993},"4. Test before saving",{"type":54,"tag":62,"props":995,"children":996},{},[997],{"type":59,"value":998},"Three options, pick one:",{"type":54,"tag":122,"props":1000,"children":1001},{},[1002,1020,1065],{"type":54,"tag":126,"props":1003,"children":1004},{},[1005,1010,1012,1018],{"type":54,"tag":355,"props":1006,"children":1007},{},[1008],{"type":59,"value":1009},"Settings page tester",{"type":59,"value":1011},": ",{"type":54,"tag":68,"props":1013,"children":1015},{"className":1014},[],[1016],{"type":59,"value":1017},"\u002Fsettings\u002Fproject#path_cleaning",{"type":59,"value":1019}," has a built-in\n\"test path\" input that replays the full ordered chain.",{"type":54,"tag":126,"props":1021,"children":1022},{},[1023,1028,1030,1035,1037,1051,1055,1057,1063],{"type":54,"tag":355,"props":1024,"children":1025},{},[1026],{"type":59,"value":1027},"Project HogQL",{"type":59,"value":1029}," (via ",{"type":54,"tag":68,"props":1031,"children":1033},{"className":1032},[],[1034],{"type":59,"value":531},{"type":59,"value":1036},"):",{"type":54,"tag":199,"props":1038,"children":1040},{"className":536,"code":1039,"language":538,"meta":204,"style":204},"SELECT replaceRegexpAll('\u002Fusers\u002F42\u002Fprofile', '\u002Fusers\u002F\\d+\u002Fprofile', '\u002Fusers\u002F\u003Cid>\u002Fprofile')\n",[1041],{"type":54,"tag":68,"props":1042,"children":1043},{"__ignoreMap":204},[1044],{"type":54,"tag":210,"props":1045,"children":1046},{"class":212,"line":213},[1047],{"type":54,"tag":210,"props":1048,"children":1049},{},[1050],{"type":59,"value":1039},{"type":54,"tag":1052,"props":1053,"children":1054},"br",{},[],{"type":59,"value":1056},"Chain ",{"type":54,"tag":68,"props":1058,"children":1060},{"className":1059},[],[1061],{"type":59,"value":1062},"replaceRegexpAll",{"type":59,"value":1064}," calls in the same order the rules will run if you\nwant to verify multi-rule interaction.",{"type":54,"tag":126,"props":1066,"children":1067},{},[1068,1073,1075,1081,1083,1089],{"type":54,"tag":355,"props":1069,"children":1070},{},[1071],{"type":59,"value":1072},"Built-in AI helper",{"type":59,"value":1074},": there is already an ",{"type":54,"tag":68,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":59,"value":1080},"AiRegexHelper",{"type":59,"value":1082}," modal accessible\nfrom the rule editor (",{"type":54,"tag":68,"props":1084,"children":1086},{"className":1085},[],[1087],{"type":59,"value":1088},"Help me with Regex",{"type":59,"value":1090}," button) that turns natural\nlanguage into a regex. Suggest it to the user when they say \"I don't know\nregex\" — but always validate the output against real paths via the tester.",{"type":54,"tag":497,"props":1092,"children":1094},{"id":1093},"_5-order-rules-from-most-specific-to-most-general",[1095],{"type":59,"value":1096},"5. Order rules from most-specific to most-general",{"type":54,"tag":62,"props":1098,"children":1099},{},[1100],{"type":59,"value":1101},"Sequential application means a generic rule placed first will swallow\neverything that should have hit a specific rule.",{"type":54,"tag":199,"props":1103,"children":1107},{"className":1104,"code":1106,"language":59,"meta":204},[1105],"language-text","order=0  \u002Fusers\u002Fme\u002Fprofile        →  \u002Fusers\u002Fme\u002Fprofile     (specific, runs first)\norder=1  \u002Fusers\u002F\\d+\u002Fprofile       →  \u002Fusers\u002F\u003Cid>\u002Fprofile\norder=2  \u002Fusers\u002F[a-z0-9-]+        →  \u002Fusers\u002F\u003Cslug>          (catch-all, runs last)\n",[1108],{"type":54,"tag":68,"props":1109,"children":1110},{"__ignoreMap":204},[1111],{"type":59,"value":1106},{"type":54,"tag":62,"props":1113,"children":1114},{},[1115,1117,1123,1125,1131],{"type":59,"value":1116},"If ",{"type":54,"tag":68,"props":1118,"children":1120},{"className":1119},[],[1121],{"type":59,"value":1122},"\u002Fusers\u002F[a-z0-9-]+",{"type":59,"value":1124}," ran first it would also match ",{"type":54,"tag":68,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":59,"value":1130},"\u002Fusers\u002Fme\u002Fprofile",{"type":59,"value":1132}," and\nmake the more specific rule unreachable.",{"type":54,"tag":497,"props":1134,"children":1136},{"id":1135},"_6-apply-via-mcp",[1137],{"type":59,"value":1138},"6. Apply via MCP",{"type":54,"tag":62,"props":1140,"children":1141},{},[1142,1144,1150,1152,1158,1159,1165,1166,1172,1173,1179,1180,1186,1188,1193,1195,1201,1203,1208,1210,1216],{"type":59,"value":1143},"Prefer the ",{"type":54,"tag":68,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":59,"value":1149},"path-cleaning-rules-update",{"type":59,"value":1151}," tool. It reads the current rules,\napplies granular operations (",{"type":54,"tag":68,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":59,"value":1157},"append",{"type":59,"value":91},{"type":54,"tag":68,"props":1160,"children":1162},{"className":1161},[],[1163],{"type":59,"value":1164},"insert",{"type":59,"value":91},{"type":54,"tag":68,"props":1167,"children":1169},{"className":1168},[],[1170],{"type":59,"value":1171},"replace",{"type":59,"value":91},{"type":54,"tag":68,"props":1174,"children":1176},{"className":1175},[],[1177],{"type":59,"value":1178},"remove",{"type":59,"value":275},{"type":54,"tag":68,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":59,"value":1185},"reorder",{"type":59,"value":1187},"), auto-numbers ",{"type":54,"tag":68,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":59,"value":324},{"type":59,"value":1194},", and — unless you pass ",{"type":54,"tag":68,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":59,"value":1200},"confirm: true",{"type":59,"value":1202}," —\nreturns a ",{"type":54,"tag":355,"props":1204,"children":1205},{},[1206],{"type":59,"value":1207},"preview",{"type":59,"value":1209}," of the resulting rules without saving. Pass\n",{"type":54,"tag":68,"props":1211,"children":1213},{"className":1212},[],[1214],{"type":59,"value":1215},"sample_paths",{"type":59,"value":1217}," to see how the resulting set rewrites real paths.",{"type":54,"tag":62,"props":1219,"children":1220},{},[1221,1223,1229,1231,1237],{"type":59,"value":1222},"First call it without ",{"type":54,"tag":68,"props":1224,"children":1226},{"className":1225},[],[1227],{"type":59,"value":1228},"confirm",{"type":59,"value":1230}," to get the preview, surface that to the user,\nthen re-send the same call with ",{"type":54,"tag":68,"props":1232,"children":1234},{"className":1233},[],[1235],{"type":59,"value":1236},"\"confirm\": true",{"type":59,"value":1238}," to save:",{"type":54,"tag":199,"props":1240,"children":1242},{"className":201,"code":1241,"language":203,"meta":204,"style":204},"{\n  \"operations\": [{ \"action\": \"append\", \"alias\": \"\u002Fusers\u002F\u003Cid>\u002Fprofile\", \"regex\": \"\u002Fusers\u002F\\\\d+\u002Fprofile\" }],\n  \"sample_paths\": [\"\u002Fusers\u002F123\u002Fprofile\", \"\u002Fusers\u002Fme\u002Fprofile\"]\n}\n",[1243],{"type":54,"tag":68,"props":1244,"children":1245},{"__ignoreMap":204},[1246,1253,1386,1443],{"type":54,"tag":210,"props":1247,"children":1248},{"class":212,"line":213},[1249],{"type":54,"tag":210,"props":1250,"children":1251},{"style":217},[1252],{"type":59,"value":220},{"type":54,"tag":210,"props":1254,"children":1255},{"class":212,"line":223},[1256,1260,1265,1269,1273,1278,1282,1288,1292,1296,1300,1304,1308,1313,1317,1321,1325,1329,1333,1337,1341,1345,1349,1353,1357,1361,1365,1369,1373,1377,1381],{"type":54,"tag":210,"props":1257,"children":1258},{"style":217},[1259],{"type":59,"value":229},{"type":54,"tag":210,"props":1261,"children":1262},{"style":232},[1263],{"type":59,"value":1264},"operations",{"type":54,"tag":210,"props":1266,"children":1267},{"style":217},[1268],{"type":59,"value":239},{"type":54,"tag":210,"props":1270,"children":1271},{"style":217},[1272],{"type":59,"value":244},{"type":54,"tag":210,"props":1274,"children":1275},{"style":217},[1276],{"type":59,"value":1277}," [{",{"type":54,"tag":210,"props":1279,"children":1280},{"style":217},[1281],{"type":59,"value":249},{"type":54,"tag":210,"props":1283,"children":1285},{"style":1284},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1286],{"type":59,"value":1287},"action",{"type":54,"tag":210,"props":1289,"children":1290},{"style":217},[1291],{"type":59,"value":239},{"type":54,"tag":210,"props":1293,"children":1294},{"style":217},[1295],{"type":59,"value":244},{"type":54,"tag":210,"props":1297,"children":1298},{"style":217},[1299],{"type":59,"value":249},{"type":54,"tag":210,"props":1301,"children":1302},{"style":252},[1303],{"type":59,"value":1157},{"type":54,"tag":210,"props":1305,"children":1306},{"style":217},[1307],{"type":59,"value":239},{"type":54,"tag":210,"props":1309,"children":1310},{"style":217},[1311],{"type":59,"value":1312},",",{"type":54,"tag":210,"props":1314,"children":1315},{"style":217},[1316],{"type":59,"value":249},{"type":54,"tag":210,"props":1318,"children":1319},{"style":1284},[1320],{"type":59,"value":154},{"type":54,"tag":210,"props":1322,"children":1323},{"style":217},[1324],{"type":59,"value":239},{"type":54,"tag":210,"props":1326,"children":1327},{"style":217},[1328],{"type":59,"value":244},{"type":54,"tag":210,"props":1330,"children":1331},{"style":217},[1332],{"type":59,"value":249},{"type":54,"tag":210,"props":1334,"children":1335},{"style":252},[1336],{"type":59,"value":105},{"type":54,"tag":210,"props":1338,"children":1339},{"style":217},[1340],{"type":59,"value":239},{"type":54,"tag":210,"props":1342,"children":1343},{"style":217},[1344],{"type":59,"value":1312},{"type":54,"tag":210,"props":1346,"children":1347},{"style":217},[1348],{"type":59,"value":249},{"type":54,"tag":210,"props":1350,"children":1351},{"style":1284},[1352],{"type":59,"value":146},{"type":54,"tag":210,"props":1354,"children":1355},{"style":217},[1356],{"type":59,"value":239},{"type":54,"tag":210,"props":1358,"children":1359},{"style":217},[1360],{"type":59,"value":244},{"type":54,"tag":210,"props":1362,"children":1363},{"style":217},[1364],{"type":59,"value":249},{"type":54,"tag":210,"props":1366,"children":1367},{"style":252},[1368],{"type":59,"value":255},{"type":54,"tag":210,"props":1370,"children":1371},{"style":258},[1372],{"type":59,"value":261},{"type":54,"tag":210,"props":1374,"children":1375},{"style":252},[1376],{"type":59,"value":266},{"type":54,"tag":210,"props":1378,"children":1379},{"style":217},[1380],{"type":59,"value":239},{"type":54,"tag":210,"props":1382,"children":1383},{"style":217},[1384],{"type":59,"value":1385}," }],\n",{"type":54,"tag":210,"props":1387,"children":1388},{"class":212,"line":278},[1389,1393,1397,1401,1405,1410,1414,1418,1422,1426,1430,1434,1438],{"type":54,"tag":210,"props":1390,"children":1391},{"style":217},[1392],{"type":59,"value":229},{"type":54,"tag":210,"props":1394,"children":1395},{"style":232},[1396],{"type":59,"value":1215},{"type":54,"tag":210,"props":1398,"children":1399},{"style":217},[1400],{"type":59,"value":239},{"type":54,"tag":210,"props":1402,"children":1403},{"style":217},[1404],{"type":59,"value":244},{"type":54,"tag":210,"props":1406,"children":1407},{"style":217},[1408],{"type":59,"value":1409}," [",{"type":54,"tag":210,"props":1411,"children":1412},{"style":217},[1413],{"type":59,"value":239},{"type":54,"tag":210,"props":1415,"children":1416},{"style":252},[1417],{"type":59,"value":89},{"type":54,"tag":210,"props":1419,"children":1420},{"style":217},[1421],{"type":59,"value":239},{"type":54,"tag":210,"props":1423,"children":1424},{"style":217},[1425],{"type":59,"value":1312},{"type":54,"tag":210,"props":1427,"children":1428},{"style":217},[1429],{"type":59,"value":249},{"type":54,"tag":210,"props":1431,"children":1432},{"style":252},[1433],{"type":59,"value":1130},{"type":54,"tag":210,"props":1435,"children":1436},{"style":217},[1437],{"type":59,"value":239},{"type":54,"tag":210,"props":1439,"children":1440},{"style":217},[1441],{"type":59,"value":1442},"]\n",{"type":54,"tag":210,"props":1444,"children":1445},{"class":212,"line":314},[1446],{"type":54,"tag":210,"props":1447,"children":1448},{"style":217},[1449],{"type":59,"value":347},{"type":54,"tag":62,"props":1451,"children":1452},{},[1453,1455,1460,1462,1468],{"type":59,"value":1454},"Because the tool does the read-modify-write for you, you don't have to fetch\nthe full list, renumber ",{"type":54,"tag":68,"props":1456,"children":1458},{"className":1457},[],[1459],{"type":59,"value":324},{"type":59,"value":1461},", or risk clobbering existing rules — the common\nfailure mode when editing ",{"type":54,"tag":68,"props":1463,"children":1465},{"className":1464},[],[1466],{"type":59,"value":1467},"path_cleaning_filters",{"type":59,"value":1469}," directly.",{"type":54,"tag":62,"props":1471,"children":1472},{},[1473,1475,1481,1483,1488],{"type":59,"value":1474},"If you must fall back to ",{"type":54,"tag":68,"props":1476,"children":1478},{"className":1477},[],[1479],{"type":59,"value":1480},"project-settings-update",{"type":59,"value":1482}," (whole-list overwrite),\nalways ",{"type":54,"tag":355,"props":1484,"children":1485},{},[1486],{"type":59,"value":1487},"read the existing rules first",{"type":59,"value":1489}," and merge — overwriting silently\ndestroys whatever the team has already configured.",{"type":54,"tag":173,"props":1491,"children":1493},{"id":1492},"where-the-rules-apply",[1494],{"type":59,"value":1495},"Where the rules apply",{"type":54,"tag":62,"props":1497,"children":1498},{},[1499],{"type":59,"value":1500},"When the user (or a HogQL query) opts in:",{"type":54,"tag":122,"props":1502,"children":1503},{},[1504,1516,1521],{"type":54,"tag":126,"props":1505,"children":1506},{},[1507,1509,1514],{"type":59,"value":1508},"Web analytics: the ",{"type":54,"tag":355,"props":1510,"children":1511},{},[1512],{"type":59,"value":1513},"Path cleaning",{"type":59,"value":1515}," toggle in the page header",{"type":54,"tag":126,"props":1517,"children":1518},{},[1519],{"type":59,"value":1520},"Paths insights: the path cleaning toggle in the insight filters",{"type":54,"tag":126,"props":1522,"children":1523},{},[1524,1526],{"type":59,"value":1525},"HogQL: any query that calls ",{"type":54,"tag":68,"props":1527,"children":1529},{"className":1528},[],[1530],{"type":59,"value":1531},"apply_path_cleaning(path_expr, team)",{"type":54,"tag":62,"props":1533,"children":1534},{},[1535],{"type":59,"value":1536},"The rules are stored once per project — they are not insight-scoped.",{"type":54,"tag":173,"props":1538,"children":1540},{"id":1539},"common-pitfalls",[1541],{"type":59,"value":1542},"Common pitfalls",{"type":54,"tag":122,"props":1544,"children":1545},{},[1546,1615,1669,1692,1718,1742],{"type":54,"tag":126,"props":1547,"children":1548},{},[1549,1561,1563,1568,1570,1576,1578,1584,1586,1592,1594,1600,1601,1606,1608,1613],{"type":54,"tag":355,"props":1550,"children":1551},{},[1552,1554,1559],{"type":59,"value":1553},"Backreferences in ",{"type":54,"tag":68,"props":1555,"children":1557},{"className":1556},[],[1558],{"type":59,"value":154},{"type":59,"value":1560}," need double-escaping",{"type":59,"value":1562}," — ClickHouse's\n",{"type":54,"tag":68,"props":1564,"children":1566},{"className":1565},[],[1567],{"type":59,"value":1062},{"type":59,"value":1569}," supports ",{"type":54,"tag":68,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":59,"value":1575},"\\0",{"type":59,"value":1577}," (whole match) and ",{"type":54,"tag":68,"props":1579,"children":1581},{"className":1580},[],[1582],{"type":59,"value":1583},"\\1",{"type":59,"value":1585},"–",{"type":54,"tag":68,"props":1587,"children":1589},{"className":1588},[],[1590],{"type":59,"value":1591},"\\9",{"type":59,"value":1593}," (capture\ngroups). In a JSON field or SQL string literal the backslash must be\ndoubled, so use ",{"type":54,"tag":68,"props":1595,"children":1597},{"className":1596},[],[1598],{"type":59,"value":1599},"\\\\1",{"type":59,"value":469},{"type":54,"tag":68,"props":1602,"children":1604},{"className":1603},[],[1605],{"type":59,"value":1467},{"type":59,"value":1607}," \u002F HogQL to get the ",{"type":54,"tag":68,"props":1609,"children":1611},{"className":1610},[],[1612],{"type":59,"value":1583},{"type":59,"value":1614},"\nbackreference at the ClickHouse layer.",{"type":54,"tag":126,"props":1616,"children":1617},{},[1618,1628,1630,1636,1638,1644,1646,1652,1654,1659,1661,1667],{"type":54,"tag":355,"props":1619,"children":1620},{},[1621,1623],{"type":59,"value":1622},"Forgetting ",{"type":54,"tag":68,"props":1624,"children":1626},{"className":1625},[],[1627],{"type":59,"value":397},{"type":59,"value":1629}," — ",{"type":54,"tag":68,"props":1631,"children":1633},{"className":1632},[],[1634],{"type":59,"value":1635},"\\d+",{"type":59,"value":1637}," without an end anchor matches every numeric run\nin any path, so ",{"type":54,"tag":68,"props":1639,"children":1641},{"className":1640},[],[1642],{"type":59,"value":1643},"\u002Fblog\u002F2024-09-12\u002Fpost",{"type":59,"value":1645}," becomes\n",{"type":54,"tag":68,"props":1647,"children":1649},{"className":1648},[],[1650],{"type":59,"value":1651},"\u002Fblog\u002F\u003Cnum>-\u003Cnum>-\u003Cnum>\u002Fpost",{"type":59,"value":1653}," when you only meant to match the year\nsegment. Use ",{"type":54,"tag":68,"props":1655,"children":1657},{"className":1656},[],[1658],{"type":59,"value":985},{"type":59,"value":1660}," or ",{"type":54,"tag":68,"props":1662,"children":1664},{"className":1663},[],[1665],{"type":59,"value":1666},"\\d+(\u002F|$)",{"type":59,"value":1668}," depending on intent.",{"type":54,"tag":126,"props":1670,"children":1671},{},[1672,1682,1684,1690],{"type":54,"tag":355,"props":1673,"children":1674},{},[1675,1677],{"type":59,"value":1676},"Escaping ",{"type":54,"tag":68,"props":1678,"children":1680},{"className":1679},[],[1681],{"type":59,"value":381},{"type":59,"value":1683}," — re2 does not require it. ",{"type":54,"tag":68,"props":1685,"children":1687},{"className":1686},[],[1688],{"type":59,"value":1689},"\\\u002F",{"type":59,"value":1691}," works but adds noise.",{"type":54,"tag":126,"props":1693,"children":1694},{},[1695,1700,1702,1708,1710,1716],{"type":54,"tag":355,"props":1696,"children":1697},{},[1698],{"type":59,"value":1699},"Case sensitivity",{"type":59,"value":1701}," — re2 is case-sensitive by default. Use ",{"type":54,"tag":68,"props":1703,"children":1705},{"className":1704},[],[1706],{"type":59,"value":1707},"(?i)",{"type":59,"value":1709}," at the\nstart of the pattern for case-insensitive matching, e.g. ",{"type":54,"tag":68,"props":1711,"children":1713},{"className":1712},[],[1714],{"type":59,"value":1715},"(?i)\u002Fusers\u002F\\d+",{"type":59,"value":1717},".",{"type":54,"tag":126,"props":1719,"children":1720},{},[1721,1726,1728,1733,1735,1740],{"type":54,"tag":355,"props":1722,"children":1723},{},[1724],{"type":59,"value":1725},"Replacing the whole list",{"type":59,"value":1727}," — the raw ",{"type":54,"tag":68,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":59,"value":1467},{"type":59,"value":1734}," field is\noverwrite, not append. Use ",{"type":54,"tag":68,"props":1736,"children":1738},{"className":1737},[],[1739],{"type":59,"value":1149},{"type":59,"value":1741}," (which does the\nread-modify-write for you) instead of hand-editing the field; if you must\nedit it directly, always start from the current list.",{"type":54,"tag":126,"props":1743,"children":1744},{},[1745,1750],{"type":54,"tag":355,"props":1746,"children":1747},{},[1748],{"type":59,"value":1749},"Rules apply globally",{"type":59,"value":1751}," — adding a rule can change historical numbers in\nevery Web analytics \u002F Paths chart that has cleaning enabled. Warn the user\nbefore applying anything destructive.",{"type":54,"tag":1753,"props":1754,"children":1755},"style",{},[1756],{"type":59,"value":1757},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1759,"total":1859},[1760,1775,1787,1799,1812,1827,1842],{"slug":1761,"name":1761,"fn":1762,"description":1763,"org":1764,"tags":1765,"stars":23,"repoUrl":24,"updatedAt":1774},"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},[1766,1767,1770,1773],{"name":18,"slug":19,"type":13},{"name":1768,"slug":1769,"type":13},"Cost Optimization","cost-optimization",{"name":1771,"slug":1772,"type":13},"Observability","observability",{"name":9,"slug":8,"type":13},"2026-07-28T05:34:11.117757",{"slug":1776,"name":1776,"fn":1777,"description":1778,"org":1779,"tags":1780,"stars":23,"repoUrl":24,"updatedAt":1786},"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},[1781,1782,1785],{"name":18,"slug":19,"type":13},{"name":1783,"slug":1784,"type":13},"Audit","audit",{"name":9,"slug":8,"type":13},"2026-06-08T08:08:33.693989",{"slug":1788,"name":1788,"fn":1789,"description":1790,"org":1791,"tags":1792,"stars":23,"repoUrl":24,"updatedAt":1798},"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},[1793,1794,1796,1797],{"name":1783,"slug":1784,"type":13},{"name":1795,"slug":32,"type":13},"Data Warehouse",{"name":1771,"slug":1772,"type":13},{"name":9,"slug":8,"type":13},"2026-06-18T08:22:57.67984",{"slug":1800,"name":1800,"fn":1801,"description":1802,"org":1803,"tags":1804,"stars":23,"repoUrl":24,"updatedAt":1811},"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},[1805,1806,1807,1810],{"name":1783,"slug":1784,"type":13},{"name":1795,"slug":32,"type":13},{"name":1808,"slug":1809,"type":13},"Performance","performance",{"name":9,"slug":8,"type":13},"2026-06-18T08:25:10.936787",{"slug":1813,"name":1813,"fn":1814,"description":1815,"org":1816,"tags":1817,"stars":23,"repoUrl":24,"updatedAt":1826},"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},[1818,1821,1824,1825],{"name":1819,"slug":1820,"type":13},"Alerting","alerting",{"name":1822,"slug":1823,"type":13},"Debugging","debugging",{"name":1771,"slug":1772,"type":13},{"name":9,"slug":8,"type":13},"2026-06-18T08:24:40.318583",{"slug":1828,"name":1828,"fn":1829,"description":1830,"org":1831,"tags":1832,"stars":23,"repoUrl":24,"updatedAt":1841},"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},[1833,1834,1837,1838,1840],{"name":18,"slug":19,"type":13},{"name":1835,"slug":1836,"type":13},"Monitoring","monitoring",{"name":1771,"slug":1772,"type":13},{"name":1839,"slug":1264,"type":13},"Operations",{"name":9,"slug":8,"type":13},"2026-07-18T05:10:54.430898",{"slug":1843,"name":1843,"fn":1844,"description":1845,"org":1846,"tags":1847,"stars":23,"repoUrl":24,"updatedAt":1858},"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},[1848,1851,1854,1855],{"name":1849,"slug":1850,"type":13},"Automation","automation",{"name":1852,"slug":1853,"type":13},"MCP","mcp",{"name":9,"slug":8,"type":13},{"name":1856,"slug":1857,"type":13},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",61,{"items":1861,"total":1976},[1862,1869,1875,1882,1889,1896,1904,1911,1923,1938,1948,1966],{"slug":1761,"name":1761,"fn":1762,"description":1763,"org":1863,"tags":1864,"stars":23,"repoUrl":24,"updatedAt":1774},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1865,1866,1867,1868],{"name":18,"slug":19,"type":13},{"name":1768,"slug":1769,"type":13},{"name":1771,"slug":1772,"type":13},{"name":9,"slug":8,"type":13},{"slug":1776,"name":1776,"fn":1777,"description":1778,"org":1870,"tags":1871,"stars":23,"repoUrl":24,"updatedAt":1786},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1872,1873,1874],{"name":18,"slug":19,"type":13},{"name":1783,"slug":1784,"type":13},{"name":9,"slug":8,"type":13},{"slug":1788,"name":1788,"fn":1789,"description":1790,"org":1876,"tags":1877,"stars":23,"repoUrl":24,"updatedAt":1798},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1878,1879,1880,1881],{"name":1783,"slug":1784,"type":13},{"name":1795,"slug":32,"type":13},{"name":1771,"slug":1772,"type":13},{"name":9,"slug":8,"type":13},{"slug":1800,"name":1800,"fn":1801,"description":1802,"org":1883,"tags":1884,"stars":23,"repoUrl":24,"updatedAt":1811},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1885,1886,1887,1888],{"name":1783,"slug":1784,"type":13},{"name":1795,"slug":32,"type":13},{"name":1808,"slug":1809,"type":13},{"name":9,"slug":8,"type":13},{"slug":1813,"name":1813,"fn":1814,"description":1815,"org":1890,"tags":1891,"stars":23,"repoUrl":24,"updatedAt":1826},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1892,1893,1894,1895],{"name":1819,"slug":1820,"type":13},{"name":1822,"slug":1823,"type":13},{"name":1771,"slug":1772,"type":13},{"name":9,"slug":8,"type":13},{"slug":1828,"name":1828,"fn":1829,"description":1830,"org":1897,"tags":1898,"stars":23,"repoUrl":24,"updatedAt":1841},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1899,1900,1901,1902,1903],{"name":18,"slug":19,"type":13},{"name":1835,"slug":1836,"type":13},{"name":1771,"slug":1772,"type":13},{"name":1839,"slug":1264,"type":13},{"name":9,"slug":8,"type":13},{"slug":1843,"name":1843,"fn":1844,"description":1845,"org":1905,"tags":1906,"stars":23,"repoUrl":24,"updatedAt":1858},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[1907,1908,1909,1910],{"name":1849,"slug":1850,"type":13},{"name":1852,"slug":1853,"type":13},{"name":9,"slug":8,"type":13},{"name":1856,"slug":1857,"type":13},{"slug":1912,"name":1912,"fn":1913,"description":1914,"org":1915,"tags":1916,"stars":23,"repoUrl":24,"updatedAt":1922},"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},[1917,1918,1919,1920,1921],{"name":18,"slug":19,"type":13},{"name":1822,"slug":1823,"type":13},{"name":21,"slug":22,"type":13},{"name":1771,"slug":1772,"type":13},{"name":9,"slug":8,"type":13},"2026-05-07T05:56:19.828048",{"slug":1924,"name":1924,"fn":1925,"description":1926,"org":1927,"tags":1928,"stars":23,"repoUrl":24,"updatedAt":1937},"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},[1929,1932,1933,1934],{"name":1930,"slug":1931,"type":13},"API Development","api-development",{"name":21,"slug":22,"type":13},{"name":9,"slug":8,"type":13},{"name":1935,"slug":1936,"type":13},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":1939,"name":1939,"fn":1940,"description":1941,"org":1942,"tags":1943,"stars":23,"repoUrl":24,"updatedAt":1947},"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},[1944,1945,1946],{"name":1930,"slug":1931,"type":13},{"name":1839,"slug":1264,"type":13},{"name":9,"slug":8,"type":13},"2026-07-15T05:29:58.442727",{"slug":1949,"name":1949,"fn":1950,"description":1951,"org":1952,"tags":1953,"stars":23,"repoUrl":24,"updatedAt":1965},"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},[1954,1955,1958,1959,1962],{"name":1849,"slug":1850,"type":13},{"name":1956,"slug":1957,"type":13},"Email","email",{"name":9,"slug":8,"type":13},{"name":1960,"slug":1961,"type":13},"Reporting","reporting",{"name":1963,"slug":1964,"type":13},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":1967,"name":1967,"fn":1968,"description":1969,"org":1970,"tags":1971,"stars":23,"repoUrl":24,"updatedAt":1975},"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},[1972,1973,1974],{"name":18,"slug":19,"type":13},{"name":1930,"slug":1931,"type":13},{"name":9,"slug":8,"type":13},"2026-06-08T08:08:29.624498",231]