Install any skill in seconds. Free to start, no credit card required.
Get Started Free →对多 Sheet Excel 进行智能清洗、跨表核对与可视化分析。。
.claude/skills/opensensenova-excel-smart-analysis-and-cleaning/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 89% | 0% |
Step1 对数据进行深度清洗,包括合并单元格填充(ffill)、正则化文本处理、RGB 颜色分量转换以及异常值识别。
pythonimport 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 执行跨表核对与多维度统计分析(如交叉分析、占比统计),并识别关键指标(如问题发现率)。
python# 跨表核对示例:核对 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 结果及下载链接。
pythonimport 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})")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 18,457 | 14,066 | -24% | 1 | 1 | 0% | 3,630 | 3,894 | +7% | 0 | 0 | — |
case-02 | fail→fail | 27,806 | 20,052 | -28% | 1 | 1 | 0% | 3,724 | 5,499 | +48% | 0 | 0 | — |
case-03 | pass→pass | 22,031 | 11,187 | -49% | 1 | 1 | 0% | 4,610 | 3,198 | -31% | 0 | 0 | — |
case-04 | pass→pass | 7,505 | 8,211 | +9% | 1 | 1 | 0% | 1,470 | 2,308 | +57% | 0 | 0 | — |
case-16 | pass→pass | 12,713 | 11,142 | -12% | 1 | 1 | 0% | 2,363 | 3,309 | +40% | 0 | 0 | — |
case-05 | pass→pass | 5,093 | 6,174 | +21% | 1 | 1 | 0% | 968 | 2,095 | +116% | 0 | 0 | — |
case-06 | pass→pass | 8,811 | 8,530 | -3% | 1 | 1 | 0% | 1,763 | 2,717 | +54% | 0 | 0 | — |
case-07 | fail→fail | 21,549 | 12,469 | -42% | 1 | 1 | 0% | 3,152 | 3,356 | +6% | 0 | 0 | — |
case-08 | fail→pass | 14,548 | 16,769 | +15% | 1 | 1 | 0% | 2,478 | 3,601 | +45% | 0 | 0 | — |
case-09 | pass→pass | 13,043 | 9,600 | -26% | 1 | 1 | 0% | 2,554 | 3,151 | +23% | 0 | 0 | — |
case-10 | pass→pass | 8,409 | 4,726 | -44% | 1 | 1 | 0% | 1,745 | 2,043 | +17% | 0 | 0 | — |
case-11 | pass→pass | 10,358 | 9,889 | -5% | 1 | 1 | 0% | 2,027 | 2,885 | +42% | 0 | 0 | — |
case-12 | fail→pass | 10,961 | 8,679 | -21% | 1 | 1 | 0% | 2,284 | 2,945 | +29% | 0 | 0 | — |
case-13 | pass→pass | 8,972 | 5,716 | -36% | 1 | 1 | 0% | 1,642 | 2,036 | +24% | 0 | 0 | — |
case-14 | fail→fail | 8,635 | 5,590 | -35% | 1 | 1 | 0% | 1,695 | 2,142 | +26% | 0 | 0 | — |
case-15 | pass→pass | 9,313 | 6,259 | -33% | 1 | 1 | 0% | 1,762 | 2,286 | +30% | 0 | 0 | — |
case-17 | fail→pass | 14,243 | 4,466 | -69% | 1 | 1 | 0% | 1,489 | 2,036 | +37% | 0 | 0 | — |
case-18 | fail→fail | 15,291 | 13,207 | -14% | 1 | 1 | 0% | 2,824 | 3,612 | +28% | 0 | 0 | — |
case-19 | fail→pass | 9,598 | 7,225 | -25% | 1 | 1 | 0% | 1,895 | 2,227 | +18% | 0 | 0 | — |
case-20 | pass→pass | 14,863 | 13,309 | -10% | 1 | 1 | 0% | 2,510 | 3,375 | +34% | 0 | 0 | — |
case-21 | pass→pass | 14,581 | 10,871 | -25% | 1 | 1 | 0% | 2,806 | 3,132 | +12% | 0 | 0 | — |
case-22 | fail→pass | 7,762 | 8,995 | +16% | 1 | 1 | 0% | 1,239 | 2,345 | +89% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.