/sn-da-excel-workflow
Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 /
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill sn-da-excel-workflow --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/sn-da-excel-workflow
Context preview
The summary Claude sees to decide when to auto-load this skill.
Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 /
SKILL.md
sn-da-excel-workflow.SKILL.mdname: sn-da-excel-workflow
description: "Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 / 数据清洗 / 数据统计 / 数据筛选 / 数据可视化 / 数据导出 / 汇总统计 / 透视表 / 分组统计 / 交叉分析 / 趋势分析 / 对比分析 / 异常值检测 / 去重 / 缺失值处理 / Excel 报告 / 生成报表 / analyze Excel / data analysis / data cleaning / pivot table;②用户上传或指定了 .xlsx / .xls / .csv 文件并要求分析、清洗、统计或可视化;③任务涉及多 Sheet 读取、条件筛选、分类汇总、图表生成中的任意一项;④用户要求导出带格式的 Excel 报告或下载链接。仅不用于:不涉及表格数据的纯文本处理、图片分析(使用 sn-da-image-caption)、单个公式计算的简单问答。"
Excel Data Analysis Workflow
End-to-end workflow for structured Excel analysis. Each step maps to a capability sub-skill that can be loaded for detailed patterns.
Workflow
Step 1 — Count rows across all sheets (lightweight, no full load)
Count rows per sheet **without loading data into memory**. Use openpyxl `read_only` mode — this works for any file size.
import openpyxl, gc
wb = openpyxl.load_workbook(file_path, read_only=True, data_only=True)
total_rows = 0
sheet_info = {}
for name in wb.sheetnames:
ws = wb[name]
row_count = sum(1 for _ in ws.iter_rows(min_row=2, values_only=True))
total_rows += row_count
sheet_info[name] = row_count
print(f"Sheet '{name}': {row_count} rows")
wb.close()
print(f"总行数={total_rows}")⚠️ **Do NOT use `pd.read_excel()` to count rows** — it loads all data into memory, which will OOM on large files.
→ capability: `excel-reading/multi-sheet-reading`
Step 2 — Large file gate (CRITICAL — choose strategy by row count)
| total_rows | Strategy | What to do | |-----------|----------|------------| | < 10k | Direct read | `df = pd.read_excel(file_path, sheet_name=target_sheet)` | | 10k – 100k | Parquet cache | `pd.read_excel()` once → `df.to_parquet()` → all later reads from Parquet | | **>= 100k** | **STOP. Load `sn-da-large-file-analysis` skill** | Read its SKILL.md, then follow its streaming read + Parquet pattern. **Do NOT use `pd.read_excel()` at all** — it will OOM or timeout on 100k+ rows. |
**For >= 100k rows:**
read_file(path="<skills_base>/sn-da-large-file-analysis/SKILL.md")
Then use `stream_excel_to_parquet()` from that skill — it reads via openpyxl `iter_rows` in 50k-row chunks with constant memory.
**For 10k – 100k rows (only):**
import pandas as pd
parquet_path = "/tmp/_auto_parquet.parquet"
df = pd.read_excel(file_path, sheet_name=target_sheet)
df.to_parquet(parquet_path, engine="pyarrow")
del df; gc.collect()
df = pd.read_parquet(parquet_path)
→ capability: `excel-reading/large-excel-reading`
Step 3 — Inspect schema & data types
Preview target sheet structure. **For large files (>= 10k rows), only read a small sample — never full load just to inspect.**
# For any file size — read only first N rows for inspection
df_head = pd.read_excel(file_path, sheet_name=target_sheet, nrows=20)
print(f"Columns: {df_head.columns.tolist()}")
print(f"Dtypes:\n{df_head.dtypes}")
print(df_head.head(10))→ capability: `excel-reading/range-reading`
Step 4 — Data cleaning
Handle missing values, normalize text, clean invalid characters.
# Missing values
null_count = df[col].isna().sum()
# Text cleaning: keep only Chinese characters
import re
def clean_text(val):
if pd.isna(val): return val
return "".join(re.findall(r"[\u4e00-\u9fff]", str(val))) or ""
df[col] = df[col].apply(clean_text)⚠️ **Large file rule**: When `total_rows >= 100k`, do NOT use `df.apply(lambda...)`. Use vectorized operations or `np.where()` instead. See `sn-da-large-file-analysis` skill for the vectorized cheat sheet.
→ capabilities:
- `excel-data-cleaning/missing-value-handling`
- `excel-data-cleaning/invalid-data-cleaning`
- `excel-data-cleaning/text-normalization`
Step 5 — Filter & extract
Apply condition or category filters, aggregate results.
# Condition filter
mask = df[col].astype(str).str.strip() == target_value
filtered = df[mask]
# Category extraction (for headerless layouts)
df_raw = pd.read_excel(file_path, sheet_name=sheet, header=None)
# Walk rows to find category markers, collect items until next marker
→ capabilities:
- `excel-data-filtering/condition-filtering`
- `excel-data-filtering/category-filtering`
- `excel-data-filtering/threshold-filtering`
Step 6 — Export results
Save filtered/cleaned data as Excel or CSV. Provide download link.
output_path = "/mnt/data/result.xlsx"
result_df.to_excel(output_path, index=False)
print(f"[Download](sandbox:{output_path})")→ capabilities:
- `excel-result-export/single-sheet-export`
- `excel-result-export/formatted-export`
Key rules
- **Always count rows first** — gate large-file logic on the 10k threshold.
- **>= 100k rows → MUST load `sn-da-large-file-analysis` skill** — do not attempt to handle with `pd.read_excel()`.
- **Column names may contain spaces** (e.g. `'是否通 过'`) — use exact string indexing.
- **Headerless sheets** — use `header=None` and positional indexing.
- **Prohibited on large files (>= 100k rows)**:
- `pd.read_excel()` for full load (use streaming read → Parquet)
- `df.apply(lambda...)` or `df.iterrows()` (use vectorized ops or `itertuples()`)
- `fc-list`, `find ... fonts`, `subprocess` to search fonts, or `pip install` (use fixed font paths below)
- Printing all unique values or full DataFrames (use `.head()`, `.value_counts().head()`)
CJK Font Setup (mandatory for charts)
When generating charts with matplotlib, **copy this block as-is**. Do NOT search for fonts.
import os
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
_FONT_PATHS = [
'/mnt/afs_agents/SimHei.ttf',
'/mnt/afs_agents/mnt/data/SimHei.ttf',
os.path.expanduser('~/.fonts/SimHei.ttf'),
'/usr/share/fonts/truetype/wqy/wqy-zenhei.Read more
name: sn-da-excel-workflow description: "Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 / 数据清洗 / 数据统计 / 数据筛选 / 数据可视化 / 数据导出 / 汇总统计 / 透视表 / 分组统计 / 交叉分析 / 趋势分析 / 对比分析 / 异常值检测 / 去重 / 缺失值处理 / Excel 报告 / 生成报表 / analyze Excel / data analysis / data cleaning / pivot table;②用户上传或指定了 .xlsx / .xls / .csv 文件并要求分析、清洗、统计或可视化;③任务涉及多 Sheet 读取、条件筛选、分类汇总、图表生成中的任意一项;④用户要求导出带格式的 Excel 报告或下载链接。仅不用于:不涉及表格数据的纯文本处理、图片分析(使用 sn-da-image-caption)、单个公式计算的简单问答。"
Excel Data Analysis Workflow
End-to-end workflow for structured Excel analysis. Each step maps to a capability sub-skill that can be loaded for detailed patterns.
Workflow
Step 1 — Count rows across all sheets (lightweight, no full load)
Count rows per sheet **without loading data into memory**. Use openpyxl `read_only` mode — this works for any file size.
import openpyxl, gc
wb = openpyxl.load_workbook(file_path, read_only=True, data_only=True)
total_rows = 0
sheet_info = {}
for name in wb.sheetnames:
ws = wb[name]
row_count = sum(1 for _ in ws.iter_rows(min_row=2, values_only=True))
total_rows += row_count
sheet_info[name] = row_count
print(f"Sheet '{name}': {row_count} rows")
wb.close()
print(f"总行数={total_rows}")⚠️ **Do NOT use `pd.read_excel()` to count rows** — it loads all data into memory, which will OOM on large files.
→ capability: `excel-reading/multi-sheet-reading`
Step 2 — Large file gate (CRITICAL — choose strategy by row count)
| total_rows | Strategy | What to do | |-----------|----------|------------| | < 10k | Direct read | `df = pd.read_excel(file_path, sheet_name=target_sheet)` | | 10k – 100k | Parquet cache | `pd.read_excel()` once → `df.to_parquet()` → all later reads from Parquet | | **>= 100k** | **STOP. Load `sn-da-large-file-analysis` skill** | Read its SKILL.md, then follow its streaming read + Parquet pattern. **Do NOT use `pd.read_excel()` at all** — it will OOM or timeout on 100k+ rows. |
**For >= 100k rows:**
read_file(path="<skills_base>/sn-da-large-file-analysis/SKILL.md")
Then use `stream_excel_to_parquet()` from that skill — it reads via openpyxl `iter_rows` in 50k-row chunks with constant memory.
**For 10k – 100k rows (only):**
import pandas as pd parquet_path = "/tmp/_auto_parquet.parquet" df = pd.read_excel(file_path, sheet_name=target_sheet) df.to_parquet(parquet_path, engine="pyarrow") del df; gc.collect() df = pd.read_parquet(parquet_path)
→ capability: `excel-reading/large-excel-reading`
Step 3 — Inspect schema & data types
Preview target sheet structure. **For large files (>= 10k rows), only read a small sample — never full load just to inspect.**
# For any file size — read only first N rows for inspection
df_head = pd.read_excel(file_path, sheet_name=target_sheet, nrows=20)
print(f"Columns: {df_head.columns.tolist()}")
print(f"Dtypes:\n{df_head.dtypes}")
print(df_head.head(10))→ capability: `excel-reading/range-reading`
Step 4 — Data cleaning
Handle missing values, normalize text, clean invalid characters.
# Missing values
null_count = df[col].isna().sum()
# Text cleaning: keep only Chinese characters
import re
def clean_text(val):
if pd.isna(val): return val
return "".join(re.findall(r"[\u4e00-\u9fff]", str(val))) or ""
df[col] = df[col].apply(clean_text)⚠️ **Large file rule**: When `total_rows >= 100k`, do NOT use `df.apply(lambda...)`. Use vectorized operations or `np.where()` instead. See `sn-da-large-file-analysis` skill for the vectorized cheat sheet.
→ capabilities:
- `excel-data-cleaning/missing-value-handling`
- `excel-data-cleaning/invalid-data-cleaning`
- `excel-data-cleaning/text-normalization`
Step 5 — Filter & extract
Apply condition or category filters, aggregate results.
# Condition filter mask = df[col].astype(str).str.strip() == target_value filtered = df[mask] # Category extraction (for headerless layouts) df_raw = pd.read_excel(file_path, sheet_name=sheet, header=None) # Walk rows to find category markers, collect items until next marker
→ capabilities:
- `excel-data-filtering/condition-filtering`
- `excel-data-filtering/category-filtering`
- `excel-data-filtering/threshold-filtering`
Step 6 — Export results
Save filtered/cleaned data as Excel or CSV. Provide download link.
output_path = "/mnt/data/result.xlsx"
result_df.to_excel(output_path, index=False)
print(f"[Download](sandbox:{output_path})")→ capabilities:
- `excel-result-export/single-sheet-export`
- `excel-result-export/formatted-export`
Key rules
- **Always count rows first** — gate large-file logic on the 10k threshold.
- **>= 100k rows → MUST load `sn-da-large-file-analysis` skill** — do not attempt to handle with `pd.read_excel()`.
- **Column names may contain spaces** (e.g. `'是否通 过'`) — use exact string indexing.
- **Headerless sheets** — use `header=None` and positional indexing.
- **Prohibited on large files (>= 100k rows)**:
- `pd.read_excel()` for full load (use streaming read → Parquet)
- `df.apply(lambda...)` or `df.iterrows()` (use vectorized ops or `itertuples()`)
- `fc-list`, `find ... fonts`, `subprocess` to search fonts, or `pip install` (use fixed font paths below)
- Printing all unique values or full DataFrames (use `.head()`, `.value_counts().head()`)
CJK Font Setup (mandatory for charts)
When generating charts with matplotlib, **copy this block as-is**. Do NOT search for fonts.
import os
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
_FONT_PATHS = [
'/mnt/afs_agents/SimHei.ttf',
'/mnt/afs_agents/mnt/data/SimHei.ttf',
os.path.expanduser('~/.fonts/SimHei.ttf'),
'/usr/share/fonts/truetype/wqy/wqy-zenhei.The SenseNova model family plugs directly into agent runtimes such as OpenClaw and hermes-agent, with the skills in this repository extending the models with concrete, end-to-end office capabilities.
Repo: OpenSenseNova/SenseNova-Skills
Other skills on sensenova-skills.
- /category-coloring
当Excel文件总行数超过1万行时,通过转换为Parquet格式提升读取性能,提取目标指标并计算最大值,最后将结果输出为Excel并对特定行进行高亮标注。
Open skill - /duplicate-value-coloring
对比Excel多表中的特定系数并对异常值进行颜色标记。
Open skill - /outlier-coloring
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
Open skill - /threshold-cell-coloring
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
Open skill - /top-value-coloring
根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
Open skill - /data-bar-formatting
从带单位的字符串列中提取数值并清洗,生成包含直方图、饼图、条形图和累积分布图的多维度综合分布可视化图表,用于展示数据的集中趋势与分布特征。
Open skill

