/range-filtering
根据多维数值条件筛选 Excel 数据并导出结果,支持大规模数据的自动性能优化处理。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill range-filtering --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
/range-filtering
Context preview
The summary Claude sees to decide when to auto-load this skill.
根据多维数值条件筛选 Excel 数据并导出结果,支持大规模数据的自动性能优化处理。
SKILL.md
range-filtering.SKILL.mdname: excel-conditional-filtering-optimization
description: "根据多维数值条件筛选 Excel 数据并导出结果,支持大规模数据的自动性能优化处理。"
Excel_Conditional_Filtering_Optimization
> **Note**: This sub-skill covers one step of the Excel analysis workflow. For the full pipeline (file reading, row counting, large-file optimization, export), see the parent workflow SKILL.md.
Step1 读取 Excel 文件中所有工作表的数据,统计各表行数并汇总,用于评估数据规模。
import pandas as pd
file_path = "input_data.xlsx"
# 读取所有 sheet,统计行数
xls = pd.ExcelFile(file_path)
print("Sheet names:", xls.sheet_names)
total_rows = 0
sheet_details = []
for sheet in xls.sheet_names:
df_temp = pd.read_excel(file_path, sheet_name=sheet)
row_count = len(df_temp)
sheet_details.append({"sheet": sheet, "rows": row_count})
total_rows += row_count
print(f"Sheet details: {sheet_details}")
print(f"Total rows across all sheets: {total_rows}")Step2 对目标数据进行清洗,处理表头偏移,并将关键列转换为数值类型以确保计算准确。
# 读取目标数据表
target_sheet = 'Sheet1'
df = pd.read_excel(file_path, sheet_name=target_sheet, header=0)
# 处理可能的子表头或空行偏移(示例:跳过第一行)
# df = df.iloc[1:].reset_index(drop=True)
# 统一设置列名(根据实际业务逻辑调整占位符)
# df.columns = ['col_1', 'col_2', 'col_3', 'target_id', 'val_a', 'val_b', 'val_c']
# 强制转换数值列,处理非数值数据为 NaN
numeric_cols = ['val_a', 'val_b', 'val_c', 'target_id']
for col in numeric_cols:
if col in df.columns:
df[col] = pd.to_numeric(df[col], errors='coerce')
# 处理合并单元格(如有)
# df = df.ffill()Step3 执行多维度条件筛选逻辑,提取符合特定数值特征的唯一记录。
# 筛选逻辑:例如 val_a, val_b, val_c 同时满足特定阈值(如均为 0)
mask = (df['val_a'] == 0) & (df['val_b'] == 0) & (df['val_c'] == 0)
filtered_df = df[mask][['target_id', 'val_a', 'val_b', 'val_c']]
# 提取唯一编号并去除空值
result = filtered_df.drop_duplicates().dropna(subset=['target_id']).reset_index(drop=True)
Step4 将筛选后的结果保存为新的 Excel 文件,并生成下载链接。
output_path = "filtered_analysis_result.xlsx"
# 格式化输出列名
result.columns = ['Target_Index', 'Value_A', 'Value_B', 'Value_C']
# 导出文件
result.to_excel(output_path, index=False)
# 打印结果摘要与下载路径
print(f"Filtered records count: {len(result)}")
print(f"Result saved to: {output_path}")Read more
name: excel-conditional-filtering-optimization description: "根据多维数值条件筛选 Excel 数据并导出结果,支持大规模数据的自动性能优化处理。"
Excel_Conditional_Filtering_Optimization
> **Note**: This sub-skill covers one step of the Excel analysis workflow. For the full pipeline (file reading, row counting, large-file optimization, export), see the parent workflow SKILL.md.
Step1 读取 Excel 文件中所有工作表的数据,统计各表行数并汇总,用于评估数据规模。
import pandas as pd
file_path = "input_data.xlsx"
# 读取所有 sheet,统计行数
xls = pd.ExcelFile(file_path)
print("Sheet names:", xls.sheet_names)
total_rows = 0
sheet_details = []
for sheet in xls.sheet_names:
df_temp = pd.read_excel(file_path, sheet_name=sheet)
row_count = len(df_temp)
sheet_details.append({"sheet": sheet, "rows": row_count})
total_rows += row_count
print(f"Sheet details: {sheet_details}")
print(f"Total rows across all sheets: {total_rows}")Step2 对目标数据进行清洗,处理表头偏移,并将关键列转换为数值类型以确保计算准确。
# 读取目标数据表
target_sheet = 'Sheet1'
df = pd.read_excel(file_path, sheet_name=target_sheet, header=0)
# 处理可能的子表头或空行偏移(示例:跳过第一行)
# df = df.iloc[1:].reset_index(drop=True)
# 统一设置列名(根据实际业务逻辑调整占位符)
# df.columns = ['col_1', 'col_2', 'col_3', 'target_id', 'val_a', 'val_b', 'val_c']
# 强制转换数值列,处理非数值数据为 NaN
numeric_cols = ['val_a', 'val_b', 'val_c', 'target_id']
for col in numeric_cols:
if col in df.columns:
df[col] = pd.to_numeric(df[col], errors='coerce')
# 处理合并单元格(如有)
# df = df.ffill()Step3 执行多维度条件筛选逻辑,提取符合特定数值特征的唯一记录。
# 筛选逻辑:例如 val_a, val_b, val_c 同时满足特定阈值(如均为 0) mask = (df['val_a'] == 0) & (df['val_b'] == 0) & (df['val_c'] == 0) filtered_df = df[mask][['target_id', 'val_a', 'val_b', 'val_c']] # 提取唯一编号并去除空值 result = filtered_df.drop_duplicates().dropna(subset=['target_id']).reset_index(drop=True)
Step4 将筛选后的结果保存为新的 Excel 文件,并生成下载链接。
output_path = "filtered_analysis_result.xlsx"
# 格式化输出列名
result.columns = ['Target_Index', 'Value_A', 'Value_B', 'Value_C']
# 导出文件
result.to_excel(output_path, index=False)
# 打印结果摘要与下载路径
print(f"Filtered records count: {len(result)}")
print(f"Result saved to: {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

