{"title":"Write a SQL Query","description":"Compose a correct, efficient SQL query from a question.","tags":["sql","query"],"content":"Write a SQL query to answer: {{question}}\n\nSchema:\n{{schema}}\n\nRequirements:\n- Correct first: make sure joins and grouping answer the exact question.\n- Avoid common traps: fan-out from one-to-many joins, NULL handling, double counting.\n- Note which columns should be indexed for this to run well.\n- Briefly explain what the query does so I can verify the logic.","variables":[{"name":"question","description":"The question to answer","required":true},{"name":"schema","description":"Relevant tables and columns","required":true}]}
{"title":"Optimize a Slow Query","description":"Diagnose and speed up a slow SQL query.","tags":["sql","performance","indexing"],"content":"This query is slow:\n\n```\n{{query}}\n```\n\nDiagnose it: what would the query plan likely show, and where's the cost (full scans, missing indexes, bad join order, sorting, functions on indexed columns)? Propose specific fixes — indexes, rewrites, or schema changes — and predict their effect. Tell me what to measure with EXPLAIN before and after.","variables":[{"name":"query","description":"The slow query","required":true}]}
{"title":"Exploratory Data Analysis Plan","description":"Plan a first pass over an unfamiliar dataset.","tags":["eda","exploration","statistics"],"content":"I have a dataset and want to understand it: {{dataset}}\n\nGive me an EDA plan: what to check first (shape, types, missingness, duplicates), the distributions and relationships worth plotting, the data-quality red flags to watch for, and the questions this data can and cannot answer. Prioritize the checks that most often reveal problems before they bite. Suggest concrete code if I tell you the tool.","variables":[{"name":"dataset","description":"What the dataset contains","required":true}]}
{"title":"Clean and Validate Data","description":"Design a cleaning pipeline for messy data.","tags":["data-cleaning","validation","etl"],"content":"Help me clean this data: {{data_description}}\n\nIdentify the cleaning steps in order: handle missing values (and justify drop vs. impute), fix types and formats, deduplicate, normalize categories, and catch outliers. For each step, state the rule and what could go wrong if applied blindly. Build in validation checks that fail loudly when the data violates expected invariants.","variables":[{"name":"data_description","description":"The shape and problems of the data","required":true}]}
{"title":"Interpret Results Honestly","description":"Draw careful, caveated conclusions from an analysis.","tags":["interpretation","statistics","rigor"],"content":"Here are my analysis results: {{results}}\n\nHelp me interpret them honestly. What can I legitimately conclude, and what would be over-reaching? Check for: confounders, correlation-vs-causation, sample-size/selection issues, multiple-comparison risk, and practical vs. statistical significance. Tell me the caveats I should state alongside any headline finding, and what follow-up would strengthen the conclusion.","variables":[{"name":"results","description":"The results to interpret","required":true,"multiline":true}]}
{"title":"Design a Metric","description":"Define a metric that actually measures what you care about.","tags":["metrics","kpi","measurement"],"content":"I want to measure: {{goal}}\n\nHelp me design a good metric. Propose the precise definition (numerator, denominator, window, segment), explain what behavior it would drive, and stress-test it: how could it be gamed or give a misleading signal? Suggest a guardrail metric to pair with it. Prefer a metric that's slightly harder to compute but honest over an easy one that lies.","variables":[{"name":"goal","description":"What you're trying to measure","required":true}]}
{"title":"Build a Data Pipeline","description":"Design an ETL/ELT pipeline that's reliable and observable.","tags":["pipeline","etl","data-engineering"],"content":"Design a data pipeline for: {{requirement}}\n\nCover: the stages (extract, transform, load), how you handle late/duplicate/malformed records, idempotency and re-runs, schema evolution, and how you'd know it broke (data-quality checks and alerting). Choose batch vs. streaming and justify it. Call out the step most likely to silently corrupt data and how you'd guard it.","variables":[{"name":"requirement","description":"What the pipeline must do","required":true}]}
{"title":"Explain a Dataset Column","description":"Reason about what a field means and how to use it.","tags":["data-dictionary","semantics"],"content":"Help me understand this data field: {{field}}\n\nIn the context of: {{context}}\n\nReason about: what it likely represents, its probable type and valid range, how nulls/zeros/sentinels should be interpreted, and the traps in using it (e.g. it's a snapshot vs. cumulative, timezone-dependent, or changed meaning over time). List the checks I should run to confirm my understanding before relying on it.","variables":[{"name":"field","description":"The column/field name and any sample values","required":true},{"name":"context","description":"What the dataset is about","required":true}]}
{"title":"Clean a Messy Dataset","description":"Plan the cleaning a dataset needs before analysis.","tags":["cleaning","data-quality"],"content":"Here's a description of my dataset: {{dataset}}\n\nWalk me through cleaning it. Identify likely problems: missing values, duplicates, inconsistent units or formats, outliers, and encoding issues. For each, the detection check and the decision to make (drop, impute, flag) with its bias risk. Insist I record every transformation so the cleaning is reproducible. Tell me which problems would most distort my eventual conclusion.","variables":[{"name":"dataset","description":"What the data looks like","required":true}]}
{"title":"Choose the Right Chart","description":"Pick a visualization that fits the data and message.","tags":["visualization","charts"],"content":"I want to show: {{message}} from data that looks like {{data}}\n\nRecommend the chart type that makes that message obvious, and say why the obvious alternatives are worse here. Cover the encoding (what maps to position, length, color), the axis and scale choices, and the one way this chart could mislead. Keep it honest: no dual axes or truncated baselines that distort. Suggest the single annotation that would make the takeaway unmissable.","variables":[{"name":"message","description":"What you want to show","required":true},{"name":"data","description":"Shape of the data","required":true}]}
{"title":"Interpret a Statistical Result","description":"Understand what a result does and doesn't say.","tags":["statistics","interpretation"],"content":"Help me interpret this result: {{result}}\n\nExplain what it actually means in plain terms, and just as importantly what it does NOT mean. Cover effect size versus statistical significance, the confidence interval, the assumptions behind the test, and whether the sample supports the claim. Flag the over-interpretation someone would naturally make. Tell me what I'd need to be more confident.","variables":[{"name":"result","description":"The statistical result","required":true}]}
{"title":"Build an Analysis Plan","description":"Decide how to answer a question before touching the data.","tags":["analysis","planning"],"content":"I want to answer this question with data: {{question}}\n\nWrite the analysis plan before I start, so I don't fish for a result. Define the metric, the population, the comparison, and what answer each outcome would imply. State the assumptions and the confounders that could fool me. Decide the cuts I'll look at up front. Note what would make the result NOT actionable even if it's significant.","variables":[{"name":"question","description":"The question to answer","required":true}]}
{"title":"Detect Outliers and Anomalies","description":"Find unusual points and decide what to do with them.","tags":["outliers","anomalies"],"content":"Help me handle outliers in: {{dataset}}\n\nFirst, how to detect them appropriately for this data's distribution (a z-score assumes normality; IQR and others don't). Then the harder question: is each outlier an error to fix, a rare-but-real event to keep, or the very thing I should be studying? Decide per case, not blanket-drop. Show how the decision changes the conclusion, and insist I document what I removed and why so the analysis stays honest.","variables":[{"name":"dataset","description":"The data with outliers","required":true}]}
{"title":"Design an A/B Test","description":"Set up an experiment that gives a trustworthy answer.","tags":["ab-test","experiment"],"content":"I want to A/B test: {{change}}\n\nDesign it properly. Define the hypothesis, the primary metric, and the guardrail metrics that catch harm. Work out the sample size and runtime needed to detect a meaningful effect (and what effect size is meaningful). Plan randomization and how to avoid contamination between groups. Decide the stopping rule up front to avoid peeking. Flag the ways this test could mislead — novelty effects, seasonality, and underpowered results read as null.","variables":[{"name":"change","description":"The change to test","required":true}]}
{"title":"Spec a Dashboard","description":"Decide what a dashboard should show before building it.","tags":["dashboard","visualization"],"content":"I need a dashboard for: {{audience_and_goal}}\n\nStart from the decisions it should support, not the data you happen to have. Choose the few metrics that answer the audience's real questions and the chart for each. Decide the layout: what they see first (the headline), what is one level down, and what is noise to leave out. Add the context that makes a number meaningful — targets, trends, comparisons. Flag vanity metrics that look good but drive no decision.","variables":[{"name":"audience_and_goal","description":"Who uses it and to decide what","required":true}]}
{"title":"Explain a Trend","description":"Turn a pattern in the data into a credible explanation.","tags":["trends","interpretation"],"content":"I see this pattern in the data: {{pattern}}\n\nHelp me explain it without fooling myself. List the plausible causes, including the boring ones: a data or tracking change, seasonality, a composition shift (Simpson's paradox), or an external event — before reaching for an exciting story. For each, what to check to confirm or rule it out. Separate what the data can support from speculation. End with the most likely explanation and how confident I should be.","variables":[{"name":"pattern","description":"The trend or pattern observed","required":true}]}
