agentleFS
julismanjulisman/virtual-worker/skills/data/contact-deduper/SKILL.md

Contact Deduper

Skill0 starsChanged 29 days agoApache-2.0View on GitHub

Deduplicate a contacts CSV — normalize emails and phones, group duplicates by shared email, phone, or near-identical name, write a merged CSV plus a merge report listing every group and conflict.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run shell("python3 dedupe_contacts.py <contacts.csv>").

    line 39
  2. Distinctive:

    Never silently drop data: every removed row appears in the merge report, and every conflicting field is listed with all its values.

    line 63
  3. Very specific:

    If shell is unavailable: for small lists (< ~100 rows) replicate the same rules manually via read_file/write_file with the same report …

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Contact Deduper

You dedupe one contacts CSV with scripts/dedupe_contacts.py: duplicates are grouped, the first row of each group is kept, and every merge and conflict is reported — nothing is dropped silently.

Inputs

  • Path to a contacts .csv in the working folder (if unnamed, glob for *.csv and confirm). It must have columns whose names contain name, email, and/or phone (case-insensitive; any subset works).
  • Output: <name>.deduped.csv next to the input (script default).

How grouping works (explain this to the user)

Two rows are the same contact when ANY of these match after normalization:

  • email (trimmed, lowercased), or
  • phone (digits only, compared on the last 10 digits — so 0812-345-678 90 and +62 812 3456 7890 match), or
  • name with difflib similarity >= 0.85 (catches Agus Salim vs Agoes Salim). Within a group the FIRST row is kept as the survivor; differing values in other rows are NOT merged into it — they are listed as conflicts for the user to decide.

Steps

  1. Peek at the header with read_file to confirm name/email/phone columns exist; warn which signals are missing (e.g. no phone column → phone matching is skipped).
  2. Fetch the script: load_skill_resource({"slug": "contact-deduper", "path": "scripts/dedupe_contacts.py"}), save it into the working folder with write_file as dedupe_contacts.py.
  3. Run shell("python3 dedupe_contacts.py <contacts.csv>"). It writes <name>.deduped.csv and prints the merge report: each duplicate group with all its original rows, plus every field where kept and dropped rows disagreed.
  4. Review the report for false merges (different people sharing an office phone or a generic email like info@) — call these out explicitly.
  5. Present the report. For conflicts, ask the user whether to keep the survivor's value or edit specific rows; apply requested fixes to the deduped CSV with edit_file.

Output format

Deduped <file>.csv → <file>.deduped.csv
Rows: <in> → <out> (<g> duplicate groups merged)

Groups (from the merge report):
- Group 1 (3 rows) kept: Agus Salim / agus@mail.com
  ! conflict in 'Phone': kept '0812...', also saw '+62 812...', '0812999...'
Possible false merges to check: <shared office phone, generic emails> or "none"
Open decisions for you: <conflict questions>

Rules

  • Never silently drop data: every removed row appears in the merge report, and every conflicting field is listed with all its values.
  • The survivor is always the FIRST row of the group — deterministic, no cleverness. The user decides conflict resolution, not you.
  • Generic emails (info@, admin@, sales@) and shared landlines can over-merge: always scan groups for different names glued together and flag them.
  • Original file is never modified.
  • If shell is unavailable: for small lists (< ~100 rows) replicate the same rules manually via read_file/write_file with the same report format; otherwise tell the user to enable shell.
  • Contact data is personal — keep it local; never deliver it off-machine unless the user explicitly asks for a specific delivery target.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.