crm-data-cleanup
FreeRuns bundled scriptsNot checkedCleans up CRM data from HubSpot, Salesforce, Pipedrive, Zoho, Close, Attio, or any CRM CSV export. Finds duplicate contacts and companies with fuzzy matching…
by OneWave-AI★ 454 GitHub starsAbout this skill
CRM Data Cleanup
This skill turns a messy CRM export into a merge plan a human can check, plus files that are ready to import. It works the same way for any vendor, because every CRM exports CSV.
Duplicate cleanup usually fails in one of three ways. Exact-email matching misses most
duplicates. Merging on shared inboxes like info@ fuses different people into one. And a
merge overwrites good values with blanks, losing history that can't be recovered. Most
CRM merges can't be undone, so this skill never merges anything itself. It plans, a
human approves, and the CRM's own merge tool does the merging.
Files
scripts/dedupe.py: the dry-run engine: normalize, block, score, cluster, pick a survivor, merge fields. Needspandasandrapidfuzz. Usesphonenumbersif it's installed.scripts/evaluate.py: scores a run against a labeled truth file (pairwise precision and recall).assets/fixture/: 41 synthetic contacts and 14 companies with planted duplicates, plustruth.csv.references/field-standards.md: normalization rules, state and country codes, lifecycle stage mapping, and flag meanings.references/vendor-notes.md: what merge keeps and destroys in each CRM, import quirks, and links to the official docs.references/safe-rollout.md: backup, sample merge, batch execution, and rollback.
Workflow
- Get the exports. Ask for a full-property CSV of contacts (or leads/people) and, when companies are in scope, companies (accounts/organizations) with record IDs. Record IDs matter because the cleaned files update records by ID.
- Back up first. Before any merge, confirm the user has a dated full export that
includes associations (
safe-rollout.md, Phase 0). A backup is the only real rollback. - Run the dry run:
The script detects columns from common vendor headers. Fix a wrong guess withpip install pandas rapidfuzz phonenumbers # phonenumbers is optional but preferred python scripts/dedupe.py --contacts contacts.csv --companies companies.csv \ --out plan/ --as-of 2026-09-22 [--default-region GB] [--gmail-canonical]--col email="E-mail 1"(or--company-colfor the companies file). - Check
summary.jsonbefore trusting any number. Confirmcolumn_map(a dealStagecolumn mapped as lifecycle skews everything),phone_engine, andwarnings, such as a block that was skipped for being too large. - Present the results by tier. Auto clusters: the count and a few examples. Review queue: every pair, with its reasons. Flags: counts by type. Associations: orphaned and missing links. Lead with the review queue, because it's where the user's judgment is needed.
- Walk the review queue with the data owner. Record
mergeorkeepin thedecisioncolumn. Then look at thekept_survivor_conflictrows inmerge_plan.csv: those are the values that will disappear. - Hand off the execution plan. Merge a sample of 5 to 10 clusters in the native tool,
verify, then do the rest in batches. After merging, import the cleaned files keyed on
record ID. Follow
safe-rollout.md, and checkvendor-notes.mdfor the specific CRM.
Merge-safety rules
- Never auto-merge on a role or shared identifier.
info@,sales@, a household inbox, or an office main line shows that records belong to the same organization, not that they're the same person. A shared identifier goes to review at most. - Auto-merge needs a strong ID plus a compatible name. A strong ID is an exact non-shared email, or an exact non-shared phone. A name match alone, even 100% with the same company, only goes to review, because two people named David Kim at one company is normal in large organizations.
- Re-check every pair inside a cluster. A=B by email and B=C by phone can chain two
different people together. The script demotes any cluster with an incompatible pair,
or with more than
--max-cluster(5) members, to review. - Never overwrite a non-empty value with an empty one. The survivor's value wins.
Blanks are filled from the best-ranked loser. Create date takes the earliest, last
activity the latest, and lifecycle stage the furthest along. Losing emails and phones
go to
additional_emailsandadditional_phones, so they aren't dropped. - Pick the survivor on purpose. The default order is
most_recent_activity, thenmost_complete, thenoldest_created. Addbusiness_emailfirst when the work address should be the primary email. In HubSpot and Pipedrive the primary's values win every conflict, so the survivor choice decides what's kept. - Gmail dot and plus folding is opt-in only (
--gmail-canonical). Google says dots don't matter for personal Gmail, but they do matter for Workspace domains. Applied by default, it would merge real, distinct mailboxes. - Stay a dry run. Never call a CRM API, and never write to the input files. A merge ru
Install crm-data-cleanup in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the crm-data-cleanup skill do?
Cleans up CRM data from HubSpot, Salesforce, Pipedrive, Zoho, Close, Attio, or any CRM CSV export. Finds duplicate contacts and companies with fuzzy matching (not just exact email), normalizes emails, phones to E.164, names, domains, states, and countries, flags stale, invalid, role, and test records, finds broken contact-company associations, and produces a reviewable merge plan plus import-ready files without touching the live CRM. Use this skill whenever the user wants to dedupe, find or merge duplicate contacts, merge companies or accounts, clean up a CRM, prep a CRM migration or re-import, or says the CRM export is a mess. Also use it when they mention only one symptom, like "the same person is in here three times", "half our leads are junk", or "our company records don't match".
How do I install the crm-data-cleanup skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the crm-data-cleanup skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic