SuperAPI AI Directory

data-analysis

Data & analytics

View repository

Updated 10-16 08:11

About this skill

Data Analysis Skill - General-purpose 6-stage data analysis guide

This skill provides a professional data analysis methodology, using a standard 6-stage workflow, applicable to any dataset.


🚀 Core: 6-stage workflow (general-purpose)

┌─────────────────────────────────────────────────────────────┐
│ Stage 1: 数据质量检查 (Data Quality)                         │
│   - 完整性、唯一性、有效性检查                               │
│   - 问题诊断和改进建议                                       │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ Stage 2: 探索性数据分析 (Exploratory Data Analysis)         │
│   - 描述性统计(均值、中位数、标准差)                       │
│   - 相关性分析、模式发现                                     │
│   - 异常检测                                                 │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ Stage 3: 研究假设生成 (Hypothesis Generation)                │
│   - 基于数据发现生成可检验假设                               │
│   - A/B 测试设计、实验方法论                                 │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ Stage 4: 数据可视化 (Visualization)                          │
│   - 统计图表、分布图、热力图                                 │
│   - 交互式仪表板                                             │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ Stage 5: 可复用代码生成 (Code Generation)                    │
│   - 数据处理管道、分析函数库                                 │
│   - 机器学习代码(如需要)                                   │
└─────────────────────────┬───────────────────────────────────┘
                          ↓
┌─────────────────────────────────────────────────────────────┐
│ Stage 6: 综合报告生成 (Report Generation)                    │
│   - 综合分析报告 + 执行摘要                                  │
│   - 业务洞察和建议                                           │
└─────────────────────────────────────────────────────────────┘

📂 Skill directory structure (everything is here)

.trae/skills/data-analysis/
├── SKILL.md                           # 本文档
├── templates/                         # 📋 模板目录
│   ├── stage1_quality_template.md    # Stage 1: 数据质量报告模板
│   ├── stage2_eda_template.md        # Stage 2: 探索性分析报告模板
│   ├── stage3_hypothesis_template.md # Stage 3: 假设生成模板
│   ├── stage4_visualization_template.md # Stage 4: 可视化模板
│   ├── stage5_code_template.md       # Stage 5: 代码生成模板
│   └── stage6_report_template.md     # Stage 6: 综合报告模板
├── examples/                          # 📊 示例目录
│   └── olist/                        # Olist 数据集分析示例(仅供参考)
│       ├── README.md
│       └── sample_outputs/
└── guide/                            # 📖 详细指南
    ├── stage1_quality_guide.md
    ├── stage2_eda_guide.md
    ├── stage3_hypothesis_guide.md
    ├── stage4_visualization_guide.md
    ├── stage5_code_guide.md
    └── stage6_report_guide.md

🎯 Usage guide

Step 1: Start analysis

When the user needs to analyze data, proceed according to the following 6 stages:

1. Stage 1: 数据质量检查
2. Stage 2: 探索性数据分析
3. Stage 3: 研究假设生成
4. Stage 4: 数据可视化
5. Stage 5: 代码生成(如需要)
6. Stage 6: 综合报告生成

Step 2: Output organization

Create the following output directory structure (names can be customized):

analysis_results/
├── stage1_quality_report/
├── stage2_eda_report/
├── stage3_hypothesis_report/
├── stage4_visualizations/
├── stage5_generated_code/
└── stage6_final_report/

📋 Detailed guidance for each stage

Stage 1: Data quality check

Objective: Assess data quality, identify issues, and propose improvement suggestions

Check points:

  • Completeness: Missing value statistics
  • Uniqueness: Duplicate record check
  • Validity: Data type, range, and format validation
  • Consistency: Data logical consistency check

Output:

  • Quality assessment report
  • Issue log
  • Improvement suggestions

Reference template: templates/stage1_quality_template.md


Stage 2: Exploratory data analysis

Objective: Understand the data structure, discover patterns and insights

Analysis content:

  • Descriptive statistics: Mean, median, standard deviation, quantiles
  • Correlation analysis: Pearson/Spearman correlation coefficient
  • Pattern discovery: Time trends, distribution patterns, outliers
  • Visualization: Histogram, box plot, scatter plot

Output:

  • Statistical summary
  • Pattern discovery report
  • Correlation analysis

Reference template: templates/stage2_eda_template.md


Stage 3: Research hypothesis generation

Objective: Generate testable hypotheses based on data findings

Hypothesis types:

  • Correlational hypothesis: Is A related to B?
  • Comparative hypothesis: Is group A significantly different from group B?
  • Causal hypothesis: Does A cause B?

Output:

  • List of research hypotheses (with priorities)
  • Experimental design plan
  • Validation plan

Reference template: templates/stage3_hypothesis_template.md


Stage 4: Data visualization

Objective: Tell a data story with charts

Chart types:

  • Trend analysis: Line chart, area chart
  • Distribution analysis: Histogram, density plot, box plot
  • Correlation: Scatter plot, heatmap
  • Comparison: Bar chart, grouped chart
  • Composition: Pie chart, stacked chart

Output:

  • Interactive HTML dashboard (recommended)
  • Static charts (PNG/SVG)
  • Visualization code

Reference template: templates/stage4_visualization_template.md


Stage 5: Code generation

Objective: Generate reusable analysis code

Code types:

  • Data preprocessing and cleaning
  • Quality check functions
  • Analysis pipeline
  • Visualization functions
  • Machine learning code (if needed)

Output:

  • Complete analysis script
  • Reusable function library
  • Usage instructions

Reference template: templates/stage5_code_template.md


Stage 6: Comprehensive report generation

Objective: Summarize all analyses and provide business insights

Report structure:

  1. Executive summary
  2. Data overview
  3. In-depth analysis
  4. Research hypotheses
  5. Business recommendations
  6. Experimental design
  7. Conclusion

Output:

  • Comprehensive analysis report (Markdown/PDF)
  • Executive summary (for management)
  • Technical appendix

Reference template: templates/stage6_report_template.md


🔧 Quick reference

Common analysis methods

Analysis type Method
Descriptive statistics Mean, median, standard deviation, quantiles
Correlation Pearson/Spearman correlation coefficient
Hypothesis testing t-test, ANOVA, chi-square test
Anomaly detection IQR、Z-score、DBSCAN
Customer segmentation RFM analysis, K-means clustering
Predictive models Linear regression, random forest, XGBoost

🏷️ Language requirements

All analysis outputs, reports, and visualizations useChinese, unless the user specifies otherwise.


� Detailed guide

For detailed operational guidance for each stage, please refer to the documents in the guide/ directory.


✅ Skill features

✅ Generalized: Applicable to any dataset, not tied to specific data
✅ Guidance-oriented: Provides methodology and templates rather than hard-coded scripts
✅ Complete: Standard 6-stage workflow
✅ Localized: All content is placed under the skill directory
✅ Extensible: New templates and guides can be added as needed