# Claude Code skills for SQL, funnels and data analysis

Claude Code skills to write SQL from a plain question, analyze funnels and cohorts, clean CSVs, define metrics and design databases.

These Claude Code skills take you from a business question to an answer backed by data. To query, [turn a question into a SQL query](https://skills.sgomez.dev/en/s/data--analytics-sql.md) generates runnable analytical SQL, [analyze a conversion funnel](https://skills.sgomez.dev/en/s/data--funnel-analysis.md) computes drop-off per step, and [analyze retention cohorts](https://skills.sgomez.dev/en/s/data--cohort-analysis.md) builds the query on your real schema.

Before analyzing, [clean a CSV or Excel file](https://skills.sgomez.dev/en/s/data--csv-wrangler.md) creates a reusable script, [audit data quality](https://skills.sgomez.dev/en/s/data--data-quality-audit.md) looks for nulls, duplicates and invalid values, and [define a metric](https://skills.sgomez.dev/en/s/data--metric-definition.md) turns a vague term such as 'active users' into a document with a formula. To present the results, [specify a dashboard](https://skills.sgomez.dev/en/s/data--dashboard-spec.md) sets the audience, questions and charts.

For the database itself, [design a schema](https://skills.sgomez.dev/en/s/database--schema.md) reviews normalization, keys and constraints, [generate an ER diagram](https://skills.sgomez.dev/en/s/database--erd.md) draws it in Mermaid, and [optimize a slow query](https://skills.sgomez.dev/en/s/database--query-optimize.md) finds missing indexes and N+1 problems. If you measure a product, [plan event tracking](https://skills.sgomez.dev/en/s/data--event-tracking-plan.md) defines events and properties. Each one starts from a plain-language request in Claude Code, and you review the result before using it.

Web version: https://skills.sgomez.dev/en/data
Updated 21 Aug 2026

## Skills (19)

- [Analytics SQL from a question (/data--analytics-sql)](https://skills.sgomez.dev/en/s/data--analytics-sql.md): Turns a plain-language business question into a runnable analytical SQL query built on your project's real schema, with an explanation.
- [Cohort retention analysis (/data--cohort-analysis)](https://skills.sgomez.dev/en/s/data--cohort-analysis.md): Builds runnable cohort retention SQL on your real schema, plus a guide to reading the retention triangle and spotting misleading patterns.
- [CSV and Excel cleanup (/data--csv-wrangler)](https://skills.sgomez.dev/en/s/data--csv-wrangler.md): Cleans, dedupes and reshapes a CSV or Excel file with a reusable Python script, saving a clean copy and leaving the original untouched.
- [Dashboard specification (/data--dashboard-spec)](https://skills.sgomez.dev/en/s/data--dashboard-spec.md): Writes a Markdown dashboard spec covering audience, key questions, metrics, chart types and layout, ready to build in any BI tool.
- [Data contracts between teams (/data--data-contracts)](https://skills.sgomez.dev/en/s/data--data-contracts.md): Defines a YAML data contract between the producer and consumers of a dataset: schema, freshness and quality SLAs, and versioning rules.
- [Data quality audit (/data--data-quality-audit)](https://skills.sgomez.dev/en/s/data--data-quality-audit.md): Audits tables or pipeline output for nulls, duplicates, invalid values, orphaned keys and drift, with runnable SQL and a ranked findings report.
- [dbt models with tests (/data--dbt-model)](https://skills.sgomez.dev/en/s/data--dbt-model.md): Generates dbt models in staging and marts layers with tests and column docs, following the conventions your dbt project already uses.
- [Idempotent ETL or ELT pipeline (/data--etl-pipeline)](https://skills.sgomez.dev/en/s/data--etl-pipeline.md): Scaffolds an ETL or ELT pipeline that is safe to re-run, fails loudly, and uses the data tools already in your repo.
- [Product analytics tracking plan (/data--event-tracking-plan)](https://skills.sgomez.dev/en/s/data--event-tracking-plan.md): Designs a YAML product analytics tracking plan with events, properties and naming rules, grounded in your app's actual code.
- [Conversion funnel analysis (/data--funnel-analysis)](https://skills.sgomez.dev/en/s/data--funnel-analysis.md): Builds conversion funnel SQL on your real event data, with drop-off per step and per segment, plus an insights template for next steps.
- [Precise business metric definition (/data--metric-definition)](https://skills.sgomez.dev/en/s/data--metric-definition.md): Turns a vague metric like "active users" or "churn" into a document with formula, grain, filters, edge-case rulings and a named owner.
- [Data warehouse schema design (/data--warehouse-schema)](https://skills.sgomez.dev/en/s/data--warehouse-schema.md): Designs a star or snowflake warehouse schema with fact and dimension tables, dialect-correct DDL, an entity diagram and a design document.
- [Entity relationship diagram (/database--erd)](https://skills.sgomez.dev/en/s/database--erd.md): Generates a Mermaid ER diagram from your database schema or ORM models, with columns, keys and relationship cardinality.
- [Database migrations (/database--migration)](https://skills.sgomez.dev/en/s/database--migration.md): Generates migration files for a schema change, with both up and down versions and safety checks for risky table alterations.
- [Prisma schema (/database--prisma-gen)](https://skills.sgomez.dev/en/s/database--prisma-gen.md): Creates or updates your schema.prisma from your requirements or existing database, and gives the migration and client generation commands.
- [Speed up slow SQL queries (/database--query-optimize)](https://skills.sgomez.dev/en/s/database--query-optimize.md): Analyzes a slow SQL or ORM query, spots missing indexes and N+1 problems, and suggests index and rewrite fixes.
- [Database schema design (/database--schema)](https://skills.sgomez.dev/en/s/database--schema.md): Designs or reviews a database schema covering normalization, keys, constraints and indexes, and delivers SQL plus an ER diagram.
- [Seed data for development (/database--seed)](https://skills.sgomez.dev/en/s/database--seed.md): Generates realistic seed data for your database, with valid relationships and edge cases, in your ORM's format and safe to re-run.
- [Web reading with z-ai (/web-reader)](https://skills.sgomez.dev/en/s/web-reader.md): Shows how to use z-ai-web-dev-sdk to read a URL and get its title, main HTML and publication time, from backend code or the CLI.
