Install any skill in seconds. Free to start, no credit card required.
Get Started Free →读取多工作表Excel文件,自动处理合并单元格与数据清洗,进行交叉分组统计并生成带总计行的结果表,最后绘制支持中英文字体的美化柱状图,适用于多维度数据汇总与可视化分析。
.claude/skills/opensensenova-excel-bar-chart-visualization/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 158% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -29% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 10% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 22% | 0% |
> This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.
pythoncombined_df = pd.concat(data_frames, ignore_index=True) # 数据清洗:使用正则表达式统一命名 if '题型' in combined_df.columns: combined_df['题型'] = combined_df['题型'].astype(str).str.replace('判', '判断题', regex=False) # 处理合并单元格技巧1:前向填充 if '流程描述' in combined_df.columns: combined_df['流程描述'] = combined_df['流程描述'].fillna(method='ffill') # 处理合并单元格技巧2:通过逻辑判断与手动映射还原完整名称 group_col = '项目阶段' target_col = '控制要点' if group_col in combined_df.columns and target_col in combined_df.columns: project_stages, control_points = [], [] current_stage = None for _, row in combined_df.iterrows(): stage = row[group_col] point = row[target_col] if pd.notna(point) and point != target_col: if pd.notna(stage): current_stage = stage project_stages.append(current_stage) control_points.append(point) combined_df = pd.DataFrame({ group_col: project_stages, target_col: control_points })
python# 分类映射函数骨架 if group_col in combined_df.columns: stage_mapping = { '碎片值1': '标准分类A', '碎片值2': '标准分类A', '碎片值3': '标准分类B', '异常值': '其他' } combined_df[f'{group_col}_合并'] = combined_df[group_col].map(stage_mapping).fillna('其他') grouped_stats = combined_df.groupby(f'{group_col}_合并')[target_col].count().sort_values(ascending=False) elif '题目分类' in combined_df.columns and '题型' in combined_df.columns: # 交叉分析 crosstab/pivot grouped_stats = combined_df.groupby(['题目分类', '题型']).size().unstack(fill_value=0) else: grouped_stats = combined_df.groupby(combined_df.columns[0]).size()
pythonimport tempfile import os output_path = os.path.join(tempfile.gettempdir(), "统计结果.xlsx") # 计算占比并生成包含总计行的Excel文件 if isinstance(grouped_stats, pd.Series): result_df = pd.DataFrame({ '分类': grouped_stats.index, '数量': grouped_stats.values, '占比(%)': (grouped_stats.values / grouped_stats.sum() * 100).round(2) }) total_row = pd.DataFrame({ '分类': ['总计'], '数量': [grouped_stats.sum()], '占比(%)': [100.00] }) result_df = pd.concat([result_df, total_row], ignore_index=True) else: result_df = grouped_stats.reset_index() result_df.to_excel(output_path, index=False) # 生成临时可访问的下载链接 download_url = invoke_skill("file_service.get_download_url", {"file_path": output_path}) print(f"下载链接: {download_url}")
pythonimport matplotlib.pyplot as plt import matplotlib # 技巧:配置中英文字体以确保在不同系统中正常显示 matplotlib.rcParams['font.sans-serif'] = ['SimHei', 'DejaVu Sans'] matplotlib.rcParams['axes.unicode_minus'] = False stage_mapping_en = { '标准分类A': 'Standard Category A', '标准分类B': 'Standard Category B', '其他': 'Others' } if isinstance(grouped_stats, pd.Series): stage_counts_sorted = grouped_stats.sort_values(ascending=True) stage_counts_en = stage_counts_sorted.rename(index=stage_mapping_en) # 图表美化(dpi、颜色方案、标签位置) fig, ax = plt.subplots(figsize=(12, 8), dpi=120) colors = plt.cm.Set3(range(len(stage_counts_en))) bars = ax.barh(stage_counts_en.index, stage_counts_en.values, color=colors, edgecolor='black', linewidth=0.5) for bar, value in zip(bars, stage_counts_en.values): ax.text(bar.get_width() + (stage_counts_en.max() * 0.01), bar.get_y() + bar.get_height()/2, str(value), va='center', ha='left', fontsize=11, fontweight='bold') ax.set_xlabel('Count', fontsize=12, fontweight='bold') ax.set_ylabel('Category', fontsize=12, fontweight='bold') plt.tight_layout()
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 7,044 | 9,533 | +35% | 1 | 1 | 0% | 1,282 | 3,302 | +158% | 0 | 0 | — |
case-02 | fail→fail | 19,020 | 14,322 | -25% | 1 | 1 | 0% | 3,761 | 3,485 | -7% | 0 | 0 | — |
case-03 | fail→fail | 13,442 | 13,607 | +1% | 1 | 1 | 0% | 2,644 | 3,389 | +28% | 0 | 0 | — |
case-04 | pass→pass | 19,819 | 17,647 | -11% | 1 | 1 | 0% | 3,483 | 4,545 | +30% | 0 | 0 | — |
case-10 | pass→pass | 10,725 | 7,131 | -34% | 1 | 1 | 0% | 2,076 | 2,383 | +15% | 0 | 0 | — |
case-05 | pass→pass | 15,614 | 8,716 | -44% | 1 | 1 | 0% | 2,106 | 2,686 | +28% | 0 | 0 | — |
case-06 | pass→pass | 17,398 | 10,619 | -39% | 1 | 1 | 0% | 2,564 | 3,110 | +21% | 0 | 0 | — |
case-07 | pass→pass | 9,070 | 4,487 | -51% | 1 | 1 | 0% | 1,561 | 2,252 | +44% | 0 | 0 | — |
case-08 | pass→pass | 8,439 | 4,888 | -42% | 1 | 1 | 0% | 1,586 | 2,059 | +30% | 0 | 0 | — |
case-09 | fail→pass | 8,294 | 6,328 | -24% | 1 | 1 | 0% | 1,595 | 2,540 | +59% | 0 | 0 | — |
case-11 | pass→pass | 12,482 | 5,703 | -54% | 1 | 1 | 0% | 1,648 | 2,464 | +50% | 0 | 0 | — |
case-12 | pass→pass | 13,052 | 2,742 | -79% | 1 | 1 | 0% | 1,714 | 1,871 | +9% | 0 | 0 | — |
case-13 | fail→pass | 12,219 | 4,534 | -63% | 1 | 1 | 0% | 2,774 | 1,958 | -29% | 0 | 0 | — |
case-14 | fail→pass | 13,831 | 4,763 | -66% | 1 | 1 | 0% | 2,136 | 2,352 | +10% | 0 | 0 | — |
case-15 | pass→pass | 7,427 | 5,118 | -31% | 1 | 1 | 0% | 1,499 | 2,260 | +51% | 0 | 0 | — |
case-16 | fail→pass | 8,557 | 3,300 | -61% | 1 | 1 | 0% | 1,610 | 1,966 | +22% | 0 | 0 | — |
case-17 | fail→pass | 8,822 | 9,460 | +7% | 1 | 1 | 0% | 1,861 | 2,775 | +49% | 0 | 0 | — |
case-18 | pass→pass | 11,645 | 10,609 | -9% | 1 | 1 | 0% | 2,157 | 2,839 | +32% | 0 | 0 | — |
case-19 | pass→pass | 9,175 | 4,856 | -47% | 1 | 1 | 0% | 1,722 | 2,177 | +26% | 0 | 0 | — |
case-20 | fail→pass | 9,559 | 3,601 | -62% | 1 | 1 | 0% | 1,972 | 1,973 | +0% | 0 | 0 | — |
case-21 | pass→pass | 5,897 | 3,656 | -38% | 1 | 1 | 0% | 1,249 | 2,075 | +66% | 0 | 0 | — |
case-22 | pass→pass | 3,887 | 2,466 | -37% | 1 | 1 | 0% | 513 | 1,718 | +235% | 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 +32 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.