agentleFS
chatquillchatquill/claude-code-websites/.claude/skills/analytics-plan/SKILL.md

analytics-plan

Skill1 starsChanged 23 days agoMITView on GitHub

Turns the PRD's success metrics into an event-level tracking plan (events, properties, identity, consent gating, server-side money events) and optional implementation stories. Use when setting up product analytics, before launch, or when metrics cannot answer a product question.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the PRD metrics. List each metric as a question it must answer ("What % of signups create a project within 24 h?").

    line 28
  2. Very specific:

    If stack.analytics is unset, ask: "Which analytics tool?" → PostHog (Recommended: product analytics + flags + experiments), Plausible …

    line 32
  3. Distinctive:

    Keep the catalogue small: 10–25 events for an MVP.

    line 53
  4. Very specific:

    Ask: "Create implementation stories?" → Yes: one story per area (Recommended), No.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Analytics Plan

Produces production/analytics/tracking-plan.md: the few events that answer the PRD's questions, named consistently, gated by consent, with money and critical state changes tracked server-side. It never adds tracking code without a story, and never sends PII to analytics.

Inputs

  • docs/product/prd.md: the Goals and metrics / success metrics section (read by heading)
  • docs/specs/features/*.md: the key journeys each feature adds
  • project.yaml: stack.analytics, stack.payments, privacy.regions, project.type
  • An existing production/analytics/tracking-plan.md (argument update)

Phases

Phase 1: Questions before events

Read the PRD metrics. List each metric as a question it must answer ("What % of signups create a project within 24 h?"). If the PRD has no metrics, stop and suggest /write-prd (or ask product-director to add them).

If stack.analytics is unset, ask: "Which analytics tool?" → PostHog (Recommended: product analytics + flags + experiments), Plausible (privacy-first page analytics), GA4, None yet.

Phase 2: Draft the plan

Spawn analytics-engineer with the questions, the specs and the tool, and growth-lead in parallel to define the North Star, the activation event and the funnel stages. Merge their output into the template .claude/docs/templates/analytics-tracking-plan.md:

SectionContent
Metrics → eventsEach PRD question mapped to the events and properties that answer it
Event catalogueobject_action snake_case names (project_created), trigger, properties with types, client or server, owner
Identityanonymous ID → identify on signup/login; alias rules; no email/name as distinct ID
Server-side eventsPayments (subscription_started, payment_failed), account deletion, plan changes; sent from webhooks/handlers, never trusted from the client
ConsentWhich events need consent under privacy.regions; load the SDK only after opt-in where required; cookieless mode where available
ExclusionsInternal/test traffic filtered; preview deployments excluded
DashboardsNorth Star, activation funnel, retention cohort, revenue

Keep the catalogue small: 10–25 events for an MVP. Every event must map to a question; drop the rest.

Phase 3: Privacy check

Spawn privacy-compliance-specialist to review: no PII or free text in properties, consent gating matches privacy.regions, processors listed for the privacy policy. Apply its findings or show them to the user.

Phase 4: Write

Show the plan summary (questions, event count, server-side events, consent rules) and ask "May I write this to production/analytics/tracking-plan.md?"

Phase 5: Implementation stories (optional)

Ask: "Create implementation stories?" → Yes: one story per area (Recommended), No. On yes, draft stories in the story format from the conventions (typed track() helper, client events, server events, dashboards), using next-number.sh for IDs, and ask before writing them under production/stories/.

Output

  • production/analytics/tracking-plan.md (template analytics-tracking-plan)
  • Optional stories under production/stories/E-NN/

Rigor

  • minimal: page views + the activation event + signup; no stories.
  • standard: full plan, privacy review.
  • full: plan + privacy review + a test per server-side event in the stories.

Next step

/dev-story for the tracking stories, then /funnel-review once data exists.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.