/godmode:analyticsfrom godmode
Implements product analytics with event tracking, funnel analysis, and A/B testing. Supports Segment, Amplitude, Mixpanel, and PostHog with privacy-compliant instrumentation.
Ships in godmode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/godmode:analytics/godmode:plan identifies analytics instrumentation tasksUnderstand what needs to be measured and why:
ANALYTICS DISCOVERY:
Project: <name and purpose>
Goals:
- <business goal 1 — e.g., increase conversion rate>
- <business goal 2 — e.g., reduce churn>
- <business goal 3 — e.g., improve feature adoption>
Key questions to answer:
- <question 1 — e.g., "Where do users drop off in onboarding?">
- <question 2 — e.g., "Which features correlate with retention?">
- <question 3 — e.g., "What is our activation rate?">
Platform: <web | mobile | both | server-side>
Framework: <React | Next.js | Vue | React Native | iOS | Android | backend>
Privacy requirements: <GDPR | CCPA | HIPAA | none | strict — no third-party>
Existing analytics: <none | GA4 | Segment | Amplitude | Mixpanel | custom>
Budget: <free tier | startup plan | enterprise>
If the user hasn't specified, ask: "What do you want to learn about your users? What decisions will this data inform?"
Choose the right analytics stack:
PLATFORM SELECTION:
| Platform | Best For | Privacy Model |
|--|--|--|
| Segment | Data routing hub, | Third-party, consent needed |
| | multi-destination CDP | GDPR tools available |
| Amplitude | Product analytics, | Third-party, consent needed |
| | behavioral cohorts, | SOC 2, GDPR compliant |
| | journey mapping | |
| Mixpanel | Event analytics, | Third-party, consent needed |
| | funnel analysis, | EU data residency available |
| | retention tracking | |
Design a structured, consistent event naming system:
EVENT TAXONOMY:
Naming convention: <Object Action> (e.g., "Button Clicked", "Page Viewed")
Format: <object>_<action> (snake_case) or <Object> <Action> (Title Case)
Selected: <format>
EVENT CATALOG:
| Event Name | Trigger | Properties |
LIFECYCLE EVENTS
| User Signed Up | Server | method, referral_source, |
| | | plan |
| User Logged In | Server | method, mfa_used |
Define property types and validation:
PROPERTY STANDARDS:
GLOBAL PROPERTIES (sent with every event):
user_id: string (anonymous ID or authenticated user ID)
session_id: string (unique per session)
timestamp: ISO 8601 datetime
platform: "web" | "ios" | "android"
app_version: string (semver)
device_type: "desktop" | "tablet" | "mobile"
browser: string (web only)
os: string
locale: string (BCP 47 — e.g., "en-US")
experiment_ids: string[] (active A/B test assignments)
USER PROPERTIES (set once, updated on change):
Implement analytics tracking in the codebase:
Configure the selected provider SDK (Segment, Amplitude, PostHog, etc.) with environment-keyed initialization.
Build a unified abstraction layer (AnalyticsProvider interface with track, identify, page methods) so
you swap providers without touching component code.
Design and instrument conversion funnels:
FUNNEL DESIGN:
Funnel name: <name — e.g., "Onboarding Funnel">
Goal: <what conversion means — e.g., "User completes onboarding">
FUNNEL STEPS:
| Step | Name | Event | Expected % |
|--|--|--|--|
| 1 | Visit landing page | Page Viewed | 100% |
| 2 | Click sign up | CTA Clicked | 30-40% |
| 3 | Complete registration | User Signed Up | 60-70% |
| 4 | Start onboarding flow | Onboarding Started | 80-90% |
| 5 | Complete onboarding | Onboarding Done | 50-60% |
| 6 | First core action | Feature Used | 40-50% |
| 7 | Activation (aha moment) | Activation Done | 30-40% |
Design and instrument experiments:
EXPERIMENT DESIGN:
Name: <experiment name>
Hypothesis: <if we change X, then Y will improve by Z%>
Primary metric: <metric to optimize — e.g., conversion rate>
Secondary metrics: <guardrail metrics to monitor — e.g., session duration, error rate>
Minimum detectable effect: <smallest meaningful change — e.g., 5% relative improvement>
Required sample size: <calculated based on MDE, baseline, significance level>
Duration: <estimated experiment duration>
Significance level: alpha = 0.05
Power: 1 - beta = 0.80
VARIANTS:
| Variant | Description | Traffic % |
// experiments/ab-test.ts
interface Experiment {
id: string;
name: string;
variants: { id: string; weight: number }[];
isActive: boolean;
DATA MODEL (3 core tables):
EVENTS: event_id (PK), event_name (indexed), user_id (indexed), session_id,
timestamp (partitioned by day), properties (JSONB), context (JSONB)
USERS: user_id (PK), traits (JSONB), first_seen, last_seen, event_count
SESSIONS: session_id (PK), user_id (indexed), started_at, ended_at,
duration_sec, entry_page, exit_page, device_type, utm_*
COMMON QUERIES:
- DAU/WAU/MAU: COUNT(DISTINCT user_id) WHERE timestamp >= <period>
- Retention: cohort analysis grouping by first_seen week
- Funnel: sequential event matching with time constraints
- Feature adoption: COUNT(DISTINCT user_id) WHERE event_name = '<feature>'
Implement privacy-compliant analytics:
PRIVACY IMPLEMENTATION:
| Requirement | Implementation |
|--|--|
| Consent management | Cookie banner with granular |
| | opt-in/opt-out per category |
| No tracking before consent | Analytics SDK loads only after |
| | user grants consent |
| Data minimization | Track only necessary events, |
| | no PII in properties |
| User data deletion | API endpoint to delete all data |
| | for a user_id (GDPR Art. 17) |
Validate the analytics implementation:
ANALYTICS VALIDATION:
| Check | Status |
|--|--|
| All events in taxonomy are instrumented | PASS | FAIL |
| Event names follow naming convention | PASS | FAIL |
| Properties match documented schema | PASS | FAIL |
| No PII in any event properties | PASS | FAIL |
| Consent gate works (no tracking before consent) | PASS | FAIL |
| Funnels capture all steps correctly | PASS | FAIL |
| A/B test assignment is deterministic and sticky | PASS | FAIL |
| Data appears in analytics dashboard | PASS | FAIL |
| DNT/opt-out disables all tracking | PASS | FAIL |
| User deletion API works (GDPR compliance) | PASS | FAIL |
| Events fire on correct triggers (not duplicated) | PASS | FAIL |
ANALYTICS IMPLEMENTATION COMPLETE:
Artifacts:
- Analytics config: src/analytics/config.ts
- Event taxonomy: docs/analytics/event-taxonomy.md
- Tracking module: src/analytics/index.ts
- Provider implementations: src/analytics/providers/<provider>.ts
- Consent manager: src/consent/manager.ts
- Funnel definitions: docs/analytics/funnels.md
- A/B test configs: src/experiments/<experiment>.ts
- Data model: docs/analytics/data-model.md
Platform: <platform(s)>
Events tracked: <N> events across <M> categories
Funnels: <N> funnels defined
Commit: "analytics: <platform> — <N> events, <M> funnels, <privacy model>"
Never ask to continue. Loop autonomously until all events are instrumented and validated.
# Validate analytics implementation
npm run test:analytics
npx ts-node scripts/analytics-audit.ts --check-pii --check-taxonomy
IF event count > 100: audit for redundancy, merge similar events. WHEN PII detected in event properties: remove immediately, purge from provider. IF consent gate bypassed: block deployment, treat as P0 bug.
| Flag | Description |
|---|---|
| (none) | Full analytics design and implementation workflow |
--platform <name> | Force platform: segment, amplitude, mixpanel, posthog, plausible, umami, ga4 |
--taxonomy | Design event taxonomy only (no implementation) |
AUTO-DETECT:
1. SDKs: grep for '@segment/analytics', 'amplitude', 'mixpanel', 'posthog', 'plausible', 'umami', gtag.js
2. Framework: React/Next.js (app vs pages router), Vue/Nuxt, Mobile SDKs
3. Existing events: grep for '.track(', '.capture(', 'analytics.track', 'gtag('
4. Consent: grep for 'cookie-consent', 'cookiebot', 'onetrust'
5. Data warehouse: BigQuery, Snowflake, Redshift configs
6. Privacy: GDPR/CCPA references, EU deployment regions
7. Auto-configure: recommend platform or audit existing for gaps
ANALYTICS IMPLEMENTATION REPORT:
Platform: <Segment | Amplitude | PostHog | etc>
Events tracked: <N> across <M> categories
Funnels defined: <N>
Experiments: <N> A/B tests instrumented
Privacy model: <GDPR compliant | cookieless | consent-based>
PII audit: CLEAN | <N> violations found
Verdict: PASS | NEEDS REVISION
timestamp skill action platform events funnels privacy_model status
Complete when ALL true:
| Failure | Action |
|---|---|
| Events not appearing | Check console errors, verify API key, use analytics debugger, check ad blockers/CSP. |
KEEP if: improvement verified. DISCARD if: regression or no change. Revert discards immediately.
Stop when: target reached, budget exhausted, or >5 consecutive discards.
What SKILL.md sets; muted values are Claude Code's defaults
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
135 skills in this plugin
/a11yAccessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse./agentAI agent development. ReAct/plan-and-execute/multi-agent architectures, tool design, memory systems, guardrails, orchestration (LangChain, LlamaIndex, CrewAI, AutoGen)./angularAngular architecture. NgRx, Signals, RxJS, standalone components, lazy loading, dependency injection, Jasmine, Jest./apiAPI design and specification. REST, GraphQL, gRPC, OpenAPI, design an API, create API spec, validate my API, endpoint.Other plugins' skills for the same job