Agent skill

Data Cohort Analysis

by asgard-ai-platform in asgard-ai-platform/skills

Conduct cohort analysis to track user behavior over time, build retention matrices, and compare cohort performance.

MITAuto-check passedData & Analytics

Install Data Cohort Analysis

skills CLI
$ npx skills add asgard-ai-platform/skills --skill data-cohort-analysis -a claude-code

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

GitHub CLI
$ gh skill install asgard-ai-platform/skills data-cohort-analysis --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/asgard-ai-platform/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/data-cohort-analysis .claude/skills/data-cohort-analysis && 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
data-cohort-analysis
GitHub stars
242
Token cost
~1.2k tokens
SKILL.md length
400 words
Files
4 (incl. references)
Skills in repo
207
Repo updated
First seen
Licence
MIT

At a glance

Conduct cohort analysis to track user behavior over time, build retention matrices, and compare cohort performance.

  • The user needs to measure retention
  • SKILL.md covers Framework, Output Format, Gotchas and References
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Understand how user behavior changes after acquisition

What it does

Data Cohort Analysis is an agent skill from asgard-ai-platform/skills. Conduct cohort analysis to track user behavior over time, build retention matrices, and compare cohort performance. Use this skill when the user needs to measure retention, understand how user behavior changes after acquisition, compare product versions' impact on engagement, or predict LTV — even if they say 'what's our retention rate', 'are newer users behaving differently', 'build a retention table', or 'how long do customers stick around'.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `examples/sample_scenario.md`, `references/cohort-ltv.md` and `references/retention-sql.md`).

It sits in Data & Analytics, covering Product analytics. The repository describes itself as: 301 open-source coding agent skills across 22 domains — methodology, judgment & gotchas packaged as Claude Agent Skills for the Asgard AI Platform. The licence is MIT.

When your agent uses it

  • The user needs to measure retention
  • Understand how user behavior changes after acquisition
  • Compare product versions impact on engagement
  • Predict LTV — even if they say whats our retention rate

Example prompts

  • “impact on engagement, or predict LTV — even if they say”
  • “s our retention rate”
  • “are newer users behaving differently”
  • “/data-cohort-analysis”

What it can do on your machine

Read from SKILL.md and the folder at commit 4e7f4f8. 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 markdown).

    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

Data Cohort Analysis loads about 1.2k tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 117 tokens; SKILL.md has 400 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6k

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 asgard-ai-platform/skills at commit 4e7f4f8, republished under its MIT licence (© asgard-ai-platform). 400 words, ~1,232 tokens.

Download SKILL.mdSave it as .claude/skills/data-cohort-analysis/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
data-cohort-analysis
description
Conduct cohort analysis to track user behavior over time, build retention matrices, and compare cohort performance. Use this skill when the user needs to measure retention, understand how user behavior changes after acquisition, compare product versions' impact on engagement, or predict LTV — even if they say 'what's our retention rate', 'are newer users behaving differently', 'build a retention table', or 'how long do customers stick around'.
metadata.category
WP-04 數據分析
metadata.tags
data-analysis, cohort, retention, product-analytics

Cohort Analysis

Framework

IRON LAW: Aggregate Metrics Hide Cohort Differences

A 70% monthly retention rate OVERALL can mask that January cohort retains
at 85% while June cohort retains at 50%. Aggregate metrics blend improving
and deteriorating cohorts together, hiding both problems and progress.
ALWAYS analyze by cohort before drawing conclusions.
Core Concepts

Cohort: A group of users who share a common characteristic in a specific time period. Most common: acquisition cohort (grouped by signup month).

Retention Matrix: Rows = cohorts (by signup month), Columns = time periods after signup (Month 0, 1, 2...). Cells = % of cohort still active.

           Month 0  Month 1  Month 2  Month 3
Jan cohort   100%     65%     48%      40%
Feb cohort   100%     60%     42%      35%
Mar cohort   100%     70%     55%      48%  ← Improvement!
Retention Types
TypeDefinitionUse Case
N-day% active on exactly day NGames, daily-use apps
N-day bounded% active within first N daysGeneral product usage
Week/Month% active in week/month NSaaS, subscriptions
Unbounded% who ever return after day NLow-frequency products
Analysis Steps

