/single-sheet-export
动态统计多Sheet Excel文件行数以判断大文件处理逻辑,并根据特定条件筛选数据、重命名字段后导出为包含下载链接的新Excel文件,适用于多Sheet数据探查与条件过滤导出场景。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill single-sheet-export --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
/single-sheet-export
Context preview
The summary Claude sees to decide when to auto-load this skill.
动态统计多Sheet Excel文件行数以判断大文件处理逻辑,并根据特定条件筛选数据、重命名字段后导出为包含下载链接的新Excel文件,适用于多Sheet数据探查与条件过滤导出场景。
SKILL.md
single-sheet-export.SKILL.mdname: excel-sheet-filter-export
description: "动态统计多Sheet Excel文件行数以判断大文件处理逻辑,并根据特定条件筛选数据、重命名字段后导出为包含下载链接的新Excel文件,适用于多Sheet数据探查与条件过滤导出场景。"
Skill Steps
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 读取目标Sheet,清理字段格式并根据特定条件筛选记录,统计关键指标。
target_sheet = 'Sheet1' # 替换为实际sheet名
df_target = pd.read_excel(file_path, sheet_name=target_sheet)
# 清理目标列的字符串格式(去除首尾空格)
filter_col = 'group_col'
if filter_col in df_target.columns:
df_target[filter_col] = df_target[filter_col].astype(str).str.strip()
# 筛选符合条件的记录
target_value = 'target_value_example'
mask = df_target[filter_col] == target_value
df_filtered = df_target[mask]
# 统计特定范围的种类数量
target_col = 'target_col'
if target_col in df_filtered.columns:
specific_ranges = df_filtered[target_col].dropna().unique()
print(f"{target_col} 种类数量:", len(specific_ranges))
# 统计各分类数量与占比
value_counts_df = df_filtered[target_col].value_counts().reset_index()
value_counts_df.columns = [target_col, '数量']
value_counts_df['占比'] = (value_counts_df['数量'] / value_counts_df['数量'].sum()).map('{:.2%}'.format)
# 添加总计行
total_row = pd.DataFrame({
target_col: ['总计'],
'数量': [value_counts_df['数量'].sum()],
'占比': ['100.00%']
})
value_counts_df = pd.concat([value_counts_df, total_row], ignore_index=True)
print(f"\n{target_col} 分布情况:\n", value_counts_df.head())Step2 提取所需字段,对结果进行字段重命名与格式化处理,保存为新的Excel文件并生成下载链接。
# 提取需要的列并重命名
selected_cols = ['col1', 'col2', filter_col, target_col]
# 确保列存在
existing_cols = [col for col in selected_cols if col in df_filtered.columns]
result_df = df_filtered[existing_cols].copy()
# 字段重命名映射字典
rename_mapping = {
'col1': '重命名列1',
'col2': '重命名列2',
filter_col: '筛选维度',
target_col: '分析维度'
}
result_df = result_df.rename(columns=rename_mapping)
# 保存结果并提供下载链接
output_path = "filtered_result_output.xlsx"
result_df.to_excel(output_path, index=False)
print("结果已保存至:", output_path)
print(f"[下载结果文件](sandbox:{output_path})")Read more
name: excel-sheet-filter-export description: "动态统计多Sheet Excel文件行数以判断大文件处理逻辑,并根据特定条件筛选数据、重命名字段后导出为包含下载链接的新Excel文件,适用于多Sheet数据探查与条件过滤导出场景。"
Skill Steps
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 读取目标Sheet,清理字段格式并根据特定条件筛选记录,统计关键指标。
target_sheet = 'Sheet1' # 替换为实际sheet名
df_target = pd.read_excel(file_path, sheet_name=target_sheet)
# 清理目标列的字符串格式(去除首尾空格)
filter_col = 'group_col'
if filter_col in df_target.columns:
df_target[filter_col] = df_target[filter_col].astype(str).str.strip()
# 筛选符合条件的记录
target_value = 'target_value_example'
mask = df_target[filter_col] == target_value
df_filtered = df_target[mask]
# 统计特定范围的种类数量
target_col = 'target_col'
if target_col in df_filtered.columns:
specific_ranges = df_filtered[target_col].dropna().unique()
print(f"{target_col} 种类数量:", len(specific_ranges))
# 统计各分类数量与占比
value_counts_df = df_filtered[target_col].value_counts().reset_index()
value_counts_df.columns = [target_col, '数量']
value_counts_df['占比'] = (value_counts_df['数量'] / value_counts_df['数量'].sum()).map('{:.2%}'.format)
# 添加总计行
total_row = pd.DataFrame({
target_col: ['总计'],
'数量': [value_counts_df['数量'].sum()],
'占比': ['100.00%']
})
value_counts_df = pd.concat([value_counts_df, total_row], ignore_index=True)
print(f"\n{target_col} 分布情况:\n", value_counts_df.head())Step2 提取所需字段,对结果进行字段重命名与格式化处理,保存为新的Excel文件并生成下载链接。
# 提取需要的列并重命名
selected_cols = ['col1', 'col2', filter_col, target_col]
# 确保列存在
existing_cols = [col for col in selected_cols if col in df_filtered.columns]
result_df = df_filtered[existing_cols].copy()
# 字段重命名映射字典
rename_mapping = {
'col1': '重命名列1',
'col2': '重命名列2',
filter_col: '筛选维度',
target_col: '分析维度'
}
result_df = result_df.rename(columns=rename_mapping)
# 保存结果并提供下载链接
output_path = "filtered_result_output.xlsx"
result_df.to_excel(output_path, index=False)
print("结果已保存至:", output_path)
print(f"[下载结果文件](sandbox:{output_path})")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.
- /sn-da-excel-workflow
Excel 数据分析多步编排器。覆盖:(1) 读取多 Sheet Excel 文件并统计行数,(2) 大文件检测(≥10k 行自动 Parquet 优化),(3) 数据清洗(缺失值、文本标准化、无效字符),(4) 条件筛选与分类提取,(5) 跨 Sheet 统计聚合,(6) 导出 Excel/CSV 并提供下载链接。覆盖从数据读取到报告生成全流程,按步骤编排 capability 子 skill。**遇到以下任一情况就主动使用本 skill,不要自行写几行 pandas 就回答**:①用户出现触发词:Excel 分析 / 表格分析 / 数据分析 /
Open skill - /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

