adding-analytics

Installation
SKILL.md

Add Analytics (PostHog)

Use this skill when the user asks to add analytics, event tracking, page views, feature flags, or session replay to a web application.

Steps

  1. Detect the framework — check for next.config.*, vite.config.*, package.json scripts, or index.html to determine if this is Next.js, React (Vite/CRA), Vue, Svelte, or plain HTML.

  2. Install the SDK

    • Next.js / React: npm install posthog-js
    • Next.js (server-side): npm install posthog-js posthog-node
    • Python: pip install posthog
    • Node.js backend: npm install posthog-node
  3. Create a provider / init module

    • For Next.js App Router, create app/providers.tsx:
Related skills
Installs
21
GitHub Stars
271
First Seen
Apr 12, 2026