Files
zclaw_openfang/skills/data-analysis/SKILL.md
iven d60d445cbf feat(phase4-5): add Workflow types and expand Skills ecosystem
Phase 4: Type System Completion (P2)
- Add comprehensive Workflow type definitions:
  - WorkflowStepType: hand, skill, agent, condition, parallel, delay
  - WorkflowStep: individual step configuration
  - Workflow: complete workflow definition
  - WorkflowRunStatus: pending, running, completed, failed, cancelled, paused
  - WorkflowRun: execution instance tracking
  - Request/Response types for API operations
  - Control types for pause/resume/cancel
- Update types/index.ts with workflow exports

Phase 5: Skills Ecosystem Expansion (P2)
- Add 5 new Skills with SKILL.md definitions:
  - git: Git version control operations
  - file-operations: File system operations
  - web-search: Web search capabilities
  - data-analysis: Data analysis and visualization
  - shell-command: Shell command execution
- Skills coverage now at 9/60+ (15%)

Documentation:
- Update SYSTEM_ANALYSIS.md Phase 4 & 5 status
- Mark Phase 4 as completed
- Update Phase 5 progress tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 01:51:45 +08:00

136 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: data-analysis
description: 数据分析和可视化 - 分析数据、生成统计、创建图表
triggers:
- "分析数据"
- "数据分析"
- "统计"
- "图表"
- "可视化"
- "数据报告"
- "数据统计"
tools:
- bash
- read
- write
---
# 数据分析和可视化
分析数据、生成统计信息、创建数据可视化图表。
## 能力
- 数据统计:计算均值、中位数、标准差等
- 数据清洗:处理缺失值、异常值
- 数据转换:格式转换、数据聚合
- 趋势分析:识别数据趋势和模式
- 可视化建议:推荐合适的图表类型
- 报告生成:生成数据分析报告
## 工具依赖
- bash: 执行数据处理脚本Python/Node.js
- read: 读取数据文件
- write: 输出分析结果
## 支持的数据格式
| 格式 | 扩展名 | 说明 |
|------|--------|------|
| CSV | .csv | 逗号分隔值 |
| JSON | .json | JSON 数据 |
| Excel | .xlsx | Excel 表格 |
| TSV | .tsv | 制表符分隔 |
| YAML | .yaml/.yml | YAML 格式 |
## 常用分析方法
### 描述性统计
```python
# 使用 pandas
import pandas as pd
df = pd.read_csv('data.csv')
# 基本统计
print(df.describe())
# 缺失值检查
print(df.isnull().sum())
```
### 数据聚合
```python
# 分组统计
df.groupby('category').agg({
'value': ['mean', 'sum', 'count']
})
```
### 时间序列分析
```python
# 日期转换
df['date'] = pd.to_datetime(df['date'])
# 按时间聚合
df.set_index('date').resample('M').mean()
```
## 图表类型选择
| 数据类型 | 推荐图表 | 用途 |
|----------|----------|------|
| 对比 | 柱状图、条形图 | 比较不同类别 |
| 趋势 | 折线图、面积图 | 展示变化趋势 |
| 占比 | 饼图、环形图 | 显示部分与整体 |
| 分布 | 直方图、箱线图 | 展示数据分布 |
| 关系 | 散点图、气泡图 | 显示变量关系 |
## 示例用法
```
用户: 分析 data/sales.csv 文件,生成销售报告
助手: 读取并分析数据...
[使用 read 工具读取文件]
[使用 bash 执行 Python 分析脚本]
## 销售数据分析报告
### 数据概览
- 总记录数: 1,234 条
- 时间范围: 2024-01 至 2024-12
- 产品类别: 5 个
### 关键指标
| 指标 | 值 |
|------|-----|
| 总销售额 | ¥1,234,567 |
| 平均订单额 | ¥1,000 |
| 最高单笔 | ¥15,000 |
| 月均增长 | 12.5% |
### 趋势分析
- Q1: 缓慢增长
- Q2: 快速增长期
- Q3: 稳定期
- Q4: 年末冲刺
### 建议
1. 加强 Q2 营销投入
2. 优化低利润产品线
3. 关注客户复购率
```
## 输出规范
- 使用中文输出分析结果
- 表格使用 Markdown 格式
- 关键数据加粗标注
- 提供数据解读和建议
- 标注数据来源和时间范围