/structured-header-reading
读取多 sheet Excel 文件,动态识别目标列进行统计,并使用正则清洗文本字段提取中文字符,最终输出标准化 Excel 文件。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill structured-header-reading --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
/structured-header-reading
Context preview
The summary Claude sees to decide when to auto-load this skill.
读取多 sheet Excel 文件,动态识别目标列进行统计,并使用正则清洗文本字段提取中文字符,最终输出标准化 Excel 文件。
SKILL.md
structured-header-reading.SKILL.mdname: excel-large-file-processing-and-cleaning
description: "读取多 sheet Excel 文件,动态识别目标列进行统计,并使用正则清洗文本字段提取中文字符,最终输出标准化 Excel 文件。"
Skill Steps
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 文本字段清洗,使用正则表达式提取纯中文字符(过滤数字、特殊符号等)。
import re
def extract_chinese(text):
if pd.isna(text):
return text
# 仅保留 Unicode 中文字符范围
chinese_chars = re.findall(r'[一-龥]', str(text))
cleaned = ''.join(chinese_chars)
return cleaned if cleaned else ''
clean_col = '目标清洗列' # 占位示例,如'收货人'
if clean_col in df.columns:
df[clean_col] = df[clean_col].apply(extract_chinese)Step2 动态模糊匹配列名,并统计该列中特定值的数量。
# 动态查找包含特定关键字的列
keyword = 'type'
target_val = 'varchar'
target_col = next((col for col in df.columns if keyword in str(col).lower()), None)
total_target_count = 0
details = []
if target_col is not None:
# 忽略大小写和首尾空格进行匹配
mask = df[target_col].astype(str).str.lower().str.strip() == target_val
count = mask.sum()
total_target_count += count
if count > 0:
details.append({
'sheet': target_sheet,
'target_count': count,
'total_rows': len(df)
})
print(f"{'='*50}")
print(f"匹配列 '{target_col}' 中值为 '{target_val}' 的总数: {total_target_count}")
print(f"{'='*50}")
for detail in details:
print(f" {detail['sheet']}: {detail['target_count']} 个匹配项 (共 {detail['total_rows']} 行)")Step3 将清洗和处理后的数据保存为 Excel,并输出文件大小与下载链接。
output_path = "/mnt/data/cleaned_data_output.xlsx"
df.to_excel(output_path, index=False)
file_size = os.path.getsize(output_path)
print(f"清洗后的数据已保存至: {output_path}")
print(f"文件大小: {file_size} 字节")
# 生成标准下载链接格式
print(f"下载链接: sandbox:{output_path}")Read more
name: excel-large-file-processing-and-cleaning description: "读取多 sheet Excel 文件,动态识别目标列进行统计,并使用正则清洗文本字段提取中文字符,最终输出标准化 Excel 文件。"
Skill Steps
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 文本字段清洗,使用正则表达式提取纯中文字符(过滤数字、特殊符号等)。
import re
def extract_chinese(text):
if pd.isna(text):
return text
# 仅保留 Unicode 中文字符范围
chinese_chars = re.findall(r'[一-龥]', str(text))
cleaned = ''.join(chinese_chars)
return cleaned if cleaned else ''
clean_col = '目标清洗列' # 占位示例,如'收货人'
if clean_col in df.columns:
df[clean_col] = df[clean_col].apply(extract_chinese)Step2 动态模糊匹配列名,并统计该列中特定值的数量。
# 动态查找包含特定关键字的列
keyword = 'type'
target_val = 'varchar'
target_col = next((col for col in df.columns if keyword in str(col).lower()), None)
total_target_count = 0
details = []
if target_col is not None:
# 忽略大小写和首尾空格进行匹配
mask = df[target_col].astype(str).str.lower().str.strip() == target_val
count = mask.sum()
total_target_count += count
if count > 0:
details.append({
'sheet': target_sheet,
'target_count': count,
'total_rows': len(df)
})
print(f"{'='*50}")
print(f"匹配列 '{target_col}' 中值为 '{target_val}' 的总数: {total_target_count}")
print(f"{'='*50}")
for detail in details:
print(f" {detail['sheet']}: {detail['target_count']} 个匹配项 (共 {detail['total_rows']} 行)")Step3 将清洗和处理后的数据保存为 Excel,并输出文件大小与下载链接。
output_path = "/mnt/data/cleaned_data_output.xlsx"
df.to_excel(output_path, index=False)
file_size = os.path.getsize(output_path)
print(f"清洗后的数据已保存至: {output_path}")
print(f"文件大小: {file_size} 字节")
# 生成标准下载链接格式
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

