본문으로 건너뛰기
cccskills
무료GitHub에 공개

analytics-result-qa

Use when you are about to hand off any number, table, chart or analysis someone will act on (a metric query, a dbt mart, a report, an experiment readout) — the pre-delivery checklist for data quality, calculation, reasonableness and presentation, and the pitfalls that produce plausible wrong numbers

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Analytics Result QA

Overview

The dangerous analytics bug is not the query that fails — it is the one that returns a plausible number. A fan-out join, a partial month, a shifted denominator: each produces a result that looks fine and is wrong by 20%. This checklist runs before any number leaves your run, and the checks that can be automated become tests.

Core principle: recompute every headline number a second way, and turn every check you did by hand into a test or a dbt test that keeps doing it.

1. Before computing: the question and the definitions

  • Is the analysis answering the question asked, for the population asked? Write the population definition down (who is in, who is excluded and why).
  • Is each metric defined the way the people who will read it define it ("active", "churned", "revenue" net or gross)? Where the task is silent, record your definition in the closing message.
  • Are the comparison periods and cohorts comparable — same length, same definition, both complete?

2. Pre-delivery checklist

Data quality

  • The source tables are the right ones, and you know their as-of date.
  • No unexpected gaps in the time range or missing segments.
  • Null rates in the columns you use are known and handled on purpose.
  • No double counting from duplicate source rows or a join.
  • Every filter is intentional; none silently drops a segment.

Calculation

  • Aggregation grain matches the question; every non-aggregated column is in the GROUP BY.
  • Rates use the right denominator, and the denominator cannot be zero.
  • Compared periods have the same length; partial periods are excluded or labelled.
  • Join types are right (INNER vs LEFT) and row counts were checked before and after each join.
  • Parts sum to the whole, or the difference is explained (overlap, unknown bucket).

Reasonableness

  • Magnitudes are plausible (no negative revenue, rates within 0–100%).
  • No unexplained jumps in a time series.
  • Headline numbers match a known reference (an existing dashboard, finance figures, a previous report) or the gap is explained.
  • Edge cases behave: an empty segment, a zero-activity period, a brand-new entity.

Presentation

  • Bar charts start at zero; axes are labelled; panels share scales where compared.
  • Precision matches the evidence; units and currencies are explicit.
  • Titles state the date range; caveats and assumptions are written down.
  • Someone else can reproduce it from the code in the diff.

3. Pitfalls that produce plausible wrong numbers

PitfallHow it happensDetect / prevent
Join fan-outone-to-many join before aggregatingrow counts before and after; aggregate before joining; count(distinct key)
Survivorshiponly entities that still exist are analysedask who is missing (churned, deleted, failed)
Incomplete periodcurrent month compared with a full onecomplete periods only, or same-number-of-days comparisons
Denominator shiftthe definition of "eligible" changed between periodsone definition across compared periods; note any change
Average of averagespre-aggregated means averaged across unequal groupsaggregate from rows or weight by group size
Timezone mismatchUTC events bucketed against local-time daysconvert to one timezone before truncating; state it
Selection by outcomesegment defined by the result being measuredsegment on pre-treatment attributes
Look-aheada later fact used to explain an earlier eventas-of joins; only information available at the time
Simpson's paradoxmix shift reverses the trend in the aggregatecheck the key segments

4. Recompute it another way

  1. Compute the headline number by a second route (from a different table, bottom-up vs top-down, SQL vs pandas) and compare.
  2. Trace three individual entities by hand through every step.
  3. Reverse-check: per-unit value × count ≈ total.
  4. Boundary slices: one day, one customer, one category — do the micro-results make sense?

5. Red-flag values

  • A metric moved more than ~50% period over period with no known cause.
  • Exact round numbers, or rates of exactly 0% or 100%.
  • Identical values across periods or segments (a dimension is being ignored).
  • A result that confirms the hypothesis perfectly.

Each one is investigated before delivery, not footnoted after.

6. Make the checks permanent

Manual checkPermanent form
Key is unique after the joindbt unique test / merge(validate="many_to_one")
Parts sum to the totala singular dbt test or a pytest assertion on the fixture
Rate within 0–1dbt accepted_range (if dbt_utils is installed) or a pandera Field(ge=0, le=1)
Matches the finance figure within 1%a reconciliation test against a fixture, or a monitored check in the pipeline

7. Your verdict, in the closing message

State one of:

  • Ready — checks passed, numbers reconciled, caveats noted.
  • Ready with caveats — correct, but the reader must know: list each caveat (partial period, excluded segment, definition choice).
  • Not ready — a check failed that you could not resolve in this run: what failed and what it would take; that is also a card comment for a person (concise-board-comments).

Include the reconciliation you did ("total revenue 1.284M matches the finance export within 0.3%").

Common Mistakes

  • Trusting a number because the query ran without error.
  • Checking the total but not the segments that sum to it.
  • Comparing this partial month with last full month.
  • Leaving the reconciliation in your head instead of in a test.

Red Flags

  • No reference figure anywhere to compare the headline number with.
  • select distinct used to make counts "look right".
  • A definition decided silently in SQL that the reader will interpret differently.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 18일 업데이트

Use when the diff adds or changes an endpoint, resolver, RPC, job or query that takes an object id, a role check, a request binding or a tenant filter - BOLA/IDOR, function-level authorization, mass assignment and tenant scoping

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 18일 업데이트

Use on every UI change - semantic HTML, labels for controls, keyboard-navigable dialogs/menus, visible focus, and never color as the only signal

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 18일 업데이트

Use when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 18일 업데이트

How to work a task returned with review, QA or UAT findings. Use when a task is in need_revision or PR review comments are in your context.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 18일 업데이트

Use when the repository keeps its alerting in code, or a person asks for alerts outside TaskTrooper - PrometheusRule YAML, a Cloud Monitoring alert policy in Terraform, a Datadog monitor, each routed to TaskTrooper's alert ingest URL so it opens an incident here

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

makifbaysal/tasktrooper1172026년 10월 18일 업데이트

makifbaysal의 스킬 모두 보기

이 스킬의 문제 신고