Phase 1: Define Cohort and Activity

  • Cohort definition: signup date, first purchase date, or other milestone
  • Activity definition: login, purchase, specific action — must match the product's core value
  • Time granularity: daily (for daily-use products), weekly, or monthly

Phase 2: Build Retention Matrix

  • Group users into cohorts
  • For each cohort, calculate retention at each time period
  • Visualize as a heatmap (darker = higher retention)

Phase 3: Identify Patterns

  • Retention curve shape: Does it flatten (good — stable core users) or keep declining (bad — everyone eventually churns)?
  • Cohort comparison: Are newer cohorts retaining better or worse than older ones?
  • Drop-off cliff: Is there a specific period where retention drops sharply? (e.g., Day 1 → Day 7 drops 50%)

Phase 4: Connect to Actions

  • What changed for the improving/deteriorating cohorts? (product update, marketing channel shift, onboarding change)
  • Can you isolate the cause through A/B test or event analysis?

Phase 5: LTV Projection

  • Use cohort retention curves to project future revenue per cohort
  • LTV = Σ (retention_month_n × ARPU_month_n) for all future months
Show full SKILL.md (144 more words)Show less

Output Format

markdown
# Cohort Analysis: {Product}

## Cohort Definition
- Cohort: {signup month / first purchase}
- Activity: {what counts as "active"}
- Period: {daily / weekly / monthly}

## Retention Matrix
| Cohort | M0 | M1 | M2 | M3 | M4 | M5 | M6 |
|--------|-----|-----|-----|-----|-----|-----|-----|
| {month} | 100% | {%} | {%} | {%} | {%} | {%} | {%} |

## Key Findings
1. {retention curve shape}
2. {cohort trend — improving or deteriorating}
3. {critical drop-off point}

## Cohort Comparison
| Metric | Oldest Cohort | Newest Cohort | Delta |
|--------|-------------|-------------|-------|
| M1 retention | {%} | {%} | {±pp} |
| M3 retention | {%} | {%} | {±pp} |
| Projected LTV | ${X} | ${X} | {%} |

## Recommendations
1. {action to improve retention at critical drop-off point}

Gotchas

  • Define "active" carefully: Login ≠ value delivery. A user who logs in but doesn't complete the core action (purchase, send message, create document) shouldn't count as "retained."
  • Cohort size matters: A cohort of 10 users with 50% retention is meaningless (5 users). Ensure cohorts have statistically meaningful sizes.
  • Survivorship bias in aggregates: "Average retention is improving" may just mean you have more new users (who are always at M0 = 100%) diluting the denominator.
  • Seasonal cohorts behave differently: December cohorts (holiday shoppers) often retain worse than March cohorts (organic discovery). Compare same-season cohorts YoY.
  • Retention ≠ engagement depth: A user who returns once per month but uses for 5 hours vs one who returns daily for 30 seconds — same retention, very different engagement. Layer in activity depth metrics.

References

  • For SQL retention query templates, see references/retention-sql.md
  • For LTV projection from cohort data, see references/cohort-ltv.md

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

Files

SKILL.md and 3 other files (references) in data-cohort-analysis of asgard-ai-platform/skills.

  • SKILL.md
  • examples/sample_scenario.md
  • references/cohort-ltv.md
  • references/retention-sql.md

Open the folder on GitHubat commit 4e7f4f8

Compare with similar skills

Data Cohort Analysis 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.

