mcpField
D
data-analysis-pro

data-analysis-pro

github.com/dongzhang84Data & databases2340 installsUpdated 35w ago
Repository

About data-analysis-pro

A skill that guides AI through data understanding, selection of analytical perspectives, and synthesis of findings, with output formats including HTML reports, PPTX, and Markdown. It is intended for analysts and business teams needing evidence-based analysis and clear data presentation.

Key features

  1. 01Chooses report, presentation, or text output by task
  2. 02Organizes parallel expert analysis for complex datasets
  3. 03Synthesizes findings around conclusions and evidence
  4. 04Defines HTML report layout and visualization principles
  5. 05Includes scripts for reading Excel and CSV and converting PPTX

Use cases

  1. 01Conduct deep analysis of large or multidimensional datasets
  2. 02Create HTML reports with charts and analytical narrative
  3. 03Convert a report into a presentation when requested
  4. 04Explore data quickly and return Markdown results

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dongzhang84/data-analysis-skill --skill data-analysis-pro

After installing, type/data-analysis-proin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE
.gitignore
README.md
package.json
package-lock.json
.claude/skills/data-analysis/references/
report-styles.md
domain-knowledge.md
html-templates.md
workflows.md
.claude/skills/data-analysis/scripts/
html2pptx.js
read_csv.py
read_excel.py
sample-data/
example.csv
sample-output/
report.html
report-01.html
slides.html

Details

From the project README

Data Analysis Assistant

Think one step ahead — don't just complete the task, deliver expert insight.

Guiding Principles

Design philosophy matters more than design details.

The AI is smart. Give it context and goals, and it will make good design decisions. We provide direction, not a step-by-step operating manual.

  • Context, not control — Tell the AI why and what feeling you want, not line-by-line CSS. Reference files are inspiration and context, not templates to copy verbatim.
  • Define outcomes, not process — Describe the desired result; let the AI choose the path.
  • Understand before executing — First ask: "What does the user actually need?"
  • Expert perspective — Adopt the most fitting role (analyst, growth strategist, designer, domain specialist).
  • Think one step ahead — After completing a task, proactively surface issues, trends, or opportunities the user may have missed.
  • Data honesty — Never fabricate data. Charts must not mislead.

Output Format Decision

User IntentOutput FormatWhen to Use
Analysis / report / visualizationHTML reportDefault choice. SVG/inline JS charts + analytical narrative
Slides / presentationHTML → PPTXOnly when user explicitly requests it
Quick numbers / explorationTerminal + MarkdownExploratory analysis, no visual packaging needed

HTML Report: Layout Contract

Every HTML report must satisfy these baseline requirements. These are engineering constraints, not style choices — all styles must comply:

html { background: [match body background]; }
body {
  max-width: 1200px;
  margin: 0 auto;        /* horizontally centered */
  padding: 40px 48px;    /* breathing room */
}

Why:

  • margin: 0 auto — report must be centered in browser, never left-aligned
  • html and body background must match — no color gap on sides
  • max-width not width — works on narrow screens too
  • Supporting text ≥ 10pt — designed for projection / presentation
  • Charts: use CDN libraries (ECharts, D3.js, Chart.js) or pure SVG — choose by complexity

Design Philosophy

The feeling we're after

Warm professionalism — like a well-designed magazine. Authoritative but approachable. Not cold tech-blue. Not flashy neon.

Information first — design serves data. Headlines are conclusions, not descriptions. Color carries meaning (red = problem, green = healthy, grey = reference). Annotate only the critical data points.

Readable at 10 meters — designed for projection. Large titles. Striped tables. Rankings descend.

Data doesn't lie — bar chart Y-axis starts at 0. Protect near-zero values with minimum bar width.

Aesthetic no-go zones

