MCPInstall
opensensenova avatar

excel-smart-analysis-and-cleaning

对多 Sheet 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-smart-analysis-and-cleaning
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads excel-smart-analysis-and-cleaning automatically when relevant.

  3. 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.

Step1 对数据进行深度清洗,包括合并单元格填充(ffill)、正则化文本处理、RGB 颜色分量转换以及异常值识别。

import re

def clean_data(df, target_col):
    # 1. 处理合并单元格:向下填充
    df[target_col] = df[target_col].ffill()
    
    # 2. 正则清洗:去除数字前缀、特殊字符及首尾空格
    def regex_clean(text):
        if not isinstance(text, str): return text
        text = re.sub(r'^\d+[\.\s\-]+', '', text) # 去除如 "1. " 的前缀
        text = re.sub(r'[^\u4e00-\u9fa5a-zA-Z0-9]', '', text) # 仅保留中英数
        return text.strip()
    
    df[target_col] = df[target_col].apply(regex_clean)
    
    # 3. 数值转换与 RGB 逻辑筛选(示例:筛选黑色/无色值)
    # 假设列名为 'Red', 'Green', 'Blue'
    rgb_cols = ['Red', 'Green', 'Blue']
    for col in rgb_cols:
        if col in df.columns:
            df[col] = pd.to_numeric(df[col], errors='coerce').fillna(0)
    
    if all(c in df.columns for c in rgb_cols):
        black_mask = (df['Red'] == 0) & (df['Green'] == 0) & (df['Blue'] == 0)
        df = df[black_mask]
        
    return df

# 遍历所有 sheet 进行清洗
cleaned_dfs = {name: clean_data(df, 'group_col') for name, df in df_dict.items()}

Step2 执行跨表核对与多维度统计分析(如交叉分析、占比统计),并识别关键指标(如问题发现率)。

# 跨表核对示例:核对 Sheet1 与 Sheet2 的数值合计
if 'Sheet1' in cleaned_dfs and 'Sheet2' in cleaned_dfs:
    val1 = cleaned_dfs['Sheet1']['amount'].sum()
    val2 = cleaned_dfs['Sheet2']['amount'].sum()
    print(f"核对结果: Sheet1({val1}) vs Sheet2({val2}), 差异: {val1 - val2}")

# 交叉分析与占比统计
target_df = pd.concat(cleaned_dfs.values(), ignore_index=True)
pivot_table = pd.crosstab(target_df['category_col'], target_df['status_col'])
pivot_table['占比'] = pivot_table.sum(axis=1) / pivot_table.sum().sum()

# 统计特定条件下的最大值(如配合比中的最大用量)
# df.groupby('id_col')['value_col'].max()

Step3 生成可视化图表,配置中英文字体支持,并输出带样式的 Excel 结果及下载链接。

import matplotlib.pyplot as plt
from openpyxl.styles import Font

# 1. 可视化配置
plt.rcParams['font.sans-serif'] = ['SimHei', 'DejaVu Sans'] # 支持中文
plt.rcParams['axes.unicode_minus'] = False

plt.figure(figsize=(10, 6), dpi=100)
target_df['category_col'].value_counts().plot(kind='bar', color='skyblue')
plt.title("数据分布统计")
plt.tight_layout()
plt.savefig("analysis_chart.png")

# 2. 样式化输出
output_path = "analysis_result.xlsx"
with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
    target_df.to_excel(writer, index=False, sheet_name='Result')
    
    # 针对特定单元格标红加粗(如数值异常项)
    workbook = writer.book
    worksheet = writer.sheets['Result']
    red_bold_font = Font(color="FF0000", bold=True)
    
    for row in range(2, worksheet.max_row + 1):
        # 假设第 3 列是需要检查的数值列
        if worksheet.cell(row=row, column=3).value > 100:
            worksheet.cell(row=row, column=1).font = red_bold_font

print(f"分析完成,结果已保存至: {output_path}")
# 生成下载链接(环境相关)
# print(f"Download link: [点击下载]({output_path})")

FAQ

What does the excel-smart-analysis-and-cleaning skill do?

对多 Sheet Excel 进行智能清洗、跨表核对与可视化分析。。

How do I install excel-smart-analysis-and-cleaning?

Run npx skills add https://github.com/opensensenova/sensenova-skills --skill excel-smart-analysis-and-cleaning 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-smart-analysis-and-cleaning/ (personal) or .claude/skills/excel-smart-analysis-and-cleaning/ (project).

Which AI agents can use excel-smart-analysis-and-cleaning?

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-smart-analysis-and-cleaning 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-smart-analysis-and-cleaning?

It is published by opensensenova in opensensenova/sensenova-skills. It has 0 recorded installs.

More from opensensenova/sensenova-skills

View all →
opensensenova avatar

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.

Media & Creative193 installs
opensensenova avatar

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 "可视化".

Frontend & Design182 installs
opensensenova avatar

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 才可不交付。

Frontend & Design174 installs
opensensenova avatar

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.

Docs & Writing166 installs
opensensenova avatar

sn-md-to-html-report

opensensenova/sensenova-skills

将 Markdown 报告、研究笔记、行业分析、战略备忘录、技术白皮书、复盘、周报等长文档,重组并创作为有编辑判断、网页美感和证据秩序的自包含 HTML 专题页。用户要求“转成 HTML”“网页化报告”“美化报告”“做成专题页”“便于分享”“提升可读性/设计感”“把报告做成网页”时使用。必须先写 plan.md 再写 HTML,保留原文事实断言和结论强度,不套模板,不做机械 Markdown 转换。

Frontend & Design166 installs
opensensenova avatar

sn-image-doctor

opensensenova/sensenova-skills

Environment diagnostic skill for SenseNova-Skills project. Checks that sn-image-base is properly installed and configured, validates dependencies and environment variables. Prompts user to configure missing required variables and saves them to .env file. After configuration, reloads environment and suggests agent restart if needed.

Media & Creative155 installs

Popular data & databases skills

View category →

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.

OfficialData & Databases493.1K installs
prisma avatar

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".

OfficialData & Databases441.5K installs

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.

OfficialData & Databases439.4K installs
prisma avatar

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.

OfficialData & Databases438.4K installs
prisma avatar

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.

OfficialData & Databases431.1K installs

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.

OfficialData & Databases425.8K installs