/outlier-coloring
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
$ npx -y skills add OpenSenseNova/SenseNova-Skills --skill outlier-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
/outlier-coloring
Context preview
The summary Claude sees to decide when to auto-load this skill.
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
SKILL.md
outlier-coloring.SKILL.mdname: excel-outlier-detection-and-highlighting
description: "识别 Excel 中的超限数值与错误单元格并进行高亮标注。"
Outlier_Coloring
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 使用正则表达式提取限值,并结合上下文逻辑识别总传热系数超限的行。
import re
exceed_rows = []
target_col = 0 # 假设特征列在第一列
value_col = 8 # 假设数值列在第九列
for i, row in df.iterrows():
row_str = str(row.iloc[target_col]) if pd.notna(row.iloc[target_col]) else ""
# 正则表达式精准提取限值,例如 "限值0.5"
if '限值' in row_str:
match = re.search(r'限值([\d.]+)', row_str)
if match:
current_limit = float(match.group(1))
# 识别计算结果行并进行对比
if '共计' in row_str:
try:
actual_val = float(row.iloc[value_col])
# 向上回溯寻找结构名称(实战技巧:遍历还原上下文)
structure_name = "未知结构"
for j in range(i-1, max(0, i-15), -1):
prev_val = str(df.iloc[j, 0])
if any(kw in prev_val for kw in ['系数', '围护']):
structure_name = prev_val
break
# 提取最近的限值进行对比
limit_val = None
for j in range(i-1, max(0, i-15), -1):
check_str = ' '.join([str(x) for x in df.iloc[j, :] if pd.notna(x)])
limit_match = re.search(r'限值([\d.]+)', check_str)
if limit_match:
limit_val = float(limit_match.group(1))
break
if limit_val and actual_val > limit_val:
exceed_rows.append({
'row_index': i,
'name': structure_name,
'value': actual_val,
'limit': limit_val,
'diff': actual_val - limit_val
})
except (ValueError, TypeError):
continueStep2 遍历指定 Sheet 查找包含 '#DIV/' 等异常错误的单元格,并记录坐标。
# 针对特定 Sheet(如 Sheet3)检测公式错误
ws_error = wb['Sheet3']
error_cells = []
for row in ws_error.iter_rows(min_row=1, max_row=ws_error.max_row):
for cell in row:
if cell.value is not None:
val_str = str(cell.value)
# 识别 Excel 除零错误或其他异常标识
if '#DIV/' in val_str:
error_cells.append({
'coord': cell.coordinate,
'val': cell.value
})Step3 对识别出的超限行和异常单元格进行红色高亮标注,并保存结果。
from openpyxl.styles import PatternFill
# 定义红色填充样式
red_fill = PatternFill(start_color='FF0000', end_color='FF0000', fill_type='solid')
# 标注超限行(注意:Excel 行号 = pandas 索引 + 1)
# 假设在第一个 Sheet 中标注
ws_main = wb[wb.sheetnames[0]]
for item in exceed_rows:
excel_row = item['row_index'] + 1
for col in range(1, ws_main.max_column + 1):
ws_main.cell(row=excel_row, column=col).fill = red_fill
# 标注异常单元格
for err in error_cells:
ws_error[err['coord']].fill = red_fill
output_path = "highlighted_report.xlsx"
wb.save(output_path)Step4 汇总超限数据生成分析报告,并提供下载链接。
# 创建汇总 DataFrame
summary_df = pd.DataFrame(exceed_rows)
if not summary_df.empty:
summary_df['Excel行号'] = summary_df['row_index'] + 1
summary_df = summary_df[['Excel行号', 'name', 'value', 'limit', 'diff']]
summary_df.columns = ['行号', '结构名称', '实测值', '限值', '超出值']
summary_path = "outlier_summary.xlsx"
summary_df.to_excel(summary_path, index=False)
# 输出下载链接格式
print(f"处理完成。结果文件:{output_path}")
print(f"汇总报告:{summary_path}")Read more
name: excel-outlier-detection-and-highlighting description: "识别 Excel 中的超限数值与错误单元格并进行高亮标注。"
Outlier_Coloring
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
Step1 使用正则表达式提取限值,并结合上下文逻辑识别总传热系数超限的行。
import re
exceed_rows = []
target_col = 0 # 假设特征列在第一列
value_col = 8 # 假设数值列在第九列
for i, row in df.iterrows():
row_str = str(row.iloc[target_col]) if pd.notna(row.iloc[target_col]) else ""
# 正则表达式精准提取限值,例如 "限值0.5"
if '限值' in row_str:
match = re.search(r'限值([\d.]+)', row_str)
if match:
current_limit = float(match.group(1))
# 识别计算结果行并进行对比
if '共计' in row_str:
try:
actual_val = float(row.iloc[value_col])
# 向上回溯寻找结构名称(实战技巧:遍历还原上下文)
structure_name = "未知结构"
for j in range(i-1, max(0, i-15), -1):
prev_val = str(df.iloc[j, 0])
if any(kw in prev_val for kw in ['系数', '围护']):
structure_name = prev_val
break
# 提取最近的限值进行对比
limit_val = None
for j in range(i-1, max(0, i-15), -1):
check_str = ' '.join([str(x) for x in df.iloc[j, :] if pd.notna(x)])
limit_match = re.search(r'限值([\d.]+)', check_str)
if limit_match:
limit_val = float(limit_match.group(1))
break
if limit_val and actual_val > limit_val:
exceed_rows.append({
'row_index': i,
'name': structure_name,
'value': actual_val,
'limit': limit_val,
'diff': actual_val - limit_val
})
except (ValueError, TypeError):
continueStep2 遍历指定 Sheet 查找包含 '#DIV/' 等异常错误的单元格,并记录坐标。
# 针对特定 Sheet(如 Sheet3)检测公式错误
ws_error = wb['Sheet3']
error_cells = []
for row in ws_error.iter_rows(min_row=1, max_row=ws_error.max_row):
for cell in row:
if cell.value is not None:
val_str = str(cell.value)
# 识别 Excel 除零错误或其他异常标识
if '#DIV/' in val_str:
error_cells.append({
'coord': cell.coordinate,
'val': cell.value
})Step3 对识别出的超限行和异常单元格进行红色高亮标注,并保存结果。
from openpyxl.styles import PatternFill
# 定义红色填充样式
red_fill = PatternFill(start_color='FF0000', end_color='FF0000', fill_type='solid')
# 标注超限行(注意:Excel 行号 = pandas 索引 + 1)
# 假设在第一个 Sheet 中标注
ws_main = wb[wb.sheetnames[0]]
for item in exceed_rows:
excel_row = item['row_index'] + 1
for col in range(1, ws_main.max_column + 1):
ws_main.cell(row=excel_row, column=col).fill = red_fill
# 标注异常单元格
for err in error_cells:
ws_error[err['coord']].fill = red_fill
output_path = "highlighted_report.xlsx"
wb.save(output_path)Step4 汇总超限数据生成分析报告,并提供下载链接。
# 创建汇总 DataFrame
summary_df = pd.DataFrame(exceed_rows)
if not summary_df.empty:
summary_df['Excel行号'] = summary_df['row_index'] + 1
summary_df = summary_df[['Excel行号', 'name', 'value', 'limit', 'diff']]
summary_df.columns = ['行号', '结构名称', '实测值', '限值', '超出值']
summary_path = "outlier_summary.xlsx"
summary_df.to_excel(summary_path, index=False)
# 输出下载链接格式
print(f"处理完成。结果文件:{output_path}")
print(f"汇总报告:{summary_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 - /threshold-cell-coloring
根据Excel总行数自动切换Parquet加速读取,计算特定维度的时间序列平均值,并使用openpyxl输出带有条件格式(如低于均值标绿)和自定义样式的分析报告。
Open skill - /top-value-coloring
根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
Open skill - /data-bar-formatting
从带单位的字符串列中提取数值并清洗,生成包含直方图、饼图、条形图和累积分布图的多维度综合分布可视化图表,用于展示数据的集中趋势与分布特征。
Open skill

