exploring-autocapture-events
Skill by PostHog
Guides exploration of PostHog $autocapture events from posthog-js. It helps find CSS selectors, check their uniqueness, and turn clicks into trends, funnels and actions. Built for analysts and product teams.
Install exploring-autocapture-events
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/product_analytics/skills/exploring-autocapture-events ~/.claude/skills/exploring-autocapture-eventsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install exploring-autocapture-events in Claude Code
git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/posthog/products/product_analytics/skills/exploring-autocapture-events ~/.gemini/antigravity-cli/skills/exploring-autocapture-eventsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install exploring-autocapture-events in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill helps an assistant explore $autocapture events captured by posthog-js. Autocapture records clicks, form submissions and page changes, along with the clicked DOM element and its ancestors in the elements_chain column. The skill explains the materialized columns that give fast access to element tags, texts, ids and hrefs, and lists the canonical autocapture properties.
The skill follows a workflow. It first confirms that autocapture data exists, then explores what users click. It finds candidate selectors, preferring data-attr attributes, checks how unique each selector is, and adds text, URL or href filters when needed. It can then filter funnels and trends, run ad-hoc HogQL queries, and create an action with verification. It is for analysts and product teams working in projects that use posthog-js autocapture.
Written from the project's SKILL.md and checked against it.
What it can do
- Confirm autocapture dataRuns a count query and explains how autocapture may be disabled in project settings or SDK config.
- Explore user clicksFinds top clicked tags, texts and hrefs using the materialized element columns.
- Find candidate selectorsRanks selector options, favouring data-attr and other data-* attributes and element IDs.
- Evaluate selector uniquenessChecks how many events a selector matches and compares it with total autocapture volume.
- Refine with filtersAdds text, URL or href filters to make a selector more specific.
- Filter insight queriesBuilds element and event property filters for funnel and trend steps on $autocapture.
- Run ad-hoc queriesProvides HogQL examples for click trends and pageview-to-click funnels.
- posthog:action-createCreates an action from selector, text, href and URL criteria for $autocapture.
- posthog:query-trendsNamed in the source as a way to run recurring analysis with an action.
- posthog:query-funnelNamed in the source as a way to run recurring funnel analysis with an action.
What you need
- A PostHog project that uses posthog-js autocapture
- Autocapture data from posthog-js (other SDKs do not capture elements)
Try asking
- Which buttons do users click most on my pricing page?
- Find a unique selector for the signup button and check how often it is clicked.
- Create a PostHog action for the checkout button clicks over the last week.
Good to know
- Applies only to projects using posthog-js autocapture; other SDKs do not capture elements.
- $autocapture is high volume, so queries should always set timestamp filters.
- In insight filters, selector and tag_name only support the exact and is_not operators.
- elements_chain regex matching can be slow, so materialized columns are preferred.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: products/product_analytics/skills/exploring-autocapture-events/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md11 KB -
references/elements-chain-format.md2 KB -
references/example-queries.md5 KB
Alternatives to exploring-autocapture-events
All alternatives →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.
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.
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.
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.
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.
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.
Compare with kaggle-cli, bigquery-bigframes or data-loading
exploring-autocapture-events: common questions
Why is my autocapture count zero?
The source says autocapture may be disabled either by the autocapture_opt_out project setting or by passing autocapture: false to posthog-js init().
Which CSS selector should I use for a click?
The source recommends data-attr or other data-* attributes first, then element IDs, then tag and class combinations, text content, and tag name alone.
Should I use an action or an inline filter?
The source says to prefer an action when the interaction is referenced more than once, inline filters for one-off insights, and raw HogQL for joins or custom aggregations.
How do I install exploring-autocapture-events?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is exploring-autocapture-events free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is exploring-autocapture-events safe to use?
It scores 88 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 exploring-autocapture-events?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
