Decision-first data analysis with statistical rigor gates.
npx skills add https://github.com/notque/vexjoy-agent --skill data-analysis
Every analysis begins with the decision being supported, works backward to the evidence required, and only then touches the data. This prevents the common failure mode where analysis produces impressive summaries that answer the wrong question. Analysis without a decision is just arithmetic.
| Signal | Load These Files | Why |
|---|---|---|
| extended pattern catalog: methodology, statistical, communication, process fixes | preferred-patterns.md | Loads detailed guidance from preferred-patterns.md. |
| writing analysis scripts: tool detection and metric computation code | compute-examples.md | Loads detailed guidance from compute-examples.md. |
| errors, error handling | error-handling.md | Loads detailed guidance from error-handling.md. |
| writing analysis-report.md per analysis type (A/B, trend, distribution) | output-templates.md | Loads detailed guidance from output-templates.md. |
| applying Phase 4 statistical gates: adequacy, fairness, correction, significance | rigor-gates.md | Loads detailed guidance from rigor-gates.md. |
| end-to-end phase walkthroughs on realistic inputs | worked-examples.md | Loads detailed guidance from worked-examples.md. |
Goal: Establish what decision this analysis supports and what evidence would change it.
Starting with data before establishing the decision context is the single most common analytical failure. The analyst finds interesting patterns and presents them, but the decision-maker cannot act because the patterns do not map to their options. Complete framing even when the user says they "just want numbers" -- numbers without decision context are not actionable.
Step 1: Identify the decision
If the user does not articulate a decision, ask: "What will you do differently based on this analysis?" If the answer is "nothing" or "I just want to see the data," switch to Exploratory Mode and label all output as exploratory. Exploratory Mode still applies rigor gates but makes no causal claims.
Step 2: Define evidence requirements
Step 3: Save the frame artifact
Save analysis-frame.md using the template from references/output-templates.md (Phase Artifact Templates § analysis-frame.md).
GATE: Decision identified, options enumerated, evidence requirements written to file. If the user cannot articulate a decision, explicitly switch to Exploratory Mode and document this in the frame. Proceed only when gate passes.
Goal: Define exactly what will be measured, how, and over what population. Write definitions to file before any data is loaded.
Defining metrics after seeing data enables (consciously or not) choosing definitions that produce favorable results. Locking definitions first makes the analysis auditable. Verify every metric definition is exact -- a slight change in numerator or denominator can flip a conclusion.
Step 1: Define metrics
For each metric:
Step 2: Define comparison groups (if applicable)
For each comparison:
Step 3: Define success criteria
Step 4: Save definitions artifact
Save metric-definitions.md using the template from references/output-templates.md (Phase Artifact Templates § metric-definitions.md).
GATE: All metrics defined with formulas and populations. Definitions saved to file. If this is a comparison analysis, fairness checks documented. Proceed only when gate passes.
Immutability rule: Once Phase 3 begins, these definitions are locked. If the data reveals that a definition is unworkable, return to Phase 2, update the definition, and document the change and its reason in the artifact. Document every adjustment -- silent definition changes are p-hacking by another name.
Goal: Load the data, profile its quality, and determine whether it is adequate for the planned analysis. Keep interpretation out of this phase.
Combining loading and interpretation causes confirmation bias. Extracting first forces you to confront data quality issues (missing values, unexpected distributions, date gaps) before they silently distort your conclusions.
Step 1: Detect available tools
See references/compute-examples.md for tool detection code. If pandas is unavailable, fall back to csv.DictReader + statistics module.
Step 2: Load and inspect data
Profile the dataset:
Step 3: Assess data quality
Apply the Sample Adequacy gate (see references/rigor-gates.md Gate 1). Check actual numbers against these minimums:
| Check | Minimum | Action if Failed |
|-------|---------|------------------|
| Row count vs. population | Report sample fraction | State "N of M" and warn if <5% coverage |
| Time window completeness | No gaps >10% of window | Identify gaps, adjust window or note limitation |
| Segment minimums | 30+ observations per segment | Merge small segments or exclude with disclosure |
| Missing value rate | <20% per critical column | Impute with disclosure or exclude column |
Step 4: Save quality report
Save data-quality-report.md using the template from references/output-templates.md (Phase Artifact Templates § data-quality-report.md).
GATE: Data loaded, quality report saved, all four adequacy checks assessed. If data quality fails, document which analyses are affected and whether remediation is possible. Proceed only when gate passes or failures are documented as limitations.
Goal: Compute metrics per the locked definitions from Phase 2, applying statistical rigor gates at every step. Report confidence intervals, not point estimates -- "3-7% lift" is useful; "5% lift" is misleading because it implies false precision.
Step 1: Compute primary metrics
Calculate each metric defined in Phase 2 using the exact formula specified. See references/compute-examples.md for stdlib and pandas computation patterns including Wilson score confidence intervals.
Step 2: Apply Comparison Fairness gate (if comparing groups)
Before interpreting any group comparison, verify (see references/rigor-gates.md Gate 2):
Step 3: Apply Multiple Testing Correction (if testing multiple hypotheses)
See references/rigor-gates.md Gate 3 and references/compute-examples.md for the correction table. Report all segments tested -- if you test 10 segments, one will likely show significance by chance.
Step 4: Apply Practical Significance gate
See references/rigor-gates.md Gate 4:
Step 5: Save analysis results
Save analysis-results.md using the template from references/output-templates.md (Phase Artifact Templates § analysis-results.md).
GATE: All defined metrics computed. Rigor gates applied and results documented. Violations either remediated or recorded as limitations. Proceed only when gate passes.
Goal: Translate analytical results into a decision-oriented report. Lead with what the data says about the decision, not how you computed it -- the decision-maker reads Phase 5; the auditor reads Phases 2-4. Methodology belongs in the appendix.
Step 1: State the headline finding
One sentence that directly addresses the decision from Phase 1:
Step 2: Present supporting evidence
Summarize the key metrics that support the headline, in order of importance:
Step 3: State limitations explicitly
If confidence intervals are wide, that IS the finding (the data is insufficient to support a decision), not a formatting problem to hide by reporting only the point estimate.
Step 4: Return to the decision
Explicitly map findings back to the decision frame:
Step 5: Save final report
Save analysis-report.md using the template from references/output-templates.md (Phase Artifact Templates § analysis-report.md).
GATE: Report saved with headline finding, limitations, and explicit recommendation tied back to the decision. All artifact files referenced. Analysis complete.
| Signal | Load |
|--------|------|
| Phase 3 or 4 -- computing metrics, applying gates | references/rigor-gates.md |
| Phase 3 or 4 -- Python code for tool detection, CI computation | references/compute-examples.md |
| Any phase -- saving an artifact file | references/output-templates.md |
| Working examples of the full 5-phase flow | references/worked-examples.md |
| Data parse failure, segment size issue, definition revision | references/error-handling.md |
| Failure mode recognition (p-hacking, survivorship bias, etc.) | references/preferred-patterns.md |
references/rigor-gates.md - Detailed statistical gate documentation with examplesreferences/output-templates.md - Phase artifact templates and analysis type templates (A/B test, trend, distribution, cohort)references/compute-examples.md - Python computation patterns for extraction and analysisreferences/worked-examples.md - Three end-to-end examples (A/B test, trend, distribution)references/error-handling.md - Error recovery procedures and blocker criteriareferences/preferred-patterns.md - Extended pattern catalog with code examplesComprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
UMAP dimensionality reduction. Fast nonlinear manifold learning for 2D/3D visualization, clustering preprocessing (HDBSCAN), supervised/parametric UMAP, for high-dimensional data.
Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.
Access AlphaFold 200M+ AI-predicted protein structures. Retrieve structures by UniProt ID, download PDB/mmCIF files, analyze confidence metrics (pLDDT, PAE), for drug discovery and structural biology.
Take notque/data-analysis from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.