/kpi-metric-analysis
根据数据量自动选择读取策略(大文件转Parquet),提取关键指标进行单位一致性验证与排序分析,并输出可下载的结果表格。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill kpi-metric-analysis --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
/kpi-metric-analysis
Context preview
The summary Claude sees to decide when to auto-load this skill.
根据数据量自动选择读取策略(大文件转Parquet),提取关键指标进行单位一致性验证与排序分析,并输出可下载的结果表格。
SKILL.md
kpi-metric-analysis.SKILL.mdname: large-file-kpi-analysis
description: "根据数据量自动选择读取策略(大文件转Parquet),提取关键指标进行单位一致性验证与排序分析,并输出可下载的结果表格。"
Skill Steps
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 提取关键指标,进行物理量/指标的单位一致性验证计算,并对核心业务指标进行降序排列。
# 1. 物理量/指标单位一致性验证与计算 (保留公式结构示例)
col_numerator = 'numerator_col' # 示例:Mx (kN·m)
col_denominator = 'denominator_col' # 示例:Wx (cm³)
col_target = 'target_col' # 示例:sigma (MPa)
if col_numerator in data.columns and col_denominator in data.columns and col_target in data.columns:
# 单位换算示例:统一到标准单位后计算
data['den_converted'] = data[col_denominator] * 1e-6
data['num_converted'] = data[col_numerator] * 1e3
data['calc_result_pa'] = data['num_converted'] / data['den_converted']
data['calc_result_mpa'] = data['calc_result_pa'] / 1e6
# 容差验证
tolerance = 1e-6
data['is_valid'] = abs(data['calc_result_mpa'] - data[col_target]) < tolerance
print("单位一致性验证通过率:", data['is_valid'].mean() * 100, "%")
# 2. 提取关键指标并降序排列
group_col = 'group_col' # 示例:开发区名称
metric_col = 'metric_col' # 示例:实际到帐外资额
result_df = pd.DataFrame()
if group_col in data.columns and metric_col in data.columns:
result_df = data[[group_col, metric_col]].copy()
result_df = result_df.sort_values(metric_col, ascending=False).reset_index(drop=True)Step2 将分析与验证结果整理为最终的数据框,保存为 Excel 文件,并生成可供下载的链接。
output_path = 'analysis_result.xlsx'
# 确定最终输出的数据框
if not result_df.empty:
result_df_final = result_df
elif 'calc_result_mpa' in data.columns:
result_df_final = data[[col_numerator, col_denominator, col_target, 'calc_result_mpa', 'is_valid']].copy()
result_df_final.columns = ['分子指标', '分母指标', '目标比对值', '计算结果', '是否一致']
else:
result_df_final = data.head(100) # 默认输出前100行作为示例
# 保存为Excel文件
result_df_final.to_excel(output_path, index=False, engine='openpyxl')
print(f"分析结果已保存至: {output_path}")
# 生成下载链接
print(f"下载链接: [点击下载分析结果](./{output_path})")Read more
name: large-file-kpi-analysis description: "根据数据量自动选择读取策略(大文件转Parquet),提取关键指标进行单位一致性验证与排序分析,并输出可下载的结果表格。"
Skill Steps
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 提取关键指标,进行物理量/指标的单位一致性验证计算,并对核心业务指标进行降序排列。
# 1. 物理量/指标单位一致性验证与计算 (保留公式结构示例)
col_numerator = 'numerator_col' # 示例:Mx (kN·m)
col_denominator = 'denominator_col' # 示例:Wx (cm³)
col_target = 'target_col' # 示例:sigma (MPa)
if col_numerator in data.columns and col_denominator in data.columns and col_target in data.columns:
# 单位换算示例:统一到标准单位后计算
data['den_converted'] = data[col_denominator] * 1e-6
data['num_converted'] = data[col_numerator] * 1e3
data['calc_result_pa'] = data['num_converted'] / data['den_converted']
data['calc_result_mpa'] = data['calc_result_pa'] / 1e6
# 容差验证
tolerance = 1e-6
data['is_valid'] = abs(data['calc_result_mpa'] - data[col_target]) < tolerance
print("单位一致性验证通过率:", data['is_valid'].mean() * 100, "%")
# 2. 提取关键指标并降序排列
group_col = 'group_col' # 示例:开发区名称
metric_col = 'metric_col' # 示例:实际到帐外资额
result_df = pd.DataFrame()
if group_col in data.columns and metric_col in data.columns:
result_df = data[[group_col, metric_col]].copy()
result_df = result_df.sort_values(metric_col, ascending=False).reset_index(drop=True)Step2 将分析与验证结果整理为最终的数据框,保存为 Excel 文件,并生成可供下载的链接。
output_path = 'analysis_result.xlsx'
# 确定最终输出的数据框
if not result_df.empty:
result_df_final = result_df
elif 'calc_result_mpa' in data.columns:
result_df_final = data[[col_numerator, col_denominator, col_target, 'calc_result_mpa', 'is_valid']].copy()
result_df_final.columns = ['分子指标', '分母指标', '目标比对值', '计算结果', '是否一致']
else:
result_df_final = data.head(100) # 默认输出前100行作为示例
# 保存为Excel文件
result_df_final.to_excel(output_path, index=False, engine='openpyxl')
print(f"分析结果已保存至: {output_path}")
# 生成下载链接
print(f"下载链接: [点击下载分析结果](./{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

