# suggesting-path-cleaning-rules

suggesting-path-cleaning-rules is a Claude Code skill that proposes URL path-cleaning rules for web analytics. It engages on requests to generate or inspect suggestions and troubleshoot path_cleaning_suggestions issues.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 148 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/suggesting-path-cleaning-rules/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/suggesting-path-cleaning-rules

## What it does

The skill explains how path-cleaning suggestions are generated for web analytics teams. The process samples real paths, asks a language model for regex-and-alias pairs, then tests each rule against the sample. Rules that fail compilation or match no paths are discarded. The guide covers the `suggest_path_cleaning_rules` management command, health checks, and team eligibility.

The scheduled check runs weekly, and teams with existing rules or too few distinct paths can be skipped. Suggestions are saved for review, not applied automatically; applying them changes historical chart values and remains a human decision. Direct rule authoring or application belongs to the separate `managing-path-cleaning-rules` skill.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill suggesting-path-cleaning-rules -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/suggesting-path-cleaning-rules/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/suggesting-path-cleaning-rules/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill suggesting-path-cleaning-rules -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/suggesting-path-cleaning-rules/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill suggesting-path-cleaning-rules -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/suggesting-path-cleaning-rules/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/suggesting-path-cleaning-rules
```

2. **Manually: put the files in place**
- File: `.github/skills/suggesting-path-cleaning-rules/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill suggesting-path-cleaning-rules -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/suggesting-path-cleaning-rules
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/suggesting-path-cleaning-rules/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill suggesting-path-cleaning-rules -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/suggesting-path-cleaning-rules/SKILL.md

## When to use it
- generate path-cleaning suggestions for a team
- find out why a team was skipped
- review suggestions before applying rules
- inspect the `path_cleaning_suggestions` health check

## Example prompts
- Generate path-cleaning suggestions for team `2`.
- Run `suggest_path_cleaning_rules` for teams `2,19279` without storing results.
- Explain why `path_cleaning_suggestions` skipped this team.

## Similar
- [managing-path-cleaning-rules](https://affpapa.org/en/nevibecode/skills/managing-path-cleaning-rules.md) — skill · 444 installs
- [suggesting-data-imports](https://affpapa.org/en/nevibecode/skills/suggesting-data-imports.md) — skill · 401 installs
- [Data Cleaning Pipeline](https://affpapa.org/en/nevibecode/skills/data-cleaning-pipeline.md) — skill · 600 installs
- [stata-data-cleaning](https://affpapa.org/en/nevibecode/skills/stata-data-cleaning.md) — skill · 359 installs
- [web-analytics-agent-skill](https://affpapa.org/en/nevibecode/skills/web-analytics-agent-skill.md) — skill · 306 installs
- [vercel-agent](https://affpapa.org/en/nevibecode/skills/vercel-agent.md) — skill · 4 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
