← 返回 Skills 市场
1992huanghai

data-analysis-partner

作者 1992huanghai · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
290
总下载
2
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install data-analysis-partner
功能描述
智能数据分析 Skill,输入 CSV/Excel 文件和分析需求,输出带交互式 ECharts 图表的 HTML 自包含分析报告
使用说明 (SKILL.md)

数据分析 Skill

功能说明

本 Skill 提供 analyze_data 工具,能够:

  1. 读取 CSV 或 Excel 数据文件(.csv / .xlsx / .xls)
  2. 自动进行数据概览(行列数、字段类型、缺失值)
  3. 执行统计分析(描述统计、相关性分析、异常值检测)
  4. 根据用户需求生成针对性的分析和洞察
  5. 输出带交互式 ECharts 图表的自包含 HTML 报告

触发场景

当用户出现以下意图时,应主动调用 analyze_data 工具:

  • 上传了 CSV 或 Excel 文件,并提出分析需求
  • 要求"帮我分析这份数据"、"生成数据报告"、"可视化这个文件"
  • 要求找规律、找差异、找趋势、找异常
  • 要求生成 BI 报告、数据洞察报告

调用方式

analyze_data(
  file_path: "\x3C文件绝对路径>",
  requirements: "\x3C自然语言分析需求>",
  output_dir: "\x3C输出目录,可选>"
)

调用示例

示例 1: 用户说「帮我分析一下这个销售数据,各区域表现怎么样?」 → 调用 analyze_data(file_path="/path/to/sales.csv", requirements="分析各区域销售额差异,找出表现最好和最差的区域,给出改善建议")

示例 2: 用户说「分析用户行为数据,找出流失节点」 → 调用 analyze_data(file_path="/path/to/users.xlsx", requirements="对用户行为数据做漏斗分析,找出主要流失节点,分析流失原因")

示例 3: 用户说「分析产品退货率的影响因素」 → 调用 analyze_data(file_path="/path/to/orders.csv", requirements="分析产品退货率,找出与退货率相关的主要因素,给出降低退货率的建议")

返回值说明

工具返回一个对象,包含:

