data-analysis
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.
What this skill does
# 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 ```bash 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 ```bash 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: 1. `# IMPORT` — pandas, numpy, scipy, statsmodels, sklearn 2. `# LOAD DATA` — Load from original data files 3. `# DATASET PREPARATIONS` — Missing values, units, exclusion criteria 4. `# DESCRIPTIVE STATISTICS` — Summary tables if needed 5. `# PREPROCESSING` — Dummy variables, normalization 6. `# ANALYSIS` — Statistical tests per hypothesis 7. `# SAVE ADDITIONAL RESULTS` — Extra results to pickle ### Step 2: 4-Round Code Review 1. **Round 1 — Code Flaws**: Mathematical/statistical errors, wrong calculations, trivial tests 2. **Round 2 — Data Handling**: Missing values, units, preprocessing, test choice 3. **Round 3 — Per-Table**: Sensible values, measures of uncertainty, missing data 4. **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-code/), [experiment-design](../experiment-design/) - Downstream: [table-generation](../table-generation/), [figure-generation](../figure-generation/), [backward-traceability](../backward-traceability/) - See also: [math-reasoning](../math-reasoning/)
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.