Cyberpunk neon / dark blue backgrounds (#0D1117) / pure black or white backgrounds / gold (#FFD700) text on light backgrounds / purple backgrounds


Report Styles

When the user doesn't specify a style, randomly select from the following to keep outputs fresh:

Classic (Finance / Consulting / Media)
StyleOne-line feelBest for
Financial TimesSalmon warmth, serif authority, traditional financeFinancial analysis, narrative reports
McKinsey ConsultingNavy structure, Exhibit numbering, consulting rigorStrategy analysis, framework decks
The EconomistRed-accent magazine density, editorial headline with opinionIndustry insight, opinion reports
Goldman SachsHigh-density investment tables, Rating badge formalityFinancial modeling, valuation reports
Swiss / NZZBlack-and-white minimalism, extreme type contrastData showcase, design-forward reports
Design-forward
StyleOne-line feelBest for
FathomNavy scientific journal, Figure numbering + footnote systemResearch reports, technical analysis
TakramJapanese light typography, soft shadows, gentle tech feelProduct analysis, innovation reports
EditorialRust red + dusty rose unexpected palette, narrative editingAnnual reports, deep research
MinimalUltra-heavy weight + 70% whitespace, luxury data presentationBoard reports, brand decks

Style color values, fonts, and layout reference → references/report-styles.md

Reference files provide context and inspiration, not verbatim instructions. Understand the spirit of the style; use your judgment to implement it.


Core Methodology: Multi-Expert Deep Analysis

This is the most important analysis workflow in this skill. For any dataset with meaningful analytical depth, follow the four-phase process: Data Understanding → Expert Selection → Parallel Analysis → Unified Presentation

Trigger Conditions

Enable multi-expert deep analysis (rather than a simple statistical summary) when any of:

  • Data has multiple analytical dimensions (time series + financials + behavior, etc.)
  • User explicitly requests "deep analysis", "comprehensive analysis", or "make a report"
  • Dataset has >500 rows or >10 fields
  • Simple analysis would fail to surface the full value of the data

Simple tasks (lookup, table formatting, formula writing) do not need this workflow.

Four-Phase Process
Phase 1: Data Understanding   → Read data, output overview, understand fields and characteristics
Phase 2: Expert Selection     → Based on data type, select 3–5 expert roles from different domains
Phase 3: Parallel Deep Analysis → Each expert executes independently (parallel subagents)
Phase 4: Unified Presentation  → Senior analyst integrates all findings into final report

Phase 1: Data Understanding

After reading the data, immediately output:

  1. Dimensions (rows × columns), time range, field list
  2. Basic statistics (mean / median / extremes / missing rate)
  3. Data quality issues
  4. Initial insights (1–2 immediately visible trends or anomalies)

Phase 2: Expert Selection

Select 3–5 expert roles with different perspectives. Selection criteria:

  • Domain match — each role's expertise must directly relate to the data
  • Complementary viewpoints — roles don't overlap; together they cover quantitative / qualitative / strategic / risk / behavioral dimensions
  • Credible framing — use real well-known expert or institution names (e.g., Damodaran, McKinsey, Kahneman) to increase role authenticity
  • State analytical direction — each role writes 300–500 words on their approach and focus areas

Write role statements to a .md file for user review before proceeding to Phase 3. User can adjust roles before analysis begins.


Phase 3: Parallel Deep Analysis (Subagent Architecture)

Each expert role uses an independent subagent running in parallel. Benefits:

  • Context isolation: each expert focuses only on their dimension
  • Parallel efficiency: 3–5 analyses run simultaneously
  • Quality assurance: each subagent prompt contains the full role definition + data context + analysis objectives

Subagent invocation: use the Task tool with subagent_type="general-purpose". Each subagent prompt contains:

1. Role definition (who you are, your analytical framework)
2. Data file path
3. Specific analysis task list
4. Output format requirements (JSON / Markdown, including key numbers and conclusions)

All subagents launch in parallel (run_in_background=true). Collect all results after completion.


Phase 4: Unified Presentation

Key rule: no expert role names appear in the final report.

From the perspective of a single "senior management analyst", synthesize all expert findings:

  • Organize by theme, not by role (e.g., "Fundamentals", "Risk", "Trends", "Behavioral Insights")
  • Cross-reference findings from different roles to form richer conclusions
  • Headlines use conclusion format ("CapEx doubled, net cash turns negative for first time") not description format ("Capital Expenditure Analysis")
  • Select data and charts from across all expert analyses — use the most compelling evidence

Final output: HTML report (default) or PPTX if requested.

Scale Adaptation
Data ComplexityExpert CountSubagent Strategy
Simple (single table, <10 fields)Skip multi-expertDirect analysis
Medium (multi-dimension, cross-time)3 expertsParallel subagents
Complex (multi-table, multi-domain)5 expertsParallel subagents

Detailed execution spec → references/workflows.md


Analysis Philosophy

  • Conclusion first — state good or bad upfront, then explain why
  • Data-backed — every claim supported by a specific number
  • Actionable — recommendations can be executed immediately; never say "requires further study"
  • No filler — remove "in summary", "it should be noted", "as mentioned above"
  • Use "quotation marks" for emphasis within text
Language Rules

Report content defaults to the user's language.

Always use domain-standard English for:

  • Abbreviations and technical terms: FCF, CapEx, ROIC, D/E Ratio, P/FCF, Sharpe, GARCH, VaR
  • Company / product names: Meta, Apple, Amazon
  • Universal acronyms: IPO, AI, CEO, KPI, ROI

Always localize:

  • Report titles, section headings, chart titles
  • "Executive Summary", "Source", "Synthesis" → translate to user's language
  • Evaluative language: Strong, Neutral, Extreme → translate
  • Footers, date labels, legend labels
Analysis Output Structure
Core Conclusion (1–3 sentences — management reads only this)
→ Supporting Data (specific numbers, comparisons, trends)
→ Anomalies / Risks
→ Actionable Recommendations (3–5 items, by priority)
→ Next Steps (think one step ahead: what else could be explored)
When to Ask Before Proceeding

Always ask when:

  • Field meanings are unclear
  • Analytical dimensions are ambiguous
  • Report audience is unspecified
  • Task involves business judgment calls

Tools & Scripts

ScriptPurpose
scripts/read_excel.pyRead Excel files (outputs markdown / CSV / JSON)
scripts/read_csv.pyRead and profile CSV files
scripts/html2pptx.jsConvert HTML slides → PPTX

Auto-install missing dependencies when scripts are run.


Reference File Index

NeedWhere to look
Report style parametersreferences/report-styles.md
HTML visualization component libraryreferences/html-templates.md
Detailed workflow specreferences/workflows.md
Domain-specific analysis knowledgereferences/domain-knowledge.md

Comments

Markdown supported