Agent skill

SaaS Analytics Patterns

by vibeeval in vibeeval/vibecosystem

SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation.

MITAuto-check passedData & Analytics

Install SaaS Analytics Patterns

skills CLI
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vibeeval/vibecosystem saas-analytics-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/saas-analytics-patterns .claude/skills/saas-analytics-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
saas-analytics-patterns
GitHub stars
531
Token cost
~1.9k tokens
SKILL.md length
110 words
Files
1
Skills in repo
144
Repo updated
First seen
Licence
MIT

At a glance

SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation.

  • Tasks that involve Product analytics
  • SKILL.md covers Event Naming Convention, Analytics Provider Abstraction, SaaS Metric Formulas and Event Taxonomy Design, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

SaaS Analytics Patterns is an agent skill from vibeeval/vibecosystem. SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Product analytics. The repository describes itself as: AI software team for Claude Code - 138 agents, 295 skills, 73 hooks. Self-learning, multi-agent swarm, autonomous skill evolution. The licence is MIT.

When your agent uses it

  • Tasks that involve Product analytics

Example prompts

  • “/saas-analytics-patterns”

What it can do on your machine

Read from SKILL.md and the folder at commit 3b763b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SaaS Analytics Patterns loads about 1.9k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 110 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 110 words, ~1,873 tokens.

