Cleans a contact or customer list for import: names, e-mails, phones, dates, amounts, duplicates, with a report of every change.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Clean a contact or customer list (CSV or Excel) for import into a CRM, newsletter tool or accounting system, in ONE command, with a report of what was changed: trim spaces, fix capitalisation of names and companies, lowercase and validate e-mails, normalise phone numbers to +45 12 34 56 78, dates to 2026-10-24, Danish amounts (1.250,00) to numbers, split full names into first and last, drop blank rows and exact duplicates, flag probable duplicates (same e-mail or phone), rename or reorder columns. Use for: clean this list before I import it to HubSpot, fix the phone numbers, split the names, remove the duplicates, standardise the dates, ryd op i kundelisten. Triggers: clean up, cleanup, normalise, standardise, CRM import, duplicates, split name, phone format, date format, kundeliste, oprydning.
python3 /skills/data-cleanup/scripts/cleanup.py IN OUT [--report OUT.md] [options] reads a CSV
(any delimiter, any encoding it can guess) or the first sheet of an Excel file and writes the
cleaned list as .csv or .xlsx. Inputs in /work/in, results in /work/out. Prints one
OK … line with the counts, or one ERROR … line.
| Need | Options |
|---|---|
| The usual cleanup (default when no option is given) | --all = trim, names and companies to proper case, e-mails lowercased and validated, phones to +45 12 34 56 78, dates to ISO, amounts to numbers, blank rows and exact duplicates removed |
| Split a full-name column | --split-name "Full name" → First name, Last name (keeps the original unless --drop-original) |
| Phones for another country | --country 47 (default 45) |
| Flag likely duplicates instead of deleting | --flag-duplicates adds a Duplicate of row column (same e-mail or phone) |
| Which columns are what | guessed from headers and content; override with --email COL --phone COL --date COL --amount COL --name COL |
| Rename or reorder columns | --rename "E-mail=Email,Phone=Mobile", --columns "First name,Last name,Email,Mobile" |
| Only some steps | --trim --names --emails --phones --dates --amounts --dedupe (any subset instead of --all) |
The report (--report) lists every changed cell as before → after, the rows removed and why,
and the e-mails that failed validation (kept, flagged in an Issues column). Give the person the
cleaned file and the report.
SKILL.mdgate.jsonscripts/__pycache__/cleanup.cpython-311.pycscripts/__pycache__/cleanup.cpython-313.pycscripts/cleanup.pyWritten by Percerno, MIT licence.