excel-merge

excel-merge is a skill for Claude Code, Codex from YuYY2004/excel-skills. It costs 108 tokens per session (3,002 once invoked), scanned A, original, MIT.

A tool for combining multiple Excel files with the same column structure into one file.

In plain words
What is it for?
Use it to consolidate files from a folder or a selected list, keeping one header row and using the first file's formatting.
Why use it?
It checks that the files have matching headers before appending their rows, reducing errors from incompatible inputs.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to consolidate files from a folder or a selected list, keeping one header row and using the first file's formatting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yuyy2004/excel-skills/excel-merge
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add YuYY2004/excel-skills --skill excel-merge
Clone the repo
git clone --depth 1 https://github.com/YuYY2004/excel-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for excel-merge

README.md
[![agentmods](https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-merge/github.svg)](https://agentmods.dev/skills/yuyy2004/excel-skills/excel-merge)
Your own site
<a href="https://agentmods.dev/skills/yuyy2004/excel-skills/excel-merge"><img src="https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-merge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for excel-merge

Your own site · 80×15
<a href="https://agentmods.dev/skills/yuyy2004/excel-skills/excel-merge"><img src="https://agentmods.dev/badge/skills/yuyy2004/excel-skills/excel-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00108 $0.03002
Opus 5 $0.00054 $0.01501
Sonnet 5 $0.00022 $0.00600
Haiku 4.5 $0.00011 $0.00300

Measured 11d ago against content hash 9f175c875106, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

excel-merge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/skills/excel-merge/SKILL.md · 304 lines

How it starts

The opening of the file, as written. The whole thing — 304 lines — stays where its author put it; the contents beside it link to each section on GitHub.

This skill follows [[excel-safe-workflow]]. Small files use pandas concat + openpyxl write-back, large files use XML row append. 本技能遵循 [[excel-safe-workflow]]。小文件用 pandas concat + openpyxl 写回,大文件用 XML 行追加。

Excel Merge / Excel 合并

功能

文件1.xlsx (1000行)  ─┐
文件2.xlsx (800行)   ─┤
文件3.xlsx (1200行)  ─┼──→ 合并结果.xlsx (3000行)
...                  ─┘

第零步:需求解析

要素 用户说 默认值
文件列表 "把这三个文件合并" / "合并这个文件夹里的所有xlsx" 必须明确
输出文件 "输出到 merged.xlsx" 合并结果.xlsx
表头处理 第一行是表头,只保留一次

第一步:勘察——验证表头一致

import pandas as pd, os

FILES = ['文件1.xlsx', '文件2.xlsx', ...]

# 读表头
headers = {}
for fp in FILES:
    df = pd.read_excel(fp, nrows=0)
    headers[fp] = list(df.columns)

# 对比
base = headers[FILES[0]]
print(f'基准表头 ({len(base)} 列): {FILES[0]}')
all_match = True
for fp in FILES[1:]:
    h = headers[fp]
    if h != base:
        print(f'  ❌ {fp}: 表头不匹配!')
        # 列出差异
        only_base = set(base) - set(h)
        only_this = set(h) - set(base)
        if only_base: print(f'    缺少列: {only_base}')
        if only_this: print(f'    多余列: {only_this}')
        all_match = False

if not all_match:
    print('请确认是否强制合并(缺失列填空)')

第二步:规划

  • 确认所有文件表头一致(不一致时询问是否强制合并)
  • 估算总行数
  • 选引擎:总文件 <10MB 用 pandas,否则用 XML

第三步:执行

小文件 — pandas + openpyxl

import pandas as pd
from openpyxl import load_workbook
import shutil, os

FILES = ['文件1.xlsx', ...]
OUTPUT = '合并结果.xlsx'

# 读取并拼接
dfs = []
total = 0
for fp in FILES:
    df = pd.read_excel(fp)
    dfs.append(df)
    total += len(df)
    print(f'  {os.path.basename(fp)}: {len(df)} 行')

merged = pd.concat(dfs, ignore_index=True)
print(f'合并: {total} 行')

# 用第一个文件做模板,写回数据
shutil.copy2(FILES[0], OUTPUT)
wb = load_workbook(OUTPUT)
ws = wb.active

# 清空数据行(保留表头)
for row in range(2, ws.max_row + 1):
    for col in range(1, ws.max_column + 1):
        ws.cell(row=row, column=col).value = None

# 写入合并数据(从第2行开始)
for r_idx, row_data in merged.iterrows():
    for c_idx, val in enumerate(row_data):
        ws.cell(row=r_idx + 2, column=c_idx + 1).value = val
    if r_idx % 10000 == 0:
        print(f'  进度: {r_idx}/{total}')

wb.save(OUTPUT)
print(f'输出: {OUTPUT} ({total} 行)')

Read the full file on GitHub · 304 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 304 lines · 108 tokens per session scan A 9f175c875106

Subscribe to this mod's changes

excel-merge is a skill published in the GitHub repository YuYY2004/excel-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 108 tokens to every session and 3,002 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

spreadsheets

Use when creating, reading, or fixing spreadsheets (.xlsx, .csv). Covers formulas, formatting, charts, data cleaning, and handling the messy real-world files that are not actually tabular.

nimadorostkar/Claude-Skills-collection · 43 tokens

Excel工具

A guide for using Excel tools to read, write, and recalculate spreadsheet files. It includes a rule for treating the first row as data when a spreadsheet has no column headings.

XiaoMaColtAI/math-modeling-skill · 25 tokens

huashu-data-pro

All-in-one data analysis and productivity assistant. Covers end-to-end workflows for data processing, analytical insights, report writing, PPT creation, and data visualisation. Always approaches tasks from an expert perspective — thinks one step ahead for the user. Proactively confirms with the user when uncertain.…

Biraj2004/huashu-skills-english · 153 tokens

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or…

lingxling/awesome-skills-cn · 201 tokens

thinkcell

Generate, update, and automate think-cell charts and elements in PowerPoint and Excel. Use ANY time the user mentions think-cell, thinkcell, or .ppttc files, or asks to create/update PowerPoint charts following think-cell conventions (waterfall, Mekko, stacked column, Gantt, Harvey ball, scatter/bubble, etc.) …

zmazz/thinkcell · 213 tokens

bug-report-writer

Converts rough notes, casual descriptions, console errors, or quick observations into professional, complete bug reports — exported as a formatted Excel (.xlsx) file ready for Excel, Google Sheets, Jira, or Azure DevOps. Use this skill whenever the user mentions: "write a bug report", "log a bug", "report this issue"…

ShreyasBh02/AI-Skills-Collection · 186 tokens