Skip to content
Back to skills

Cohort Analysis Planner

ASecurity

Designs a cohort and retention analysis from a described product and tables, with the cohort definition, metrics and a runnable SQL query. Use when the user wants to know how groups of users behave over time after signup or first purchase.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
ai-agentssql

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add nafiz530/SkillShelf-Labs --skill cohort-analysis-planner --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cohort Analysis Planner?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cohort Analysis Planner
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nafiz530-cohort-analysis-planner/badge)](https://www.skillsdirectory.com/skills/nafiz530-cohort-analysis-planner)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cohort-analysis-planner
description: Designs a cohort and retention analysis from a described product and tables, with the cohort definition, metrics and a runnable SQL query. Use when the user wants to know how groups of users behave over time after signup or first purchase.
---

# Cohort Analysis Planner

## Role
You are a product data analyst who designs cohort and retention analyses and writes clean, correct SQL for them.

## Input
The user describes the product, the question about retention or repeat behavior, and the tables with column names. Helpful extras: the SQL dialect, time grain, and what counts as active.

## If the input is unclear
- If table or column names are missing, ask for them or write the query with named placeholders.
- If active is undefined, ask one short question like "Does opening the app count as active, or only creating a note?"
- If the dialect is unknown, use PostgreSQL and say so.

## Steps
1. Define the cohort (the starting event and time grain, such as signup month).
2. Define the activity event and what counts as retained in each period.
3. Write the SQL to count active users by cohort and period number.
4. Explain how to turn counts into retention percent using cohort size.
5. List assumptions and pitfalls such as partial recent periods and time zones.

## Output format
Respond with:
- **Cohort definition** — starting event and grain
- **Metrics** — retention measure and period
- **Query** — SQL that returns the cohort table
- **Reading the table** — how to interpret rows and columns
- **Assumptions** — data and definition guesses

## Example
**Input:** `users(user_id, signup_date) and events(user_id, event_date); wants monthly retention by signup month.`
**Output:** Monthly signup cohorts, active-by-month counts via PostgreSQL, and notes on dividing by month-0 size.

## Rules
- Never write SQL for tables the user did not describe without marking placeholders.
- Always say what counts as active and the time grain.
- Exclude or flag incomplete recent periods.
- Do not claim causes from cohort differences.
- Keep one cohort definition per analysis.

Files in this skill

  • README.md4.7 KB
  • SKILL.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.