diff --git a/skills/csv-data-analysis/SKILL.md b/skills/csv-data-analysis/SKILL.md index eb8624870..ad05276a6 100644 --- a/skills/csv-data-analysis/SKILL.md +++ b/skills/csv-data-analysis/SKILL.md @@ -1,23 +1,23 @@ --- name: csv-data-analysis -description: This skill should be used when users need to analyze CSV or Excel files, understand data patterns, generate statistical summaries, or create data visualizations. Trigger keywords include "分析CSV", "分析Excel", "数据分析", "CSV分析", "Excel分析", "数据统计", "生成图表", "数据可视化". +description: This skill should be used when users need to analyze CSV or Excel files, understand data patterns, generate statistical summaries, or create data visualizations. Trigger keywords include "analyze CSV", "analyze Excel", "data analysis", "CSV analysis", "Excel analysis", "data statistics", "generate charts", "data visualization", "分析CSV", "分析Excel", "数据分析", "CSV分析", "Excel分析", "数据统计", "生成图表", "数据可视化". --- -# 智能数据深度分析工具 +# Intelligent Deep Data Analysis Tool -数据分析工具是一个基于 AI 与前端可视化技术(ECharts + Tailwind CSS)的深度自动化数据探索工具。它能够快速提取统计特征、数据质量、数值分布、异常值检测、分类信息、相关性、排名以及时序趋势,并在后半段补充异动概述、归因线索和总结建议,生成高度美观和可交互的网页分析报告。支持 CSV、Excel(.xlsx/.xls)和 TSV 格式。 +The Data Analysis Tool is an AI-powered deep automated data exploration tool built on frontend visualization technologies (ECharts + Tailwind CSS). It rapidly extracts statistical features, data quality metrics, numerical distributions, outlier detection, categorical information, correlations, rankings, and time series trends. The latter half of the report supplements these with anomaly overviews, attribution clues, and summary recommendations, producing highly polished and interactive web-based analysis reports. Supported formats include CSV, Excel (.xlsx/.xls), and TSV. -报告整体遵循“前半段基础数据分析、后半段异动与归因增强”的结构,核心章节包括:报告摘要、数据概览与质量检查、数值指标分布特征、特征分析与结构分析、关系分析与异常识别、数据异动概述、归因分析模块、分析结果与统计明细、原因推测/总结/建议。 +The report follows a structure of "foundational data analysis in the first half, anomaly detection and attribution enhancement in the second half." Core sections include: Executive Summary, Data Overview & Quality Check, Numerical Distribution Features, Feature Analysis & Structural Analysis, Relationship Analysis & Anomaly Identification, Data Anomaly Overview, Attribution Analysis Module, Analysis Results & Statistical Details, Root Cause Inference / Conclusions / Recommendations. -## 核心工作流(LLM 必读) +## Core Workflow (Required Reading for LLMs) -作为 AI 助手,在用户上传 CSV 或 Excel 文件并要求分析时,你需要严格按照以下两步执行: +As an AI assistant, when a user uploads a CSV or Excel file and requests analysis, you must strictly follow these two steps: -### 第一步:提取数据特征 (执行脚本) +### Step 1: Extract Data Features (Execute Script) -使用 `execute_skill_script_file` 工具运行 `csv_analyzer.py`,将数据文件路径传入(支持 .csv、.xlsx、.xls、.tsv 格式)。 +Use the `execute_skill_script_file` tool to run `csv_analyzer.py`, passing in the data file path (supports .csv, .xlsx, .xls, .tsv formats). -**工具调用参数示例:** +**Tool call parameter example:** ```json { "skill_name": "csv-data-analysis", @@ -26,85 +26,85 @@ description: This skill should be used when users need to analyze CSV or Excel f } ``` -**脚本返回说明:** -脚本会返回一大段 `text` 内容,其中包含两个部分: -1. **【统计摘要】**:供你阅读并理解数据集的基本情况、分布、相关性和分类构成。 -2. **【marker 包裹的数据块】**:脚本输出里会带有 `###KEY_START###...###KEY_END###` 形式的 marker 数据块。后端会自动捕获并注入到模板中,**你不需要关心这部分内容,也不需要传递它**。 +**Script return explanation:** +The script returns a large block of `text` content containing two parts: +1. **[Statistical Summary]**: For you to read and understand the dataset's basic characteristics, distributions, correlations, and categorical composition. +2. **[Marker-wrapped data blocks]**: The script output contains marker data blocks in the format `###KEY_START###...###KEY_END###`. The backend automatically captures and injects these into the template — **you do not need to handle or pass this content**. -### 第二步:生成洞察与展示报告 (注入模板) +### Step 2: Generate Insights & Display Report (Inject into Template) -阅读第一步获得的"统计摘要",思考数据背后的业务意义或规律。然后使用 `html_interpreter` 工具,加载模板并注入数据。 +Read the "Statistical Summary" obtained in Step 1, and reason about the business significance or patterns behind the data. Then use the `html_interpreter` tool to load the template and inject data. -**关键规则(必须遵守):** +**Critical Rules (Must Follow):** -1. **必须设置 `template_path`** 为 `csv-data-analysis/templates/report_template.html`。模板中已内置完整的 ECharts 渲染 JavaScript 代码和所有章节标题、页脚文本,你只需要通过 `data` 参数填充 8 个内容占位符即可。**绝对不要自己编写或修改任何 JavaScript 图表渲染代码。** +1. **You must set `template_path`** to `csv-data-analysis/templates/report_template.html`. The template has built-in complete ECharts rendering JavaScript code and all section titles and footer text. You only need to fill in 8 content placeholders via the `data` parameter. **Never write or modify any JavaScript chart rendering code yourself.** -2. **marker 数据块由后端自动注入**,你无需也不应在 `data` 中传递它。后端会从脚本输出里的 `###KEY_START###...###KEY_END###` 自动提取并注入到模板;当前这个 skill 中主要是 `CHART_DATA_JSON`。 +2. **Marker data blocks are automatically injected by the backend** — you must not pass them in `data`. The backend automatically extracts content from `###KEY_START###...###KEY_END###` markers in the script output and injects it into the template; in this skill, this is primarily `CHART_DATA_JSON`. -3. **`*_INSIGHTS`、`EXEC_SUMMARY` 和 `CONCLUSIONS`** 必须使用 HTML 格式(如 `

`, `