Deduplicate and merge people or company rows across Clay tables without losing enrichment or double counting a person...
Merging two lists is easy. Merging them without losing the enrichment already paid for, and without counting the same person twice under two email addresses, is the part that goes wrong. This skill sets the match key, the precedence rule, and the audit that proves the merge did not silently drop rows.
Check these before you run the skill. Nothing outside this table is needed.
| Requirement | Needed | Used for | What it costs you |
|---|---|---|---|
| A Clay workspace | Required | The tables being merged | Billed by Clay in credits on your own plan. |
Missing a required item? Stop before the live steps and tell the user which item is missing and what it is for. Do not run the step without it and do not present an empty result as an answer. Keys are read from the environment at run time and are never written into a file, a prompt or the output.
Before doing anything else, read whichever of these exist at the project root and use them instead of asking the user to repeat themselves:
ICP.mdIf none exist, do the work from what the user gives you, then offer to write the missing file so the next skill in the pack starts warmer.
This skill needs no live data tool. It works from the files, exports and answers you give it, so it runs the same in any agent with no setup.
scripts/check-output.py before you return it.Stop and ask before merging or deleting any row in a live table. Show exactly what will be sent or written, to whom or to which records, and how many. Proceed only on an explicit yes from the user in this conversation. A yes for one batch does not cover the next one.
The match key with its uniqueness measured, the normalization steps, the precedence table by field, and the before and after audit counts.
Save the output to a file and run python3 scripts/check-output.py <file>. The
contract it checks is scripts/output-contract.json.
COMPLETE: return the output.INCOMPLETE: do not present the output as finished. Fill what you can, run
the check again, and if parts stay missing, return the output under the heading
Incomplete with every reason the check printed.clay-build-gatecrm-dedupe-planpeople-pool-builderShips in the clay-operator, agency-delivery packs.