How to install data-analysis
npx skills add https://github.com/lingzhi227/agent-research-skills --skill data-analysisFull instructions (SKILL.md)
Source of truth, from lingzhi227/agent-research-skills.
name: data-analysis description: Generate statistical analysis code with 4-round review. Select appropriate statistical tests, interpret results, and produce analysis reports with p-values, effect sizes, and confidence intervals. Use when analyzing experimental data for a paper. argument-hint: [data-source]
Data Analysis
Generate rigorous statistical analysis code with multi-round review.
Input
$0— Data source (CSV, JSON, pickle, or experiment logs)$1— Research goal or hypothesis to test
References
- 4-round code review prompts:
~/.claude/skills/data-analysis/references/review-prompts.md
Scripts
Statistical summary and comparison
python ~/.claude/skills/data-analysis/scripts/stat_summary.py --input results.csv --compare method --metric accuracy --output summary.json
python ~/.claude/skills/data-analysis/scripts/stat_summary.py --input results.csv --describe
Detects data types, recommends tests, runs comparisons, outputs effect sizes and significance stars. Requires numpy, scipy.
Format p-values
python ~/.claude/skills/data-analysis/scripts/format_pvalue.py --values "0.001 0.05 0.23" --format stars
python ~/.claude/skills/data-analysis/scripts/format_pvalue.py --csv results.csv --column pvalue --format latex
Formats p-values with stars, LaTeX notation, or plain text. Stdlib-only.
Workflow
Step 1: Generate Analysis Code
Structure the code with these sections:
# IMPORT— pandas, numpy, scipy, statsmodels, sklearn# LOAD DATA— Load from original data files# DATASET PREPARATIONS— Missing values, units, exclusion criteria# DESCRIPTIVE STATISTICS— Summary tables if needed# PREPROCESSING— Dummy variables, normalization# ANALYSIS— Statistical tests per hypothesis# SAVE ADDITIONAL RESULTS— Extra results to pickle
Step 2: 4-Round Code Review
- Round 1 — Code Flaws: Mathematical/statistical errors, wrong calculations, trivial tests
- Round 2 — Data Handling: Missing values, units, preprocessing, test choice
- Round 3 — Per-Table: Sensible values, measures of uncertainty, missing data
- Round 4 — Cross-Table: Completeness, consistency, missing variables
Step 3: Produce Results
- Every nominal value must have uncertainty (CI, STD, or p-value)
- Statistical tests must be appropriate for the data type
- Results must match actual data — never hallucinate
Allowed Packages
pandas, numpy, scipy, statsmodels, sklearn, pickle
Statistical Test Selection
| Data Type | Test |
|---|---|
| Two groups, normal | Independent t-test |
| Two groups, non-normal | Mann-Whitney U |
| Paired samples | Paired t-test / Wilcoxon |
| Multiple groups | ANOVA / Kruskal-Wallis |
| Categorical | Chi-square / Fisher's exact |
| Correlation | Pearson / Spearman |
| Regression | OLS / Logistic / Mixed effects |
Rules
- Always report p-values for statistical tests
- Account for relevant confounding variables
- Use inherent package functionality (e.g.,
formula = "y ~ a * b"for interactions) - Do not manually implement available statistical functions
- Access dataframes using string-based column names, not integer indices
Related Skills
- Upstream: experiment-code, experiment-design
- Downstream: table-generation, figure-generation, backward-traceability
- See also: math-reasoning
Related skills
More from lingzhi227/agent-research-skills and the wider catalog.

deep-research
Conduct systematic academic literature reviews in 6 phases, producing structured notes, a curated paper database, and a synthesized final report. Output is organized by phase for clarity.

excalidraw-skill
Programmatic canvas toolkit for creating, editing, and refining Excalidraw diagrams via MCP tools with real-time canvas sync. Use when an agent needs to (1) draw or lay out diagrams on a live canvas, (2) iteratively refine diagrams using describe_scene and get_canvas_screenshot to see its own work, (3) export/import .excalidraw files or PNG/SVG images, (4) save/restore canvas snapshots, (5) convert Mermaid to Excalidraw, or (6) perform element-level CRUD, alignment, distribution, grouping, duplication, and locking. Requires a running canvas server (EXPRESS_SERVER_URL, default http://localhost:3000).

experiment-code
Write ML experiment code with iterative improvement. Generate training/evaluation pipelines, debug errors, and optimize results through code reflection. Use when implementing experiments for a research paper.

experiment-design
Design experiment plans with progressive stages — initial implementation, baseline tuning, creative research, and ablation studies. Plan baselines, datasets, hyperparameter sweeps, and evaluation metrics. Use when planning experiments for a research paper.

figure-generation
Generate publication-quality scientific figures with matplotlib/seaborn using query expansion, code generation, and VLM visual feedback.

github-research
Explore and analyze GitHub repositories related to a research topic. Reads deep-research output, discovers repos from multiple sources, deeply analyzes code, and produces integration blueprints.