Install any skill in seconds. Free to start, no credit card required.
Get Started Free →根据数据规模动态选择处理策略,对多表数据进行合并、统计筛选,并利用 openpyxl 实现关键指标的自动化样式高亮与格式化导出。
.claude/skills/opensensenova-top-value-coloring/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 28 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 91% | 0% |
Step1 提取并合并多个 Sheet 中的关键维度数据,进行数据清洗、类型转换及 Top-N 筛选。
python# 示例:合并两个 Sheet 的数据 # 读取 Sheet1 并清洗 df1 = pd.read_excel(file_path, sheet_name='Sheet1', header=None) # 假设 group_col 在第0列,value_col 在第2列 data1 = df1.iloc[20:, [0, 2]].copy() data1.columns = ['group_col', 'value_col_1'] data1['value_col_1'] = pd.to_numeric(data1['value_col_1'], errors='coerce') data1['group_col'] = data1['group_col'].ffill() # 处理合并单元格产生的缺失 # 读取 Sheet2 并清洗 df2 = pd.read_excel(file_path, sheet_name='Sheet2', header=None) data2 = df2.iloc[5:, [0, 1]].copy() data2.columns = ['value_col_2', 'value_col_3'] # 合并数据 merged_df = pd.concat([data1.reset_index(drop=True), data2.reset_index(drop=True)], axis=1) merged_df = merged_df.dropna(subset=['value_col_1']) # 筛选关键指标前五的数据 top_results = merged_df.nlargest(5, 'value_col_1').copy() # 占位示例:修正特定缺失值 # top_results.loc[top_results['group_col'].isna(), 'group_col'] = 'Default_Value'
Step2 使用 openpyxl 创建格式化表格,应用条件样式(如特定列标红、最大值高亮)并设置边框与对齐方式。
pythonfrom openpyxl import Workbook from openpyxl.styles import Font, PatternFill, Alignment, Border, Side output_path = 'analysis_report.xlsx' # 创建工作簿 wb = Workbook() ws = wb.active ws.title = 'Analysis_Results' # 定义样式 header_fill = PatternFill(start_color='4472C4', end_color='4472C4', fill_type='solid') header_font = Font(bold=True, color='FFFFFF', size=12) red_font = Font(color='FF0000', bold=True) # 用于高亮异常或关键值 green_fill = PatternFill(start_color='C6EFCE', end_color='C6EFCE', fill_type='solid') # 用于高亮最大值 thin_border = Border(left=Side(style='thin'), right=Side(style='thin'), top=Side(style='thin'), bottom=Side(style='thin')) center_align = Alignment(horizontal='center', vertical='center') # 写入表头 headers = ['Rank'] + list(top_results.columns) for col, header in enumerate(headers, 1): cell = ws.cell(row=1, column=col, value=header) cell.font = header_font cell.fill = header_fill cell.alignment = center_align cell.border = thin_border # 写入数据并应用样式 for idx, (_, row) in enumerate(top_results.iterrows(), 2): # 写入排名 ws.cell(row=idx, column=1, value=idx-1).border = thin_border # 写入各列数据 for col_idx, value in enumerate(row, 2): cell = ws.cell(row=idx, column=col_idx, value=value) cell.border = thin_border # 逻辑高亮示例:对特定列(如第4列)应用红色字体 if col_idx == 4: cell.font = red_font # 逻辑高亮示例:对超过阈值的值应用绿色填充 # if isinstance(value, (int, float)) and value > threshold_val: # cell.fill = green_fill # 自动调整列宽 column_widths = {'A': 8, 'B': 30, 'C': 15, 'D': 15, 'E': 18} for col, width in column_widths.items(): ws.column_dimensions[col].width = width # 设置数字格式 for row in range(2, ws.max_row + 1): ws.cell(row=row, column=3).number_format = '#,##0' ws.cell(row=row, column=4).number_format = '#,##0.00' wb.save(output_path) print(f"Formatted file saved to: {output_path}")
Step3 生成并输出结果文件的下载链接。
python# 必须使用 sandbox:/ 前缀生成下载链接 print(f"[下载分析结果]({f'sandbox:{output_path}'})")
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 28,096 | 16,776 | -40% | 1 | 1 | 0% | 6,217 | 4,699 | -24% | 0 | 0 | — |
case-02 | fail→pass | 28,160 | 10,283 | -63% | 1 | 1 | 0% | 6,209 | 3,429 | -45% | 0 | 0 | — |
case-03 | fail→pass | 21,693 | 13,189 | -39% | 1 | 1 | 0% | 3,574 | 3,250 | -9% | 0 | 0 | — |
case-04 | pass→pass | 6,168 | 4,689 | -24% | 1 | 1 | 0% | 1,421 | 1,992 | +40% | 0 | 0 | — |
case-05 | pass→pass | 9,871 | 8,499 | -14% | 1 | 1 | 0% | 1,891 | 2,738 | +45% | 0 | 0 | — |
case-06 | pass→pass | 14,946 | 15,671 | +5% | 1 | 1 | 0% | 3,320 | 4,713 | +42% | 0 | 0 | — |
case-07 | pass→pass | 2,982 | 3,211 | +8% | 1 | 1 | 0% | 517 | 1,695 | +228% | 0 | 0 | — |
case-08 | pass→pass | 6,944 | 3,007 | -57% | 1 | 1 | 0% | 1,106 | 1,650 | +49% | 0 | 0 | — |
case-09 | pass→pass | 10,371 | 9,924 | -4% | 1 | 1 | 0% | 1,998 | 3,220 | +61% | 0 | 0 | — |
case-10 | pass→pass | 12,870 | 11,412 | -11% | 1 | 1 | 0% | 1,975 | 3,365 | +70% | 0 | 0 | — |
case-11 | pass→pass | 10,620 | 9,264 | -13% | 1 | 1 | 0% | 2,116 | 2,787 | +32% | 0 | 0 | — |
case-12 | fail→pass | 9,536 | 6,020 | -37% | 1 | 1 | 0% | 1,942 | 2,462 | +27% | 0 | 0 | — |
case-13 | pass→pass | 11,896 | 7,962 | -33% | 1 | 1 | 0% | 2,490 | 2,697 | +8% | 0 | 0 | — |
case-14 | pass→pass | 10,695 | 5,398 | -50% | 1 | 1 | 0% | 2,028 | 2,107 | +4% | 0 | 0 | — |
case-15 | pass→pass | 12,336 | 17,136 | +39% | 1 | 1 | 0% | 1,995 | 3,769 | +89% | 0 | 0 | — |
case-16 | pass→pass | 8,664 | 8,616 | -1% | 1 | 1 | 0% | 1,805 | 2,550 | +41% | 0 | 0 | — |
case-17 | fail→pass | 5,684 | 3,816 | -33% | 1 | 1 | 0% | 969 | 1,855 | +91% | 0 | 0 | — |
case-18 | fail→pass | 6,987 | 7,783 | +11% | 1 | 1 | 0% | 1,446 | 2,354 | +63% | 0 | 0 | — |
case-19 | pass→pass | 7,893 | 6,854 | -13% | 1 | 1 | 0% | 1,416 | 2,277 | +61% | 0 | 0 | — |
case-20 | pass→pass | 6,652 | 4,370 | -34% | 1 | 1 | 0% | 1,322 | 2,006 | +52% | 0 | 0 | — |
case-21 | pass→pass | 5,322 | 4,420 | -17% | 1 | 1 | 0% | 1,038 | 1,920 | +85% | 0 | 0 | — |
case-22 | pass→pass | 4,454 | 2,530 | -43% | 1 | 1 | 0% | 801 | 1,619 | +102% | 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 +27 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.