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.
SaaS analytics event taxonomy, metric formulas (MRR, churn, LTV), provider-agnostic tracking, funnel analysis, cohort setup, and privacy-respecting instrumentation.
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install vibeeval/vibecosystem saas-analytics-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "saas-analytics-patterns" agent skill from https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patterns into .claude/skills/saas-analytics-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "saas-analytics-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install vibeeval/vibecosystem saas-analytics-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/saas-analytics-patterns .agents/skills/saas-analytics-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "saas-analytics-patterns" agent skill from https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patterns into .agents/skills/saas-analytics-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "saas-analytics-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install vibeeval/vibecosystem saas-analytics-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/saas-analytics-patterns .cursor/skills/saas-analytics-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "saas-analytics-patterns" agent skill from https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patterns into .cursor/skills/saas-analytics-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "saas-analytics-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/vibeeval/vibecosystem.git --path skills/saas-analytics-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install vibeeval/vibecosystem saas-analytics-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/saas-analytics-patterns .gemini/skills/saas-analytics-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "saas-analytics-patterns" agent skill from https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patterns into .gemini/skills/saas-analytics-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "saas-analytics-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install vibeeval/vibecosystem saas-analytics-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/saas-analytics-patterns .github/skills/saas-analytics-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "saas-analytics-patterns" agent skill from https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patterns into .github/skills/saas-analytics-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "saas-analytics-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vibeeval/vibecosystem --skill saas-analytics-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install vibeeval/vibecosystem saas-analytics-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/saas-analytics-patterns .opencode/skills/saas-analytics-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "saas-analytics-patterns" agent skill from https://github.com/vibeeval/vibecosystem/tree/main/skills/saas-analytics-patterns into .opencode/skills/saas-analytics-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "saas-analytics-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
saas-analytics-patternsSaaS 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.
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.
Read from SKILL.md and the folder at commit 3b763b1. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 110 words, ~1,873 tokens.
.claude/skills/saas-analytics-patterns/SKILL.md (or your agent's skills folder).Provider-agnostic analytics for SaaS products. Track what matters, name it consistently, respect privacy.
Use object_action format. Past tense for completed actions.
// 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?)Never couple your app to a specific vendor (Mixpanel, Amplitude, PostHog).
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()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 }
}Typed property schemas keep every event consistent and queryable.
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 })Track each lifecycle stage: signup, onboarding, activation, retention.
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
}Track experiment exposure, then correlate with conversion outcomes.
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// 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 acceptablefunction 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) }
}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, 2Key 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
Just SKILL.md in skills/saas-analytics-patterns of vibeeval/vibecosystem.
Open the folder on GitHubat commit 3b763b1
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| SaaS Analytics Patterns this skillvibeeval/vibecosystem | 531 | — | ~1.9k | Automated safety check: Pass | MIT | |
| PostHog CLI Queriesdebugtheworldbot/keyStats | 1.5k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Retentioneering Contributingretentioneering/retentioneering-tools | 920 | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Retentioneering Product Analyticsretentioneering/retentioneering-tools | 920 | — | ~1.6k | Automated safety check: Pass | Apache-2.0 | |
| Retention Analysisliangdabiao/claude-data-analysis-ultra-main | 290 | 1 repos | ~1.3k | Automated safety check: Notes | None | |
| Feature Analytics Instrumentation Plannermistralai/mistral-vibe | 5.1k | — | ~2.2k | Automated safety check: Pass | Apache-2.0 |
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.
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…
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.
liangdabiao/claude-data-analysis-ultra-main
Analyze user retention and churn using survival analysis, cohort analysis, and machine learning.
mistralai/mistral-vibe
Plans which analytics events and properties a new feature needs, checks them against the existing event registry, and verifies them per environment.
liangdabiao/claude-data-analysis-ultra-main
Analyze user conversion funnels, calculate step-by-step conversion rates, create interactive visualizations, and identify optimization opportunities.
vibeeval/vibecosystem
Framework for measuring and tracking agent response quality over time.
vibeeval/vibecosystem
Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.
vibeeval/vibecosystem
A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.
vibeeval/vibecosystem
Systematic false positive verification for security findings.
vibeeval/vibecosystem
n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.
vibeeval/vibecosystem
A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.
Categories
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.
SaaS Analytics Patterns fits situations like: tasks that involve Product analytics.
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.
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.
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.
SKILL.md names no scripts, command-line tools or credentials: SaaS Analytics Patterns is instructions for the agent only.
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.
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.
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.
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.
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.
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.