字段 说明
report_path HTML 报告文件路径,可直接在浏览器打开
summary 结构化摘要数据(行列数、字段信息、关键洞察列表)
charts_count 生成的图表数量
insights 规则引擎提取的关键洞察列表
open_command 打开报告的命令(如 open /path/to/report.html

报告结构

生成的 HTML 报告包含以下模块:

  1. 执行摘要 — 核心发现概览卡片
  2. 数据概览 — 字段类型、缺失值、基础统计表格
  3. 数据洞察 — 规则引擎自动提取的关键发现
  4. 可视化图表 — 交互式 ECharts 图表(分布图、柱状图、热力图、趋势图等)
  5. 描述统计 — 数值列的 min/max/mean/std/quartile 详细统计
  6. 分析结论 — 针对用户需求的分析总结

获取文件路径

如果用户上传了文件但未提供路径,使用以下方式获取:

# OpenClaw 上传文件后,路径通常在 ~/Downloads/ 或临时目录
# 可以用 list_files 工具确认
list_files("~/Downloads")

首次使用:安装 Python 依赖

本 Skill 在首次调用时会自动尝试创建隔离的 Python 环境并安装依赖。如果自动安装失败,请手动执行:

# 在 Skill 目录下创建虚拟环境
python3 -m venv ~/.openclaw/skills/data-analysis-partner/.venv

# 安装依赖
~/.openclaw/skills/data-analysis-partner/.venv/bin/pip install pandas numpy openpyxl xlrd

依赖安装优先级:

  1. Skill 目录内置 .venv(隔离环境,推荐)
  2. 系统 python3(需已安装 pandas/numpy)
  3. 自动创建 .venv 并安装(首次运行时尝试)

隐私说明

生成的 HTML 报告通过 CDN 加载 ECharts 图表库:

\x3Cscript src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js">\x3C/script>

这意味着:

  • 用浏览器打开报告时会向 cdn.jsdelivr.net 发出网络请求
  • CDN 服务器可能记录访问 IP、时间等基础日志
  • 报告本身的数据内容不会上传,仅加载图表渲染库

如需完全离线查看,可在有网络时打开一次报告(ECharts 会被浏览器缓存),后续即可离线使用。

其他注意事项

  • 大文件(>100MB)分析时间可能较长(30秒~2分钟)
  • 超过 5 万行的数据集会自动随机抽样,原始行数在报告中标注
  • HTML 报告自包含(图表配置内嵌),可发送给他人查看
安全使用建议
This skill appears to be what it says: a local data analysis tool implemented with Node.js glue and a Python script. Before installing or running it, consider: (1) install required Python packages (pandas, numpy, openpyxl, xlrd) or provide a .venv; SKILL.md claims automatic venv creation but the code/changelog indicate that auto-creation was removed — plan to set up deps manually. (2) The generated HTML loads ECharts from jsdelivr.net (CDN): opening the report will cause your browser to request that CDN (IP/time may be logged); the developer documents this. If you need strict offline/privacy, host ECharts locally or disable external loading. (3) The skill reads arbitrary local files you pass to it; only provide non-sensitive datasets you are comfortable being read on your machine. (4) If you want extra assurance, review/scan index.js and scripts/analyze.py locally (they appear to operate on local data only and do not make outbound network calls).
功能分析
Package: data-analysis-partner (mcp) Version: 1.0.2 Description: 智能数据分析 Skill:输入 CSV/Excel 文件和分析需求,输出带交互式 ECharts 图表的 HTML 自包含分析报告 The package is a data analysis tool that processes CSV and Excel files to generate interactive HTML reports using ECharts. It uses a Node.js wrapper (index.js) to execute a bundled Python script (analyze.py) via child_process.spawnSync. The code performs standard data processing tasks such as column type detection, statistical analysis, and chart configuration generation. It does not exhibit suspicious behaviors such as unauthorized credential access, unexpected network communication, or obfuscated payload execution. The use of a CDN for ECharts in the generated HTML is documented and standard for such tools.
能力评估
Purpose & Capability
Name/description, manifest permissions (files:read, files:write, shell:python3), and included Python script align with a local CSV/Excel analysis and report generator. Required binary (python3) is appropriate.
Instruction Scope
Runtime instructions focus on reading local files, running analysis, and producing an HTML report. The SKILL.md suggests the skill will "自动尝试创建隔离的 Python 环境并安装依赖" on first run, but index.js/changelog indicate automatic venv creation was removed; instead the code prefers a bundled .venv or system python3 and will error if dependencies are missing. This is a documentation vs implementation mismatch (documentation overstates automation). The SKILL.md/README also suggest using list_files to locate uploaded files (acceptable).
Install Mechanism
No install spec (instruction-only) and the code is included. The skill relies on local Python packages (pandas/numpy/openpyxl/xlrd). There is no network download/install automated by the skill code (changelog shows auto-venv creation/exec was removed). This is lower-risk than an installer that fetches arbitrary archives, but users must install Python deps themselves or provide a .venv.
Credentials
No environment variables or external credentials requested. The required permissions are limited to reading/writing files and invoking python, which match the stated purpose.
Persistence & Privilege
always is false and the skill does not request elevated or persistent platform-wide privileges. It does not modify other skills or system settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install data-analysis-partner
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /data-analysis-partner 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
## [1.0.2] - 2026-03-24 ### 🐛 Bug Fix - **ERR_AMBIGUOUS_MODULE_SYNTAX**: Converted `index.js` from ES Module (`import`/`export default`) to CommonJS (`require`/`module.exports`) to fix compatibility with OpenClaw skill runner - Removed `execSync` (auto-venv creation) to reduce `child_process` usage surface; Python env now resolves via `.venv` → system `python3` only
v1.0.1
- Removed the file `clawhub.json` from the project. - Updated documentation: added clear instructions for first-time dependency installation, including how the Python environment and dependencies are managed and installed. - Added a new "隐私说明" section explaining that report HTML loads ECharts via CDN and the related privacy considerations. - Updated "其他注意事项" with sampling behavior for large datasets and clarified offline usage tips for ECharts chart rendering. - No changes to core features or APIs; only documentation and supporting files updated.
v1.0.0
- 首次发布,提供一站式智能数据分析功能 - 支持分析 CSV/Excel 文件并自动生成自包含的 ECharts 可视化 HTML 报告 - 覆盖数据概览、描述统计、相关性、异常值检测及智能洞察 - 可根据用户自然语言需求定制分析重点和输出 - 报告结构丰富,包含执行摘要、数据洞察、交互式图表等模块 - 工具返回报告路径、关键洞察、摘要信息等便于后续操作
元数据
Slug data-analysis-partner
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

data-analysis-partner 是什么?

智能数据分析 Skill,输入 CSV/Excel 文件和分析需求,输出带交互式 ECharts 图表的 HTML 自包含分析报告. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 290 次。

如何安装 data-analysis-partner?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install data-analysis-partner」即可一键安装,无需额外配置。

data-analysis-partner 是免费的吗?

是的,data-analysis-partner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

data-analysis-partner 支持哪些平台?

data-analysis-partner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 data-analysis-partner?

由 1992huanghai(@1992huanghai)开发并维护,当前版本 v1.0.2。

💬 留言讨论