Download SKILL.mdSave it as .claude/skills/saas-analytics-patterns/SKILL.md (or your agent's skills folder).
name
saas-analytics-patterns
description
SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation.

SaaS Analytics Patterns

Provider-agnostic analytics for SaaS products. Track what matters, name it consistently, respect privacy.

Event Naming Convention

Use object_action format. Past tense for completed actions.

typescript
// GOOD: structured object_action naming
const Events = {
  USER_SIGNED_UP: 'user_signed_up',
  PLAN_UPGRADED: 'plan_upgraded',
  PLAN_DOWNGRADED: 'plan_downgraded',
  PAYMENT_FAILED: 'payment_failed',
  TRIAL_STARTED: 'trial_started',
  FEATURE_USED: 'feature_used',
  INVITE_SENT: 'invite_sent',
  ONBOARDING_COMPLETED: 'onboarding_completed',
} as const

// BAD: ad-hoc, inconsistent naming
// 'click_upgrade_button'  -- UI action, not business event
// 'userSignedUp'          -- camelCase breaks grouping in dashboards
// 'Signed Up'             -- spaces break queries
// 'signup'                -- ambiguous (started? completed?)

Analytics Provider Abstraction

Never couple your app to a specific vendor (Mixpanel, Amplitude, PostHog).

typescript
interface AnalyticsProvider {
  identify(userId: string, traits: Record<string, unknown>): void
  track(event: string, properties?: Record<string, unknown>): void
  page(name: string, properties?: Record<string, unknown>): void
  reset(): void
}

class Analytics {
  private providers: AnalyticsProvider[] = []
  private consentGiven = false

  addProvider(p: AnalyticsProvider): void { this.providers = [...this.providers, p] }
  setConsent(granted: boolean): void { this.consentGiven = granted }

  track(event: string, properties: Record<string, unknown> = {}): void {
    if (!this.consentGiven) return
    const enriched = { ...properties, timestamp: new Date().toISOString() }
    for (const p of this.providers) p.track(event, enriched)
  }

  identify(userId: string, traits: Record<string, unknown> = {}): void {
    if (!this.consentGiven) return
    for (const p of this.providers) p.identify(userId, traits)
  }

  reset(): void { for (const p of this.providers) p.reset() }
}

export const analytics = new Analytics()

SaaS Metric Formulas

typescript
function calculateMetrics(d: {
  activeCustomers: number; customersAtPeriodStart: number; customersLost: number
  recurringRevenue: number; revenueLost: number
  totalAcquisitionSpend: number; newCustomers: number
}) {
  const mrr = d.recurringRevenue
  const arr = mrr * 12
  const churnRate = d.customersAtPeriodStart > 0
    ? (d.customersLost / d.customersAtPeriodStart) * 100 : 0
  const arpu = d.activeCustomers > 0 ? mrr / d.activeCustomers : 0
  const ltv = churnRate > 0 ? arpu * (1 / (churnRate / 100)) : 0
  const cac = d.newCustomers > 0 ? d.totalAcquisitionSpend / d.newCustomers : 0
  const ltvCacRatio = cac > 0 ? ltv / cac : 0  // target: > 3
  return { mrr, arr, churnRate, arpu, ltv, cac, ltvCacRatio }
}

Event Taxonomy Design

Typed property schemas keep every event consistent and queryable.

typescript
interface BaseProperties {
  timestamp: string
  platform: 'web' | 'ios' | 'android'
  session_id: string
}

interface BillingProperties extends BaseProperties {
  plan_id: string; plan_name: string
  amount_cents: number; currency: string
  previous_plan_id?: string
}

// GOOD: typed, every field documented
trackBilling(Events.PLAN_UPGRADED, {
  timestamp: new Date().toISOString(), platform: 'web', session_id: 'sess_abc',
  plan_id: 'plan_pro', plan_name: 'Pro', amount_cents: 4900,
  currency: 'USD', previous_plan_id: 'plan_free',
})

// BAD: analytics.track('upgraded', { plan: 'pro', price: 49 })

Funnel Tracking

Track each lifecycle stage: signup, onboarding, activation, retention.

typescript
const Funnel = {
  SIGNUP: 'funnel_signup_completed',
  ONBOARDING: 'funnel_onboarding_completed',
  ACTIVATION: 'funnel_activation_reached',
  RETAINED_D7: 'funnel_retained_day_7',
  RETAINED_D30: 'funnel_retained_day_30',
} as const

// Define activation with YOUR product's criteria
async function checkActivation(userId: string): Promise<boolean> {
  const projects = await db.project.count({ where: { userId } })
  const invites = await db.invite.count({ where: { invitedBy: userId } })
  if (projects >= 3 && invites >= 1) {
    analytics.track(Funnel.ACTIVATION, { user_id: userId, projects, invites })
    return true
  }
  return false
}

Feature Flag + Analytics

Track experiment exposure, then correlate with conversion outcomes.

typescript
function evaluateFlag(userId: string, flagKey: string): string {
  const variant = featureFlags.evaluate(flagKey, userId)
  analytics.track('feature_flag_evaluated', { flag_key: flagKey, variant, user_id: userId })
  return variant
}
// Correlate: SELECT variant, COUNT(*) FROM events
// WHERE event='plan_upgraded' AND user_id IN (
//   SELECT user_id FROM events WHERE event='feature_flag_evaluated'
//   AND flag_key='new_pricing') GROUP BY variant

Server-Side vs Client-Side

typescript
// CLIENT: UI interactions, page views (blockable by ad blockers)
analytics.track('button_clicked', { button_id: 'cta_hero' })

// SERVER: revenue, activation, lifecycle (never blocked = source of truth)
async function onSubscription(sub: Subscription): Promise<void> {
  await serverAnalytics.track('plan_upgraded', {
    user_id: sub.userId, plan_id: sub.planId, amount_cents: sub.amountCents,
  })
}
// Revenue + activation events: ALWAYS server-side
// UI interactions: client-side is acceptable

Privacy-Respecting Analytics

typescript
function privacyWrap(base: AnalyticsProvider): AnalyticsProvider {
  return {
    identify(userId, traits) {
      const hashed = createHash('sha256').update(userId).digest('hex')
      base.identify(hashed, { plan: traits.plan, signup_date: traits.signup_date })
    },
    track(event, props = {}) {
      const { email, ip_address, user_agent, user_id, ...safe } = props as Record<string, unknown>
      // Hash user_id if present to prevent PII leak to analytics provider
      if (user_id) (safe as Record<string, unknown>).user_id = createHash('sha256').update(String(user_id)).digest('hex').slice(0, 16)
      base.track(event, safe)
    },
    page: (n, p) => base.page(n, p),
    reset: () => base.reset(),
  }
}

function initAnalytics(consent: 'none' | 'essential' | 'full'): void {
  if (consent === 'none') return
  analytics.setConsent(true)
  if (consent === 'essential') analytics.addProvider(privacyWrap(serverProvider))
  if (consent === 'full') { analytics.addProvider(serverProvider); analytics.addProvider(clientProvider) }
}

Cohort Analysis Setup

typescript
function assignCohort(user: { id: string; createdAt: Date; plan: string }): void {
  const month = `${user.createdAt.getFullYear()}-${String(user.createdAt.getMonth() + 1).padStart(2, '0')}`
  analytics.identify(user.id, {
    cohort_signup_month: month,
    cohort_plan_at_signup: user.plan,
    cohort_channel: getAttributionChannel(user.id),
  })
}
// Retention query: SELECT cohort_signup_month,
//   DATEDIFF(week, first_seen, event_date) AS week_n,
//   COUNT(DISTINCT user_id) AS active
// FROM events GROUP BY 1, 2 ORDER BY 1, 2

Key principles: Name events object_action. Track revenue server-side. Abstract your provider from day one. Define activation explicitly. Strip PII before sending to any third party.

© vibeeval, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/saas-analytics-patterns of vibeeval/vibecosystem.

Open the folder on GitHubat commit 3b763b1

Compare with similar skills

SaaS Analytics Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SaaS Analytics Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SaaS Analytics Patterns this skillvibeeval/vibecosystem531—~1.9kAutomated safety check: PassMIT
PostHog CLI Queriesdebugtheworldbot/keyStats1.5k—~1.2kAutomated safety check: PassMIT
Retentioneering Contributingretentioneering/retentioneering-tools920—~1.8kAutomated safety check: PassApache-2.0
Retentioneering Product Analyticsretentioneering/retentioneering-tools920—~1.6kAutomated safety check: PassApache-2.0
Retention Analysisliangdabiao/claude-data-analysis-ultra-main2901 repos~1.3kAutomated safety check: NotesNone
Feature Analytics Instrumentation Plannermistralai/mistral-vibe5.1k—~2.2kAutomated safety check: PassApache-2.0

Similar skills

  • PostHog CLI Queries

    debugtheworldbot/keyStats

    Runs HogQL queries against this project's PostHog data from the terminal using posthog-cli, with bundled scripts for dashboard metadata the CLI itself has no command for.

    1.5k GitHub stars~1.2k tokensUpdated 4 days ago
    Data & AnalyticsAuto-check passed
  • Retentioneering Contributing

    retentioneering/retentioneering-tools

    Help the user turn their Retentioneering ideas, friction reports, bug findings, or feature needs into high-quality upstream contributions: from capturing and validating the idea, through minimal…

    920 GitHub stars~1.8k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Retentioneering Product Analytics

    retentioneering/retentioneering-tools

    Analyze event logs, clickstreams, user paths, product funnels, retention, behavioral segments, transition graphs, step matrices, sequence patterns, and customer journeys using Retentioneering.

    920 GitHub stars~1.6k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Retention Analysis

    liangdabiao/claude-data-analysis-ultra-main

    Analyze user retention and churn using survival analysis, cohort analysis, and machine learning.

    290 GitHub starsUsed in 1 repo~1.3k tokens
    Data & AnalyticsAuto-check: notes
  • Official

    Plans which analytics events and properties a new feature needs, checks them against the existing event registry, and verifies them per environment.

    5.1k GitHub stars~2.2k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Funnel Analysis

    liangdabiao/claude-data-analysis-ultra-main

    Analyze user conversion funnels, calculate step-by-step conversion rates, create interactive visualizations, and identify optimization opportunities.

    290 GitHub starsUsed in 2 repos~781 tokens
    Data & AnalyticsAuto-check: notes

More from vibeeval/vibecosystem

All 144 skills in this repo
  • Agent Benchmark

    vibeeval/vibecosystem

    Framework for measuring and tracking agent response quality over time.

    531 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Differential Review

    vibeeval/vibecosystem

    Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Factcheck Guard

    vibeeval/vibecosystem

    A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.

    531 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Fp Check

    vibeeval/vibecosystem

    Systematic false positive verification for security findings.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Notepad System

    vibeeval/vibecosystem

    A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.

    531 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed

Questions about SaaS Analytics Patterns

What does SaaS Analytics Patterns do?

SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation. SaaS Analytics Patterns is an agent skill from vibeeval/vibecosystem. SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation.

When should I use SaaS Analytics Patterns?

SaaS Analytics Patterns fits situations like: tasks that involve Product analytics.

How do I install SaaS Analytics Patterns in Claude Code?

Run `npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a claude-code`. Or copy the skill folder (skills/saas-analytics-patterns in vibeeval/vibecosystem) into .claude/skills/saas-analytics-patterns in your project. Claude Code loads it when a task matches its description.

How do I install SaaS Analytics Patterns in Codex?

Run `npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a codex`. Or copy the skill folder (skills/saas-analytics-patterns in vibeeval/vibecosystem) into .agents/skills/saas-analytics-patterns in your project. Codex loads it when a task matches its description.

Can I use SaaS Analytics Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/saas-analytics-patterns, .gemini/skills/saas-analytics-patterns, .github/skills/saas-analytics-patterns and .opencode/skills/saas-analytics-patterns in your project.

What does SaaS Analytics Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: SaaS Analytics Patterns is instructions for the agent only.

Does SaaS Analytics Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is SaaS Analytics Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does SaaS Analytics Patterns use?

SaaS Analytics Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SaaS Analytics Patterns use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to SaaS Analytics Patterns?

Skills that share tags, products or a category with SaaS Analytics Patterns: PostHog CLI Queries (debugtheworldbot/keyStats, 1.5k stars), Retentioneering Contributing (retentioneering/retentioneering-tools, 920 stars), Retentioneering Product Analytics (retentioneering/retentioneering-tools, 920 stars) and Retention Analysis (liangdabiao/claude-data-analysis-ultra-main, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SaaS Analytics Patterns?

vibeeval (a GitHub user) maintains it in vibeeval/vibecosystem, which has 531 GitHub stars. The repository holds 144 skills in this directory. The repository was last updated on August 8, 2026.

Source: vibeeval/vibecosystem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.