adding-analytics
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
-
Detect the framework — check for
next.config.*,vite.config.*,package.jsonscripts, orindex.htmlto determine if this is Next.js, React (Vite/CRA), Vue, Svelte, or plain HTML. -
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
- Next.js / React:
-
Create a provider / init module
- For Next.js App Router, create
app/providers.tsx:
- For Next.js App Router, create
More from spencerpauly/awesome-cursor-skills
saving-workspace-context
Automatically persist useful context — research, decisions, learnings, templates — to workspace files so knowledge survives across conversations.
38reviewing-code
Perform a thorough code review focused on correctness, maintainability, performance, and best practices.
37database-design
Design database schemas — tables, relationships, indexes, constraints, and ORM setup. Covers relational design, normalization, and common patterns.
36suggesting-cursor-rules
When the user repeats the same correction or convention multiple times, suggest a Cursor rule to encode it permanently.
35systematic-debugging
Structured debugging methodology — reproduce, isolate, hypothesize, verify. Covers git bisect, binary search, logging, and minimal reproduction.
33auditing-security
Perform a systematic security audit of a codebase, checking for OWASP Top 10 vulnerabilities, secrets exposure, and insecure patterns.
33