# crm-dedupe-dk: a Claude skill and a test kit for duplicate companies in a Danish CRM

From https://brinvik.com. Free to use and change, no warranty.

## What is in the zip

- `crm-dedupe-dk/SKILL.md`, the skill. It tells Claude how to find duplicate companies in a Danish CRM
  export: the CVR number is the company, different CVR numbers are never merged, æ/ø/å are compared with
  ae/oe/aa, A/S and AS and Aktieselskab are the same, gmail.com and hotmail.dk say nothing about a company,
  and a domain shared by several CVR numbers is a group, not one record. It proposes merges and never
  makes them on its own.
- `test-kit/crm-export.csv`, a fictional export of 240 Danish companies, shaped like a HubSpot companies
  export. Every company is invented. Every CVR number is between 90000000 and 99999999, a range the Danish
  register has not issued, so none of them points at a real firm.
- `test-kit/answer_key.json`, which rows are the same company (10 groups, 12 duplicate pairs) and which
  look alike but are not (10 trap groups).
- `test-kit/score.py`, which scores any `merge-groups.json` against the key: duplicate pairs found, wrong
  merges, traps hit. `naive.py` is the "same name or same domain" rule, for comparison.
- `test-kit/prompt-da.txt`, the exact request every test run got.

## How to use the skill

- In Claude (claude.ai, the desktop app, or the Claude sidebar in Google Sheets, which uses the skills
  your Claude account has): add the `crm-dedupe-dk` folder as a skill. Then ask Claude to find duplicate
  companies in your sheet. If you are on a smaller model, name the skill in the request: in our test,
  Claude Haiku 4.5 never opened it on its own.
- In Claude Code: put the folder in `.claude/skills/`.

## How to test your own setup before you trust it

1. Give Claude `test-kit/crm-export.csv` and the request in `prompt-da.txt`, with the model and the
   skill you actually plan to use.
2. Save what it writes as `merge-groups.json`.
3. Run `python3 score.py merge-groups.json`. Look at `wrong_pairs` first. A missed duplicate costs a second
   look next month. A wrong merge moves one company's contacts, deals and history into another company.

## What it will not do

- Find a duplicate with no CVR, no shared domain and no shared address. Those go on a "check by hand" list.
- Fix a mistyped CVR number. The skill trusts the CVR.
- Merge anything. It proposes; you approve. In Google Sheets, keep "Ask before edits" on.

The test sheet is small and invented. Your own CRM is messier. Run the test kit on the model you will
use, then try the skill on a copy of your real export before anything is merged in the CRM itself.