Data Cohort Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Data Cohort Analysis this skillasgard-ai-platform/skills242—~1.2kAutomated safety check: PassMIT
PostHog CLI Queriesdebugtheworldbot/keyStats1.5k—~1.2kAutomated safety check: PassMIT
Retentioneering Contributingretentioneering/retentioneering-tools927—~1.8kAutomated safety check: PassApache-2.0
Retentioneering Product Analyticsretentioneering/retentioneering-tools927—~1.6kAutomated safety check: PassApache-2.0
Feature Analytics Instrumentation Plannermistralai/mistral-vibe5.1k—~2.2kAutomated safety check: PassApache-2.0
Funnel Analysisliangdabiao/claude-data-analysis-ultra-main2901 repos~781Automated safety check: NotesNone

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 7 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…

    927 GitHub stars~1.8k tokensUpdated 2 days ago
    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.

    927 GitHub stars~1.6k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • 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 today
    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 1 repo~781 tokens
    Data & AnalyticsAuto-check: notes
  • Event Tracking

    linuxfoundation/insights

    Add event tracking calls to Vue/Nuxt components in the Insights app using the useTrackEvent composable.

    282 GitHub stars~1.9k tokensUpdated 8 days ago
    Data & AnalyticsAuto-check passed

More from asgard-ai-platform/skills

All 207 skills in this repo
  • Algo Ecom Bm25

    asgard-ai-platform/skills

    Implement BM25 ranking function for e-commerce product search relevance scoring.

    242 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Mfg Cpk

    asgard-ai-platform/skills

    Calculate Cpk process capability index to assess whether a process meets specification requirements.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Price Elasticity

    asgard-ai-platform/skills

    Calculate price elasticity of demand to quantify how price changes affect sales volume.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Bayesian

    asgard-ai-platform/skills

    Apply Bayesian averaging to rank items by combining observed ratings with prior expectations.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Elo

    asgard-ai-platform/skills

    Implement Elo rating system to rank items or players from pairwise comparison outcomes.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Wilson

    asgard-ai-platform/skills

    Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Data Cohort Analysis

What does Data Cohort Analysis do?

Conduct cohort analysis to track user behavior over time, build retention matrices, and compare cohort performance. Data Cohort Analysis is an agent skill from asgard-ai-platform/skills. Conduct cohort analysis to track user behavior over time, build retention matrices, and compare cohort performance.

When should I use Data Cohort Analysis?

Data Cohort Analysis fits situations like: the user needs to measure retention; understand how user behavior changes after acquisition; compare product versions impact on engagement; predict LTV — even if they say whats our retention rate.

How do I install Data Cohort Analysis in Claude Code?

Run `npx skills add asgard-ai-platform/skills --skill data-cohort-analysis -a claude-code`. Or copy the skill folder (data-cohort-analysis in asgard-ai-platform/skills) into .claude/skills/data-cohort-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Data Cohort Analysis in Codex?

Run `npx skills add asgard-ai-platform/skills --skill data-cohort-analysis -a codex`. Or copy the skill folder (data-cohort-analysis in asgard-ai-platform/skills) into .agents/skills/data-cohort-analysis in your project. Codex loads it when a task matches its description.

Can I use Data Cohort Analysis 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 asgard-ai-platform/skills --skill data-cohort-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/data-cohort-analysis, .gemini/skills/data-cohort-analysis, .github/skills/data-cohort-analysis and .opencode/skills/data-cohort-analysis in your project.

What does Data Cohort Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Data Cohort Analysis is instructions for the agent only.

Does Data Cohort Analysis 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 Data Cohort Analysis 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 Data Cohort Analysis use?

Data Cohort Analysis 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 Data Cohort Analysis use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.8k tokens, read only when the agent opens those files.

What are the alternatives to Data Cohort Analysis?

Skills that share tags, products or a category with Data Cohort Analysis: PostHog CLI Queries (debugtheworldbot/keyStats, 1.5k stars), Retentioneering Contributing (retentioneering/retentioneering-tools, 927 stars), Retentioneering Product Analytics (retentioneering/retentioneering-tools, 927 stars) and Feature Analytics Instrumentation Planner (mistralai/mistral-vibe, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Data Cohort Analysis?

asgard-ai-platform (a GitHub organization) maintains it in asgard-ai-platform/skills, which has 242 GitHub stars. The repository holds 207 skills in this directory. The repository was last updated on June 6, 2026.

Source: asgard-ai-platform/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.