/duplicate-value-coloring
对比Excel多表中的特定系数并对异常值进行颜色标记。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill duplicate-value-coloring --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
/duplicate-value-coloring
Context preview
The summary Claude sees to decide when to auto-load this skill.
对比Excel多表中的特定系数并对异常值进行颜色标记。
SKILL.md
duplicate-value-coloring.SKILL.mdname: excel-conditional-comparison-and-large-file-processing
description: "对比Excel多表中的特定系数并对异常值进行颜色标记。"
excel-conditional-comparison-and-large-file-processing
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 提取不同Sheet中特定维度(如“B1层”)的数值,并进行跨表逻辑对比。
# 定义提取逻辑:定位目标行(如包含'B1'的行)并获取其关联的系数
def extract_target_value(df, target_label='B1', label_col_idx=0, offset_row=1, value_col_idx=2):
"""
在指定列搜索标签,并返回其相对偏移位置的数值
"""
extracted_values = []
for idx, row in df.iterrows():
if str(row.iloc[label_col_idx]).strip() == target_label:
# 提取目标行下方或特定偏移位置的数值
if idx + offset_row < len(df):
val = df.iloc[idx + offset_row].iloc[value_col_idx]
extracted_values.append(val)
return extracted_values
# 分别读取需要对比的Sheet
sheet1_df = pd.read_excel(file_path, sheet_name='Sheet1')
sheet2_df = pd.read_excel(file_path, sheet_name='Sheet2')
# 提取系数(示例:B1层的换算系数)
# 注意:不同Sheet的列索引可能不同,需根据实际结构调整
s1_coeffs = extract_target_value(sheet1_df, target_label='B1', label_col_idx=1, value_col_idx=3)
s2_coeffs = extract_target_value(sheet2_df, target_label='B1', label_col_idx=0, value_col_idx=2)
# 汇总对比数据
comparison_results = []
target_standard = 0.6 # 预设的标准阈值
for val in s1_coeffs:
comparison_results.append({'source': 'Sheet1', 'value': val, 'is_anomaly': val != target_standard})
for val in s2_coeffs:
comparison_results.append({'source': 'Sheet2', 'value': val, 'is_anomaly': val != target_standard})Step2 生成对比报告,并使用 openpyxl 对异常值(非标准系数)进行红色高亮标记。
from openpyxl import Workbook
from openpyxl.styles import PatternFill
output_path = 'comparison_report.xlsx'
wb = Workbook()
ws = wb.active
ws.title = "Comparison Analysis"
# 写入表头
headers = ['数据来源', '提取数值', '是否符合标准', '状态标记']
ws.append(headers)
# 定义红色填充样式
red_fill = PatternFill(start_color='FF0000', end_color='FF0000', fill_type='solid')
# 遍历结果并写入,同时应用条件格式
for item in comparison_results:
status_text = '正常' if not item['is_anomaly'] else '异常(非0.6)'
row_data = [item['source'], item['value'], '是' if not item['is_anomaly'] else '否', status_text]
ws.append(row_data)
# 如果是异常值,将该行或特定单元格标红
if item['is_anomaly']:
curr_row = ws.max_row
for col_idx in range(1, len(headers) + 1):
ws.cell(row=curr_row, column=col_idx).fill = red_fill
# 保存结果并提供下载
wb.save(output_path)
print(f"Analysis complete. Report saved to: {output_path}")Read more
name: excel-conditional-comparison-and-large-file-processing description: "对比Excel多表中的特定系数并对异常值进行颜色标记。"
excel-conditional-comparison-and-large-file-processing
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 提取不同Sheet中特定维度(如“B1层”)的数值,并进行跨表逻辑对比。
# 定义提取逻辑:定位目标行(如包含'B1'的行)并获取其关联的系数
def extract_target_value(df, target_label='B1', label_col_idx=0, offset_row=1, value_col_idx=2):
"""
在指定列搜索标签,并返回其相对偏移位置的数值
"""
extracted_values = []
for idx, row in df.iterrows():
if str(row.iloc[label_col_idx]).strip() == target_label:
# 提取目标行下方或特定偏移位置的数值
if idx + offset_row < len(df):
val = df.iloc[idx + offset_row].iloc[value_col_idx]
extracted_values.append(val)
return extracted_values
# 分别读取需要对比的Sheet
sheet1_df = pd.read_excel(file_path, sheet_name='Sheet1')
sheet2_df = pd.read_excel(file_path, sheet_name='Sheet2')
# 提取系数(示例:B1层的换算系数)
# 注意:不同Sheet的列索引可能不同,需根据实际结构调整
s1_coeffs = extract_target_value(sheet1_df, target_label='B1', label_col_idx=1, value_col_idx=3)
s2_coeffs = extract_target_value(sheet2_df, target_label='B1', label_col_idx=0, value_col_idx=2)
# 汇总对比数据
comparison_results = []
target_standard = 0.6 # 预设的标准阈值
for val in s1_coeffs:
comparison_results.append({'source': 'Sheet1', 'value': val, 'is_anomaly': val != target_standard})
for val in s2_coeffs:
comparison_results.append({'source': 'Sheet2', 'value': val, 'is_anomaly': val != target_standard})Step2 生成对比报告,并使用 openpyxl 对异常值(非标准系数)进行红色高亮标记。
from openpyxl import Workbook
from openpyxl.styles import PatternFill
output_path = 'comparison_report.xlsx'
wb = Workbook()
ws = wb.active
ws.title = "Comparison Analysis"
# 写入表头
headers = ['数据来源', '提取数值', '是否符合标准', '状态标记']
ws.append(headers)
# 定义红色填充样式
red_fill = PatternFill(start_color='FF0000', end_color='FF0000', fill_type='solid')
# 遍历结果并写入,同时应用条件格式
for item in comparison_results:
status_text = '正常' if not item['is_anomaly'] else '异常(非0.6)'
row_data = [item['source'], item['value'], '是' if not item['is_anomaly'] else '否', status_text]
ws.append(row_data)
# 如果是异常值,将该行或特定单元格标红
if item['is_anomaly']:
curr_row = ws.max_row
for col_idx in range(1, len(headers) + 1):
ws.cell(row=curr_row, column=col_idx).fill = red_fill
# 保存结果并提供下载
wb.save(output_path)
print(f"Analysis complete. Report 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 - /outlier-coloring
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
Open skill - /threshold-cell-coloring
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
Open skill - /top-value-coloring
根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
Open skill - /data-bar-formatting
从带单位的字符串列中提取数值并清洗,生成包含直方图、饼图、条形图和累积分布图的多维度综合分布可视化图表,用于展示数据的集中趋势与分布特征。
Open skill

