
excel-outlier-detection-and-highlighting
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
- Installs
- 0
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/opensensenova/sensenova-skills --skill excel-outlier-detection-and-highlighting- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads excel-outlier-detection-and-highlighting automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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):
continue
Step2 遍历指定 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}")
FAQ
What does the excel-outlier-detection-and-highlighting skill do?
识别 Excel 中的超限数值与错误单元格并进行高亮标注。
How do I install excel-outlier-detection-and-highlighting?
Run npx skills add https://github.com/opensensenova/sensenova-skills --skill excel-outlier-detection-and-highlighting in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/excel-outlier-detection-and-highlighting/ (personal) or .claude/skills/excel-outlier-detection-and-highlighting/ (project).
Which AI agents can use excel-outlier-detection-and-highlighting?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is excel-outlier-detection-and-highlighting safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains excel-outlier-detection-and-highlighting?
It is published by opensensenova in opensensenova/sensenova-skills. It has 0 recorded installs.
More from opensensenova/sensenova-skills
sn-image-base
opensensenova/sensenova-skills
Base-layer skill for the SenseNova-Skills project, providing low-level APIs for image generation, recognition (VLM), and text optimization (LLM). This skill does not preprocess inputs; it only calls backend services and returns results. This skill is not user-facing and is intended for upper-layer skills only.
sn-infographic
opensensenova/sensenova-skills
Generates professional infographics with various layout types and visual styles. Analyzes content, recommends layout and style, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", "visual summary", or "可视化".
sn-ppt-standard
opensensenova/sensenova-skills
仅在 sn-ppt-entry 与 sn-ppt-story 已准备绝对 DECKDIR 和 outline.md 后使用;生成每页独立 HTML(1600×900)、渲染 PNG、逐页讲稿、present.html,并按 staticpostprocess 选择生成由 Standard 自有 exporter 转换的 PPTX。present.html 始终是必交付产物,缺失即技术故障,不得交付;staticpostprocess 含 pptx 时 PPTX 同为必交付产物(缺一即技术故障),且只能由 Standard 自有 exporter 生成;仅当用户明确要求只要 HTML(staticpostprocess 为 [])时,PPTX 才可不交付。
sn-md-to-html-report
opensensenova/sensenova-skills
将 Markdown 报告、研究笔记、行业分析、战略备忘录、技术白皮书、复盘、周报等长文档,重组并创作为有编辑判断、网页美感和证据秩序的自包含 HTML 专题页。用户要求“转成 HTML”“网页化报告”“美化报告”“做成专题页”“便于分享”“提升可读性/设计感”“把报告做成网页”时使用。必须先写 plan.md 再写 HTML,保留原文事实断言和结论强度,不套模板,不做机械 Markdown 转换。
sn-ppt-entry
opensensenova/sensenova-skills
Use when a user asks to create a presentation, slide deck, PPT, or PPTX from a query and optional files, or to resume an existing SenseNova presentation task.
sn-image-resume
opensensenova/sensenova-skills
Generates a designed portfolio-resume image from resume content provided in conversation text. Extracts optional style instructions, converts the resume into a fixed portfolio-resume layout prompt, and generates the final image through sn-image-base. Use when user asks to create "resume image", "portfolio resume", "简历图", "简历海报", or "个人简历视觉设计".
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-postgres-setup
prisma/skills
Obtain or reuse a Prisma Postgres database and connect an application. Use when the user needs a database and has none configured ("I need a database", "add a Postgres database", "set up a database for this app"), runs or mentions create-db or npx create-db, or asks to set up or connect Prisma Postgres, including in v0 and the Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; reuses an existing connection first and honors an explicit provider, driver, alternative ORM, or database-only choice.