data-validation
QA an analysis before sharing with stakeholders — methodology checks, accuracy verification, and bias detection. Use when reviewing an analysis for errors, checking for survivorship bias, validating aggregation logic, or preparing documentation for reproducibility.
What this skill does
# Data Validation Skill Pre-delivery QA checklist, common data analysis pitfalls, result sanity checking, and documentation standards for reproducibility. ## Pre-Delivery QA Checklist Run through this checklist before sharing any analysis with stakeholders. ### Data Quality Checks - [ ] **Source verification**: Confirmed which tables/data sources were used. Are they the right ones for this question? - [ ] **Freshness**: Data is current enough for the analysis. Noted the "as of" date. - [ ] **Completeness**: No unexpected gaps in time series or missing segments. - [ ] **Null handling**: Checked null rates in key columns. Nulls are handled appropriately (excluded, imputed, or flagged). - [ ] **Deduplication**: Confirmed no double-counting from bad joins or duplicate source records. - [ ] **Filter verification**: All WHERE clauses and filters are correct. No unintended exclusions. ### Calculation Checks - [ ] **Aggregation logic**: GROUP BY includes all non-aggregated columns. Aggregation level matches the analysis grain. - [ ] **Denominator correctness**: Rate and percentage calculations use the right denominator. Denominators are non-zero. - [ ] **Date alignment**: Comparisons use the same time period length. Partial periods are excluded or noted. - [ ] **Join correctness**: JOIN types are appropriate (INNER vs LEFT). Many-to-many joins haven't inflated counts. - [ ] **Metric definitions**: Metrics match how stakeholders define them. Any deviations are noted. - [ ] **Subtotals sum**: Parts add up to the whole where expected. If they don't, explain why (e.g., overlap). ### Reasonableness Checks - [ ] **Magnitude**: Numbers are in a plausible range. Revenue isn't negative. Percentages are between 0-100%. - [ ] **Trend continuity**: No unexplained jumps or drops in time series. - [ ] **Cross-reference**: Key numbers match other known sources (dashboards, previous reports, finance data). - [ ] **Order of magnitude**: Total revenue is in the right ballpark. User counts match known figures. - [ ] **Edge cases**: What happens at the boundaries? Empty segments, zero-activity periods, new entities. ### Presentation Checks - [ ] **Chart accuracy**: Bar charts start at zero. Axes are labeled. Scales are consistent across panels. - [ ] **Number formatting**: Appropriate precision. Consistent currency/percentage formatting. Thousands separators where needed. - [ ] **Title clarity**: Titles state the insight, not just the metric. Date ranges are specified. - [ ] **Caveat transparency**: Known limitations and assumptions are stated explicitly. - [ ] **Reproducibility**: Someone else could recreate this analysis from the documentation provided. ## Common Data Analysis Pitfalls ### Join Explosion **The problem**: A many-to-many join silently multiplies rows, inflating counts and sums. **How to detect**: ```sql -- Check row count before and after join SELECT COUNT(*) FROM table_a; -- 1,000 SELECT COUNT(*) FROM table_a a JOIN table_b b ON a.id = b.a_id; -- 3,500 (uh oh) ``` **How to prevent**: - Always check row counts after joins - If counts increase, investigate the join relationship (is it really 1:1 or 1:many?) - Use `COUNT(DISTINCT a.id)` instead of `COUNT(*)` when counting entities through joins ### Survivorship Bias **The problem**: Analyzing only entities that exist today, ignoring those that were deleted, churned, or failed. **Examples**: - Analyzing user behavior of "current users" misses churned users - Looking at "companies using our product" ignores those who evaluated and left - Studying properties of "successful" outcomes without "unsuccessful" ones **How to prevent**: Ask "who is NOT in this dataset?" before drawing conclusions. ### Incomplete Period Comparison **The problem**: Comparing a partial period to a full period. **Examples**: - "January revenue is $500K vs. December's $800K" -- but January isn't over yet - "This week's signups are down" -- checked on Wednesday, comparing to a full prior week **How to prevent**: Always filter to complete periods, or compare same-day-of-month / same-number-of-days. ### Denominator Shifting **The problem**: The denominator changes between periods, making rates incomparable. **Examples**: - Conversion rate improves because you changed how you count "eligible" users - Churn rate changes because the definition of "active" was updated **How to prevent**: Use consistent definitions across all compared periods. Note any definition changes. ### Average of Averages **The problem**: Averaging pre-computed averages gives wrong results when group sizes differ. **Example**: - Group A: 100 users, average revenue $50 - Group B: 10 users, average revenue $200 - Wrong: Average of averages = ($50 + $200) / 2 = $125 - Right: Weighted average = (100*$50 + 10*$200) / 110 = $63.64 **How to prevent**: Always aggregate from raw data. Never average pre-aggregated averages. ### Timezone Mismatches **The problem**: Different data sources use different timezones, causing misalignment. **Examples**: - Event timestamps in UTC vs. user-facing dates in local time - Daily rollups that use different cutoff times **How to prevent**: Standardize all timestamps to a single timezone (UTC recommended) before analysis. Document the timezone used. ### Selection Bias in Segmentation **The problem**: Segments are defined by the outcome you're measuring, creating circular logic. **Examples**: - "Users who completed onboarding have higher retention" -- obviously, they self-selected - "Power users generate more revenue" -- they became power users BY generating revenue **How to prevent**: Define segments based on pre-treatment characteristics, not outcomes. ## Result Sanity Checking ### Magnitude Checks For any key number in your analysis, verify it passes the "smell test": | Metric Type | Sanity Check | |---|---| | User counts | Does this match known MAU/DAU figures? | | Revenue | Is this in the right order of magnitude vs. known ARR? | | Conversion rates | Is this between 0% and 100%? Does it match dashboard figures? | | Growth rates | Is 50%+ MoM growth realistic, or is there a data issue? | | Averages | Is the average reasonable given what you know about the distribution? | | Percentages | Do segment percentages sum to ~100%? | ### Cross-Validation Techniques 1. **Calculate the same metric two different ways** and verify they match 2. **Spot-check individual records** -- pick a few specific entities and trace their data manually 3. **Compare to known benchmarks** -- match against published dashboards, finance reports, or prior analyses 4. **Reverse engineer** -- if total revenue is X, does per-user revenue times user count approximately equal X? 5. **Boundary checks** -- what happens when you filter to a single day, a single user, or a single category? Are those micro-results sensible? ### Red Flags That Warrant Investigation - Any metric that changed by more than 50% period-over-period without an obvious cause - Counts or sums that are exact round numbers (suggests a filter or default value issue) - Rates exactly at 0% or 100% (may indicate incomplete data) - Results that perfectly confirm the hypothesis (reality is usually messier) - Identical values across time periods or segments (suggests the query is ignoring a dimension) ## Documentation Standards for Reproducibility ### Analysis Documentation Template Every non-trivial analysis should include: ```markdown ## Analysis: [Title] ### Question [The specific question being answered] ### Data Sources - Table: [schema.table_name] (as of [date]) - Table: [schema.other_table] (as of [date]) - File: [filename] (source: [where it came from]) ### Definitions - [Metric A]: [Exactly how it's calculated] - [Segment X]: [Exactly how membership is determined] - [Time period]: [Start date] to [end date], [timezone] ### Methodology 1. [Step 1 of the analysis approach] 2. [Step 2] 3. [Step 3] ### Assumptions and Limitations - [Assumption 1 and why it's reas
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.