sql-to-insights
Turns SQL query results into a decision-ready business narrative - headline finding, drivers, recommendation - plus the right chart choice for the data shape. Use when someone asks "what does this data actually mean", "summarize these query results for the exec team", "what chart should I use for this", or pastes a result set and wants the so-what for a non-technical audience. Do NOT use to diagnose or speed up the query itself - use sql-query-optimizer instead; do NOT use to build a full multi-part narrative presentation around an analysis - use data-story instead; do NOT use for open-ended exploration of an unfamiliar dataset - use eda-playbook instead.
- License 许可
- MIT
- 最近更新
- 2026-10-14
- Stars
- ★ 25
- Forks
- 3
01 前言 Front Matter
- name
- sql-to-insights
- metadata
- { "title": "SQL to Insights" }
- description
- Turns SQL query results into a decision-ready business narrative - headline finding, drivers, recommendation - plus the right chart choice for the data shape. Use when someone asks "what does this data actually mean", "summarize these query results for the exec team", "what chart should I use for this", or pastes a result set and wants the so-what for a non-technical audience. Do NOT use to diagnose or speed up the query itself - use sql-query-optimizer instead; do NOT use to build a full multi-part narrative presentation around an analysis - use data-story instead; do NOT use for open-ended exploration of an unfamiliar dataset - use eda-playbook instead.
03 SKILL.md 正文
SQL to Insights
Turn rows and columns into something a decision-maker can act on. The costly failure mode is a "summary" that restates the numbers the stakeholder can already see, buries the one finding that matters under six that do not, or implies causation the data cannot support - all of which erode trust in every future readout.
Operating procedure
Work the steps in order: the decision question must be stated before interpretation, and the honesty screens must run before the narrative is written, because a caveat discovered after the headline ships is a retraction.
Step 1: Gather inputs
Collect these before interpreting anything. Label anything assumed as a guess.
- The result set (and ideally the query), including row count and date range.
- The audience: exec, functional lead, or analyst peer. Default: business stakeholder with no SQL.
- The decision this data informs. If the requester cannot name one, propose the most likely one and label it a guess.
- The comparison baseline: prior period, budget/target, cohort, or benchmark. A number with no baseline is not a finding. Default: prior period.
- Known data caveats: incomplete current period, recent tracking changes, backfills.
Step 2: State the question behind the query
Write one sentence: "This data informs the decision to X." Everything in the narrative must serve that sentence; cut anything that does not.
Step 3: Read the result, not just the schema
Identify three things: the headline number, the trend or comparison that gives it meaning, and the outliers or concentrations driving it. Compute the drivers, do not eyeball them: rank segments by contribution to the change, not by size.
Step 4: Run the honesty screens
Apply these thresholds before writing a word:
- Sample size: call out any segment with n < 30, or any percentage computed on a base under ~100 - a 40% change on 12 events is noise until proven otherwise.
- Concentration: if the top 3 accounts/segments/SKUs explain more than half of a change, say "concentrated and fragile" explicitly; it changes the recommendation.
- Data quality: a single-period spike more than ~3x the trailing average, exact duplicates, or suspiciously round numbers are more likely pipeline artifacts than real changes. Flag as "verify before acting."
- Noise floor: do not narrate a movement smaller than the metric's normal period-to-period wobble; call it flat.
- Causation: never claim causation from a correlation; write "associated with" and name what evidence would be needed to establish cause.
- Fit: if the query cannot answer the stated question, say so and specify the query that would.
Step 5: Write the narrative
Use this structure, in this order:
- Headline (1 sentence, bolded): the single most important finding, with the number in it.
- Context (1-2 sentences): the trend or comparison that makes it meaningful.
- Drivers (bullets): what is pushing the number - segments, periods, outliers - ranked by contribution.
- Recommendation (1-2 sentences): what to do or look at next, tied to the decision from Step 2.
Step 6: Recommend the visualization
Match chart to intent:
- Trend over time → line chart.
- Part-to-whole → stacked bar or, sparingly, a single donut.
- Comparison across categories → horizontal bar, sorted by value.
- Correlation → scatter.
- Distribution → histogram or box plot.
- Single KPI vs target → big number with a delta.
Avoid: 3D charts, dual axes unless truly unavoidable, pie charts with more than 4 slices.
Worked example
Bad: "Revenue was $1.24M in June versus $1.05M in May, an 18% increase. Enterprise revenue was $610K, self-serve was $420K, and mid-market was $210K. The number of accounts was 342."
That is a restatement: no baseline meaning, no drivers ranked, no fragility flag, no action.
Good:
Revenue grew 18% MoM, driven almost entirely by the Enterprise tier. Self-serve was flat. Three accounts explain 60% of the lift, so the growth is concentrated and fragile. Recommend a chart of revenue-by-tier over the last 6 months, and a watchlist for those three accounts.
Deliverable
Produce a narrative block (headline, context, drivers, recommendation) sized for the audience, one visualization recommendation with the chart type and axes named, and an explicit caveat line listing any honesty-screen flags (sample size, concentration, data-quality suspicion). If the data cannot answer the question, the deliverable is the corrected question and the query that would answer it.
Do NOT
- Do NOT lead with methodology or the query; the stakeholder reads the first sentence and maybe the second.
- Do NOT average averages or report percentages without their denominators - both silently misweight segments.
- Do NOT present a spike as a finding before ruling out the data-quality explanations in Step 4.
- Do NOT recommend a chart by habit; a KPI-vs-target result needs a big number with a delta, not a line chart.
- Do NOT soften a bad number with hedging; state it plainly and put the judgment in the recommendation.
Quality bar
A finished readout passes only when: the headline contains the number and would survive being the only sentence read; every driver bullet is ranked by contribution with its share stated; every honesty screen was run and every triggered flag appears in the output; the recommendation names a specific next action or next query, not "monitor closely"; and nothing in the narrative merely restates a cell the reader can see in the table.
04 同仓库更多 Skills
zone-2-cardio-plan
Use when someone asks to build a steady-state cardio plan, train an aerobic base or Zone 2, structure easy or endurance weekly cardio, train by heart-rate zones, or improve resting heart rate, VO2, or endurance. Builds a heart-rate-zone aerobic training block with session structure, modality choice, and progression. General fitness guidance, not medical advice. Do NOT use to design a strength or lifting program (use Strength Training Plan), high-intensity interval conditioning, HIIT, or circuits (use Conditioning & HIIT Program), or a mobility/flexibility routine (use Mobility Routine).
youtube-script-writer
Writes retention-engineered long-form YouTube scripts on a hook/body/payoff architecture - a first-30-seconds hook that survives the retention cliff, a beat-sheet body with mini-hooks and bridges, timed pattern interrupts, and a payoff that over-delivers - with B-roll and editing cues marked inline. Use when someone says "script my next video", "my retention graph dies at the start", "tighten this draft", or "outline a video on X". Do NOT use for the 3-second opener of TikTok, Reels, or Shorts - use video-hook-writer instead; do NOT use for spoken voiceover synced to on-screen tutorial actions - use narration-script instead; do NOT use for a sales demo built on a buyer's discovery notes - use demo-script instead; do NOT use to design the thumbnail and title - use thumbnail-concept instead.
win-back-campaign
Designs segmented win-back email sequences for dormant users - dormancy tiers, a three-beat sequence with a single proportional incentive, and a suppression rule - and measures success by re-activation, not opens. Use when someone says "our users went quiet", "design a win-back campaign", "how do I re-engage lapsed customers", "should we email people who haven't logged in for months", or lifecycle messaging has stopped landing with a lapsed segment. Do NOT use for recovering an unfinished checkout - use abandoned-cart-sequence instead. Do NOT use for diagnosing and fixing why active customers cancel - use churn-reduction instead. Do NOT use for building always-on onboarding or nurture flows - use email-drip-builder instead.
wikipedia-style
Writes neutral, verifiable, encyclopedic prose following Wikipedia's core content policies and manual of style - NPOV, inline citations, notability-backed claims, and a strict ban on promotional language. Use when someone asks "write this like a Wikipedia article", "draft a Wikipedia page for this company or person", "make this neutral and encyclopedic", or "why does my article draft keep getting rejected". Do NOT use for persuasive or opinion writing - use op-ed-writer instead; for thesis-driven academic papers, use academic-essay; for verifying claims in existing text, use fact-checker.
whitepapers
Structures and writes authoritative B2B whitepapers - a standalone executive summary, a data-sized problem statement, methodology, evidence-driven findings, recommendations, and a soft call to action - flagging every claim that needs a real citation. Use when a marketer asks "write a whitepaper on this topic", "turn our research into a lead-gen asset", "make this credible enough for executives", or a draft reads like a product pitch instead of analysis. Do NOT use for customer-story-driven proof - use case-study-builder instead; for policy audiences, use policy-brief.
white-space-analysis
Finds unmet market gaps by ranking jobs-to-be-done on importance versus satisfaction, overlaying them against current solutions and workarounds, and validating that each gap is real, winnable, and worth winning. Use when someone asks "where are the gaps in this market", "what's underserved here", "where should we play next", or is hunting for product, feature, or market-entry opportunities. Do NOT use for profiling competitors and building battle cards - use competitive-intelligence instead; for putting a dollar figure on an identified opportunity - use market-sizing instead; for extracting jobs-to-be-done from raw customer interviews - use jtbd-extractor instead.