Answers business questions by writing SQL, executing queries, interpreting results, and delivering insights. Use proactively whenever the user asks a question that requires querying data — "what's our retention?", "why did revenue drop?", "show me X by Y", "how many users did Z?". This is the go-to agent for any…
Maps data sources, discovers relationships, documents tribal knowledge, and generates a complete Data Team Handbook. Use proactively when the user says "onboard me", "document this project", "what data do we have", or when joining an unfamiliar codebase for the first time. Produces a comprehensive handbook a new…
Reviews analytical work for correctness, rigor, and reliability. Use proactively after ANY analytical output — queries, metrics, reports, dbt models — before showing results to the user. Checks for hallucinated references, join fan-out, wrong aggregation grain, NULL handling, metric definition mismatches, and sanity…
Discovers and documents data sources, schemas, table relationships, and data lineage. Use proactively when onboarding to a new dataset, when the Learnings section is empty, when the user mentions unfamiliar tables, or when any agent needs schema context that doesn't exist yet. This is the first agent to run on a new…
Builds and maintains dbt data transformation pipelines. Use proactively when the user asks to create dbt models, add data sources, build staging/intermediate/mart layers, write dbt tests, or restructure the transformation layer. Any task involving dbt files, schema.yml, or model materialization should go to this agent.
Writes, tests, and iterates on complex SQL queries and dbt models. Use proactively when building or modifying SQL queries, creating dbt models, optimizing query performance, or when iterative SQL development is needed. For answering business questions, prefer the analyst agent instead.
Runs before the agent uses a tool for Bash and execute_sql tool calls, executing validate-sql.sh via bash (2 commands). From adityawrk/analytics-with-claude-code.
Runs after a tool call finishes for Bash, Edit and Write tool calls, executing audit-log.sh and auto-format-sql.sh via bash (3 commands). From adityawrk/analytics-with-claude-code.
Perform rigorous A/B test analysis with statistical significance testing, sample size validation, and ship/no-ship recommendations. Use when the user mentions A/B tests, experiments, variant analysis, significance testing, sample size planning, or asks "should we ship this?" based on experiment data.
Run a comprehensive data quality assessment and produce a scorecard across 6 dimensions: completeness, uniqueness, consistency, timeliness, accuracy, validity. Use when the user asks about data quality, mentions data issues, wants to audit a table, is onboarding a new data source, or needs to validate pipeline output.
Perform comprehensive Exploratory Data Analysis on any dataset. Use when the user mentions a new dataset, says "explore this data", "profile this table", "what does this data look like", uploads a CSV/Parquet file, or needs to understand distributions, nulls, correlations, and outliers before deeper analysis.
Explain complex SQL queries in plain English with Mermaid data flow diagrams, performance annotations, and anti-pattern detection. Use when the user pastes a SQL query and asks "what does this do?", "explain this query", or needs to understand inherited SQL, CTEs, window functions, recursive queries, or dbt model…
Calculate standard business metrics: retention, LTV, CAC, churn, conversion funnels, growth rates, MRR, NRR, DAU/MAU. Use when the user asks for a specific KPI definition, needs a retention curve, LTV calculation, funnel analysis, or growth rate computation. Provides both SQL templates and Python implementations.
Compare two metric definitions that should produce the same number and find exactly where they disagree. Use when the user says "these numbers don't match", "why do two dashboards show different results", or when migrating metric logic and validating the new query against the old one.
Generate structured analytics reports with metrics, trends, and visualizations. Use when the user asks for a business review, monthly report, executive summary, deep dive, incident postmortem, or any deliverable that combines data, charts, and narrative for stakeholders.
Analyze and optimize slow SQL queries. Use when the user says a query is slow, asks to optimize or speed up SQL, wants to find anti-patterns, needs index recommendations, or asks for a query rewrite. Also use when EXPLAIN output shows full table scans or poor join strategies.
4-phase structured debugging with a 3-strike escalation rule. Use when a query fails, a pipeline breaks, results look wrong, a dbt model errors, or any analytical code produces unexpected output. Prevents cargo-cult debugging by enforcing reproduce → analyze → fix → verify in strict order.
Generate recurring weekly or monthly analytics reports with period-over-period comparison, anomaly detection, and executive summaries. Use when the user asks for a weekly report, monthly KPI review, recurring metrics snapshot, or needs automated period-over-period diffing. Saves templates for one-command re-runs.