
csv-excel-merger
Merges, appends, joins, and deduplicates multiple CSV, TSV, and Excel files (including multi-sheet workbooks) with pandas - mapping mismatched column names to one schema, normalizing keys, resolving conflicting values, tracking which file each row came from, and verifying the row math. Use when the user wants to combine spreadsheets or exports, stack monthly files, consolidate contact or lead lists, VLOOKUP-style join two sheets on an ID or email, or dedupe records across sources, even if they only say "put these together" or "clean up these lists into one".
- Installs
- 1.2K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/onewave-ai/claude-skills --skill csv-excel-merger- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads csv-excel-merger automatically when relevant.
- 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.
CSV/Excel Merger
Combine tabular files into one clean output without silently losing, duplicating, or corrupting rows.
Workflow
Copy this checklist and track progress:
- [ ] 1. Profile inputs
- [ ] 2. Choose append vs join
- [ ] 3. Map columns and normalize keys
- [ ] 4. Merge and resolve conflicts
- [ ] 5. Verify row math
- [ ] 6. Write output and report
-
Profile inputs. Run the bundled profiler first; it reports encoding, delimiter, rows, headers, candidate keys, and header overlap without changing anything:
python scripts/profile_inputs.py file1.csv file2.xlsxExcel files are profiled per sheet. Confirm with the user which sheets count if a workbook has more than one.
-
Choose the operation. This is the decision that most often goes wrong:
- Append (stack) - same kind of records from different sources or periods (Jan + Feb exports, three lead lists). Use
pd.concat, then dedupe. - Join (enrich) - different facts about the same entities (contacts + their deal values). Use
pd.mergeon a key. - Unsure? If the files share most columns, append. If they share only an ID column, join.
- Append (stack) - same kind of records from different sources or periods (Jan + Feb exports, three lead lists). Use
-
Map columns and normalize keys. Build an explicit
{original: unified}rename map per file (see references/merge_strategies.md for common variants) and show it to the user when any match is fuzzy. Normalize key columns before dedupe or join: strip whitespace, lowercase emails, strip non-digits from phones, unify date formats. Without this,A@x.comanda@x.comsurvive as two people. -
Merge. Read every file with
dtype=strso IDs, ZIP codes, and phone numbers keep leading zeros, then convert specific columns afterward.import pandas as pd frames = [] for path, rename in [("jan.csv", {"E-mail": "email"}), ("feb.xlsx", {"Email Address": "email"})]: df = (pd.read_excel(path, dtype=str) if path.endswith((".xlsx", ".xls")) else pd.read_csv(path, dtype=str, encoding="utf-8-sig", # use the profiler's encoding keep_default_na=False)) df = df.rename(columns=rename) df["email"] = df["email"].str.strip().str.lower() df["source_file"] = path # lineage for every row frames.append(df) combined = pd.concat(frames, ignore_index=True, sort=False) # Blank keys are not duplicates of each other: set them aside before deduping. has_key = combined["email"].fillna("") != "" # Later files win: list the most recent source last, then keep="last". deduped = combined[has_key].drop_duplicates(subset=["email"], keep="last") no_key = combined[~has_key] merged = pd.concat([deduped, no_key], ignore_index=True)For a join, make pandas enforce the relationship you expect so a duplicate key raises instead of multiplying rows:
out = pd.merge(contacts, deals, on="email", how="left", validate="one_to_one", indicator=True) unmatched = out[out["_merge"] == "left_only"]Conflict strategies (keep first/last/most complete, combine fields, flag for review) are in references/merge_strategies.md.
-
Verify before reporting. Never hand back a merge without checking it:
rows_in = sum(len(f) for f in frames) assert len(merged) > 0, "merge produced an empty frame" assert len(merged) <= rows_in, "more rows out than in: check the join keys" assert deduped["email"].is_unique, "duplicate keys remain after dedupe" print(f"in={rows_in} out={len(merged)} removed={rows_in - len(merged)} blank_keys={len(no_key)}") print(merged["source_file"].value_counts())Spot-check three removed duplicates by hand against the source files; the asserts prove the math, not that the right row won.
-
Write output and report. Use the layout in references/output_template.md.
- CSV for Excel users:
to_csv(path, index=False, encoding="utf-8-sig")(the BOM makes Excel read accents correctly). - Excel:
to_excel(path, index=False)with openpyxl installed. A sheet holds at most 1,048,576 rows; split or use CSV/Parquet beyond that. - Also write
conflicts_review.csvorunmatched.csvwhen those sets are non-empty.
- CSV for Excel users:
pandas version notes
Current pandas is 3.x (Python 3.11+). Differences that affect merges:
- Text columns default to the
strdtype, notobject. Checkpd.api.types.is_string_dtype(col)instead ofdtype == object. - Copy-on-Write is always on. Chained assignment such as
df[col][mask] = xnever updatesdf(pandas only warns); usedf.loc[mask, col] = x. - Parsed datetimes default to microsecond resolution. Call
.dt.as_unit("ns")before casting to integers if something downstream expects nanoseconds. pd.read_excel(..., engine="calamine")(needspython-calamine) reads large workbooks much faster than openpyxl.
The code in this skill also runs on pandas 2.2.
Failure modes to check for
- Row explosion on join - duplicate keys on both sides multiply rows.
validate=catches it. - Leading zeros lost - reading without
dtype=strturns01234into1234. - Excel-mangled values - long IDs already shown as
1.23E+15or dates already reformatted in the source file cannot be recovered by pandas; flag them. - Header rows not on line 1 - exports with a title block need
skiprows=orheader=. - Mixed encodings - one file in cp1252 among UTF-8 files shows up as
éartifacts. The profiler reports the encoding per file. - Silent column drops - a column present in only one file becomes mostly empty after append. Keep it and report its completeness; never drop data without saying so.
- Large files (over a few hundred MB) - read with
chunksize=or use Polars/DuckDB, and dedupe with a key set instead of loading everything into memory.
FAQ
What does the csv-excel-merger skill do?
Merges, appends, joins, and deduplicates multiple CSV, TSV, and Excel files (including multi-sheet workbooks) with pandas - mapping mismatched column names to one schema, normalizing keys, resolving conflicting values, tracking which file each row came from, and verifying the row math. Use when the user wants to combine spreadsheets or exports, stack monthly files, consolidate contact or lead lists, VLOOKUP-style join two sheets on an ID or email, or dedupe records across sources, even if they only say "put these together" or "clean up these lists into one".
How do I install csv-excel-merger?
Run npx skills add https://github.com/onewave-ai/claude-skills --skill csv-excel-merger 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/csv-excel-merger/ (personal) or .claude/skills/csv-excel-merger/ (project).
Which AI agents can use csv-excel-merger?
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 csv-excel-merger 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 csv-excel-merger?
It is published by onewave-ai in onewave-ai/claude-skills. It has 1,151 recorded installs.
More from onewave-ai/claude-skills
landing-page-copywriter
onewave-ai/claude-skills
Writes conversion-focused landing page copy - headlines, subheads, value propositions, feature and benefit blocks, social proof, FAQs, and CTA button text - using PAS, AIDA, or StoryBrand. Use when the user wants words for a landing page, sales page, product or pricing page, waitlist page, homepage hero, or ad-to-page flow, including rewriting weak copy, generating headline or CTA variants for A/B tests, or turning a product description into page sections. Use landing-page-optimizer instead for auditing an existing page's performance, and a frontend skill for building the page itself.
code-review-pro
onewave-ai/claude-skills
Performs a deep code review of files, modules, a diff, or a branch - finding security vulnerabilities (mapped to OWASP Top 10:2025), correctness bugs, performance problems, and maintainability issues - and returns severity-ranked findings with evidence and concrete fixes. Use when the user asks to review, audit, or sanity-check code, asks "is this safe", "what's wrong with this", "find bugs", or wants a security or performance pass before shipping. For posting line comments on a GitHub pull request, use git-pr-reviewer.
screenshot-to-code
onewave-ai/claude-skills
Turns a screenshot, mockup, Figma export, or photo of a UI into working front-end code - React + Tailwind CSS v4 by default, or Next.js, Vue, or plain HTML/CSS - matching layout, spacing, colors, and typography, then renders the result and compares it against the image to close visual gaps. Use whenever the user shares an image of a website, app screen, dashboard, component, or wireframe and wants it built, cloned, recreated, or "made real", or says "code this up", "build this design", or "match this screenshot".
technical-writer
onewave-ai/claude-skills
Writes and restructures technical documentation - READMEs, tutorials, how-to guides, user guides, architecture docs, onboarding guides, runbooks and SOPs, troubleshooting guides, release notes, and knowledge base articles - grounded in the actual code or product, with commands and examples verified where possible. Use when the user asks to document a project, feature, system, or process, write or fix a README, explain a codebase to new developers, turn notes into a guide, or make existing docs clearer. For endpoint-by-endpoint API reference or OpenAPI specs, use api-documentation-writer; for CLAUDE.md or AGENTS.md files, use claude-md-writer.
sports-betting-analyzer
onewave-ai/claude-skills
Analyze spreads, over/unders, prop bets. Historical trends, situational stats, value bet identification. For entertainment/education only.
css-animation-creator
onewave-ai/claude-skills
Create professional CSS animations, transitions, micro-interactions, and complex motion design. Use when adding animations, hover effects, loading states, page transitions, scroll animations, or any motion design work.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
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.
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".
prisma-database-setup
prisma/skills
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.
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.
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.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.