Agent skill · marketing growth · jeremylongshore
posthog-cost-tuning
Reduce PostHog usage cost without silently losing decision-critical data by measuring billable volume, applying product limits, and filtering noise. Use when forecasting spend or responding to a usage spike. Trigger with "PostHog cost", "PostHog billing", or "reduce PostHog usage".
Why this skill is useful
Provides specific techniques and scripts for optimizing PostHog costs that are not widely known.
What it needs
Requires posthog account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
PostHog Cost Tuning Overview Measure the live billable volume for each enabled PostHog product, trace changes to instrumentation releases, and reduce only traffic that the product owner has classified as noise or safely sampleable. Pricing, free allowances, and product entitlements are live facts; read them from the billing dashboard, pricing calculator, and approved product limits at execution time. Prerequisites PostHog Cloud account with billing access Application instrumented with posthog-js Understanding of which events drive your analytics Authentication Usage inspection through private query and billing APIs requires a least-privilege personal API key or OAuth token on a trusted machine. Event capture and browser-side filtering use only the public project token; never ship a personal or secure key to the browser. Read private credentials from a secret manager, redact command output before sharing it, and select the private US or EU API host that matches the project. Live Pricing Boundary Do not copy prices or free allowances into implementation code. Record the billing-dashboard timestamp, current product limit, projected usage, unit price from the live calculator, and the owner who approved any data-loss tradeoff. Recheck those values before applying a change. Instructions Tool discipline Use Read to inspect the relevant configuration and implementation before proposing changes. Use Grep to locate initialization, capture, flag, and credential boundaries. Step 1: Audit Current Event Volume Step 2: Tune Autocapture $autocapture is often the largest event volume. Restrict it to only useful interactions. Step 3: Event Sampling with beforesend Step 4: Optimize Session Recording Costs Step 5: Monitor Usage and Set Alerts Decision Record For each proposed filter or sample, record the baseline count, affected event or product, chosen rate, expected analytical limitation, rollback trigger, and measured result after one full review window. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/posthog-cost-tuning