/invalid-data-cleaning
用于大规模Excel数据的预处理,通过统计总行数判断是否转换为Parquet格式以提升读写效率,并使用正则表达式清洗指定文本列(如仅保留中文字符),最后导出清洗后的文件并提供下载链接。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill invalid-data-cleaning --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
/invalid-data-cleaning
Context preview
The summary Claude sees to decide when to auto-load this skill.
用于大规模Excel数据的预处理,通过统计总行数判断是否转换为Parquet格式以提升读写效率,并使用正则表达式清洗指定文本列(如仅保留中文字符),最后导出清洗后的文件并提供下载链接。
SKILL.md
invalid-data-cleaning.SKILL.mdname: invalid-data-cleaning
description: "用于大规模Excel数据的预处理,通过统计总行数判断是否转换为Parquet格式以提升读写效率,并使用正则表达式清洗指定文本列(如仅保留中文字符),最后导出清洗后的文件并提供下载链接。"
Invalid_Data_Cleaning
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Skill Steps
Step1 根据总行数判断是否数据量过大,若满足条件,则将 Excel 文件转换为 Parquet 格式提升读写效率,再读取数据进行后续分析。
import pandas as pd
file_path = "input_data.xlsx"
parquet_path = "temp_data.parquet"
# 读取 Excel 文件并转换为 Parquet 格式
xls = pd.ExcelFile(file_path)
dfs = []
for sheet in xls.sheet_names:
df_sheet = pd.read_excel(xls, sheet_name=sheet)
dfs.append(df_sheet)
# 合并所有 sheet 数据并写入 Parquet 文件
if dfs:
df_all = pd.concat(dfs, ignore_index=True)
df_all.to_parquet(parquet_path, engine='pyarrow', index=False)
# 读取 Parquet 文件用于后续处理
df = pd.read_parquet(parquet_path)Step2 对目标文本字段中的特殊字符(如 #、-、数字)进行清洗,使用正则表达式仅保留中文字符。
import pandas as pd
import re
target_col = 'target_column' # 替换为实际需要清洗的列名
# 定义清洗函数
def clean_chinese_text(text):
if pd.isna(text):
return text
s = str(text)
# 提取所有中文字符(Unicode 范围:[一-鿿])
chinese_chars = re.findall(r'[一-鿿]', s)
cleaned = ''.join(chinese_chars)
return cleaned if cleaned else ''
# 应用清洗函数
if target_col in df.columns:
df[target_col] = df[target_col].apply(clean_chinese_text)Step3 将清洗后的数据保存为表格文件(.xlsx),并在报告中提供本地下载链接。
import pandas as pd
# 保存清洗后的数据为 .xlsx 文件
output_path = "cleaned_data.xlsx"
df.to_excel(output_path, index=False)
print("清洗后的数据已保存至:", output_path)
# 生成本地文件下载链接
print("下载链接:", f"file://{output_path}")Read more
name: invalid-data-cleaning description: "用于大规模Excel数据的预处理,通过统计总行数判断是否转换为Parquet格式以提升读写效率,并使用正则表达式清洗指定文本列(如仅保留中文字符),最后导出清洗后的文件并提供下载链接。"
Invalid_Data_Cleaning
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Skill Steps
Step1 根据总行数判断是否数据量过大,若满足条件,则将 Excel 文件转换为 Parquet 格式提升读写效率,再读取数据进行后续分析。
import pandas as pd
file_path = "input_data.xlsx"
parquet_path = "temp_data.parquet"
# 读取 Excel 文件并转换为 Parquet 格式
xls = pd.ExcelFile(file_path)
dfs = []
for sheet in xls.sheet_names:
df_sheet = pd.read_excel(xls, sheet_name=sheet)
dfs.append(df_sheet)
# 合并所有 sheet 数据并写入 Parquet 文件
if dfs:
df_all = pd.concat(dfs, ignore_index=True)
df_all.to_parquet(parquet_path, engine='pyarrow', index=False)
# 读取 Parquet 文件用于后续处理
df = pd.read_parquet(parquet_path)Step2 对目标文本字段中的特殊字符(如 #、-、数字)进行清洗,使用正则表达式仅保留中文字符。
import pandas as pd
import re
target_col = 'target_column' # 替换为实际需要清洗的列名
# 定义清洗函数
def clean_chinese_text(text):
if pd.isna(text):
return text
s = str(text)
# 提取所有中文字符(Unicode 范围:[一-鿿])
chinese_chars = re.findall(r'[一-鿿]', s)
cleaned = ''.join(chinese_chars)
return cleaned if cleaned else ''
# 应用清洗函数
if target_col in df.columns:
df[target_col] = df[target_col].apply(clean_chinese_text)Step3 将清洗后的数据保存为表格文件(.xlsx),并在报告中提供本地下载链接。
import pandas as pd
# 保存清洗后的数据为 .xlsx 文件
output_path = "cleaned_data.xlsx"
df.to_excel(output_path, index=False)
print("清洗后的数据已保存至:", output_path)
# 生成本地文件下载链接
print("下载链接:", f"file://{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

