# B2B Lead Sheet Cleaner & Deduplicator

> Turn messy spreadsheets and B2B lead exports into a clean, deduplicated, formula-safe 3-sheet Excel workbook without touching your original file.

B2B Lead Sheet Cleaner & Deduplicator is a free AI agent skill on Agensi by Isaac Chavez, in Productivity. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Isaac Chavez](https://www.agensi.io/creators/isaac-chavez)
- Category: [Productivity](https://www.agensi.io/skills/productivity)
- Version: 1.0.0
- Last updated: 2026-12-05
- Security: scan passed (2026-12-05); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/b2b-lead-sheet-cleaner-deduplicator
- Tags: sales-lead-gen, data-databases, productivity, lead-generation, excel-export, data-cleaning, deduplication

## What it does

- Cleans messy spreadsheets and lead exports into a polished three-sheet Excel workbook
- Merges duplicate leads by email, phone, website, or business name without losing missing fields
- Logs every merged duplicate row and match rule in a transparent audit sheet
- Scores each lead as High, Medium, or Low contact readiness with color-coded badges
- Neutralizes unsafe spreadsheet formulas while leaving your original file untouched

## Who it's for

- **Sales reps and agencies with messy CRM exports:** Deduplicates prospect sheets, fills missing phone or email fields from merged rows, and scores outreach readiness. Try: "Clean and deduplicate messy_prospects.csv into a formatted Excel workbook with a duplicate log."
- **Founders and freelancers doing local B2B outreach:** Turns raw CSV, JSON, or Excel lists into filterable spreadsheets without installing heavy data libraries. Try: "Merge duplicate businesses in my_leads.xlsx and highlight High-readiness leads."
- **Operations managers auditing vendor directories:** Preserves the original file untouched and logs every merged duplicate row with the exact match rule used. Try: "Audit vendor_list.csv for duplicate contacts and save a clean 3-sheet Excel report."
- **Marketing analysts sharing external lead files:** Neutralizes unsafe spreadsheet formulas and removes N/A or blank rows before sending files to clients. Try: "Sanitize external_leads.json and export a clean Excel workbook with contact coverage metrics."

## About this skill

### The Problem

Exported lead lists from CRMs, web forms, events, and local directories are full of duplicate businesses, inconsistent phone formats, `N/A` placeholders, broken website links, and risky external text. Cleaning them manually in Excel wastes hours and risks silently losing contact fields that only existed on a duplicate row.

### How It Works

**B2B Lead Sheet Cleaner & Deduplicator** runs locally on your machine with zero paid tool fees and zero heavy dependencies (only lightweight `openpyxl`):

1. **Auto-detects your input format:** Reads `.csv` (comma, semicolon, tab, or pipe separated), `.json`, or `.xlsx` files — automatically mapping common English and Spanish lead column names.
2. **Cleans and normalizes every field:** Removes `N/A`/`null`/`TBD` placeholders, trims whitespace, validates email addresses, upgrades bare website domains to verified clickable `https://` links, and preserves accented international text.
3. **Deduplicates without losing data:** Matches duplicates by Record/Place ID, Email, Phone, Website Domain, or accent-folded Business Name + Address, merging missing contact fields from duplicate rows into the kept record.
4. **Scores Contact Readiness:** Tags each unique lead as **High** (2+ contact channels), **Medium** (1 channel), or **Low** (0 channels) with color-coded cells.
5. **Protects your workbook and original file:** Neutralizes unsafe spreadsheet formulas (`=`, `+`, `-`, `@`, tab/CR), strips illegal control characters, and refuses to overwrite your original file.

### What You Get (3 Formatted Worksheets)

- **`Clean Leads`** — Styled navy header, frozen top row, auto-filter, alternating row shading, verified clickable links, numeric ratings/reviews, and color-coded Contact Readiness tiers.
- **`Duplicates Merged`** — Transparent audit log showing every duplicate input row number, which lead it merged into, which rule matched, and which missing fields were rescued.
- **`Summary`** — Total raw rows, unique leads kept, duplicates merged, empty rows skipped, Email/Phone/Website coverage percentages, readiness breakdown, and top cities.

### Example Prompts (English & Español)

- *"Clean and deduplicate `raw_prospects.csv` and export a formatted Excel workbook with a duplicate audit log."*
- *"Merge duplicate businesses in `leads_export.xlsx`, score contact readiness, and save to `clean_leads.xlsx`."*
- *"Limpia y elimina duplicados de `prospectos_sucios.csv` y genera un Excel formateado con hoja de resumen y registro de duplicados."*

## Requires

- Python 3.9+
- openpyxl

## Known limitations

Cleans and deduplicates local files only—does not search the web or enrich missing emails/phones from external databases. Reads the active (first) worksheet when given an Excel (.xlsx) input file. Requires Python 3.9+ and openpyxl locally.

## Technical details

- **Standalone script:** `scripts/clean_leads.py` (19.5 KB, Python stdlib + `openpyxl` only—no `pandas` or `numpy` required). Zero network calls, zero subprocesses, zero environment variable reads.
- **Supported inputs:** `.csv` (auto-detects `,`, `;`, tab, `|` delimiters + UTF-8 BOM), `.json` (lists or objects with `results`/`leads`/`items`), and `.xlsx` (active sheet).
- **Files written:** Only the new `.xlsx` output path (refuses to overwrite the input file).
- **One-time setup:** `pip install openpyxl` (Python 3.9+).

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the B2B Lead Sheet Cleaner & Deduplicator skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Does this skill require any paid tool credits or API keys?

No. This skill is 100% free and runs completely offline on your machine using Python 3.9+ and openpyxl—no API keys or paid tool credits required.

### Will it overwrite my original CSV or Excel file?

No. The script always writes a new Excel workbook and refuses to overwrite your input file, so your original CSV, JSON, or Excel export stays untouched.

### How does duplicate merging avoid losing phone numbers or emails?

When a duplicate row is detected by email, phone, website domain, or business name and address, any missing contact fields on the kept lead are automatically filled in from the duplicate before removing it, and every merge is recorded on the Duplicates Merged sheet.

### What do I need installed locally?

Only Python 3.9+ and openpyxl (pip install openpyxl). Heavy libraries like pandas or numpy are not needed.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
