Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

suggesting-path-cleaning-rules

Skill by PostHog

Runs and explains PostHog's automated health check that suggests path-cleaning rules for web analytics teams. Suggestions are stored for human review and never applied automatically.

  • Score 85
  • 41k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install suggesting-path-cleaning-rules

Built from the published package, never by AI.

git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/products/web_analytics/skills/suggesting-path-cleaning-rules ~/.claude/skills/suggesting-path-cleaning-rules

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install suggesting-path-cleaning-rules in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill covers PostHog's automated path-cleaning suggestion feature for web analytics. Weekly, for each team in the precompute cohort, the check samples real pathnames, asks an LLM for regex and alias rules, and validates each regex with re2 against the team's own paths before storing the survivors as a health issue. Teams with no recent pageviews, existing rules, or few distinct paths are skipped.

Suggestions are never applied automatically. Users review them in the settings banner, onboarding step, or API, and admins can apply them, which merges rules into path_cleaning_filters. The skill is for generating, reviewing, and extending this pipeline. For hand-authoring rules, the source points to managing-path-cleaning-rules instead.

Written from the project's SKILL.md and checked against it.

What it can do

  • Suggest rulesSamples top pathnames and asks the LLM for regex and alias rules per team.
  • Validate rulesCompiles each regex with re2 and drops rules that fail or match no paths.
  • Generate on demandThe generate endpoint produces and stores a fresh suggestion for a project.
  • Preview rulesApplies suggested rules to a fresh sample of top paths and returns before and after pairs.
  • Apply rulesMerges suggested rules into path_cleaning_filters without overwriting existing rules.
  • Run the management commandUses suggest_path_cleaning_rules with --teams, --no-store, and --apply flags.

What you need

  • A PostHog project with web analytics
  • Access to the LLM gateway for the web_analytics product
  • A Python environment with manage.py for the command

Try asking

  • Suggest path-cleaning rules for team 2 without storing them.
  • Show the active path cleaning suggestion for my team.
  • Preview the suggested path cleaning rules on my top paths.

Good to know

  • Suggestions are never applied automatically.
  • Applying rules rewrites historical numbers in cleaned charts.
  • Applying through PostHog AI is destructive and needs confirmation.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: products/web_analytics/skills/suggesting-path-cleaning-rules/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to suggesting-path-cleaning-rules

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

suggesting-path-cleaning-rules: common questions

Does it apply path cleaning rules automatically?

No. It only suggests rules. Applying them is a human decision made through the settings UI or the --apply flag.

Which teams get suggestions?

By default, teams in the precompute cohort that sent a pageview in the last 30 days, have enough distinct paths, and have no existing rules.

How are suggested regexes checked?

Each regex is compiled with re2, the engine ClickHouse replaceRegexpAll uses, and test-applied to the team's sampled paths before storage.

How do I install suggesting-path-cleaning-rules?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is suggesting-path-cleaning-rules free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is suggesting-path-cleaning-rules safe to use?

It scores 85 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to suggesting-path-cleaning-rules?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

suggesting-path-cleaning-rules Install

Add to stack

Loading.