Add to Claude

Guides · For agents

Fix phone numbers with a receipt and an undo

Tools: sift_fix_dry_run, sift_fix_apply, sift_fix_undoWorks with Claude Code

Ask for a dry run first. Sift says what would change and what it can't fix. Apply writes a new file with a receipt, and undo puts the original back exactly.

Ask your agent

With Sift connected (setup takes three steps), paste this and swap in your own paths.

Use Sift to dry run the phone fix on /path/to/crm_companies.csv with /path/to/rules.companies.json. Tell me what would change and what gets flagged, and whether a guardrail would stop it. Don't apply anything yet.

What Sift sends back

Rows in1,200
Would change to +44 then 10 digits260
Flagged, too short to fix15
Share of rows changed21.7%
Guardrail in the sample rulesStops anything over 20%
After apply: rows out1,200, none deleted
UndoOriginal back, byte for byte

The phone fix changes 21.7% of rows, so the 20% guardrail stops it on purpose. It runs only when you raise the limit for that one job.

What to do next

Questions

What does the receipt hold?
Every changed row: its row number, record ID, the old value and the new one. It sits next to your file, or in the folder you set, on your machine, so treat it like the data. With SIFT_MASK_RECEIPTS=1 it leaves the values out, and siftdata clean deletes Sift's files when you are done.
Can apply run without a dry run?
No. The rules file says the first run is report only, so apply needs the ID from a dry run of that exact file. If the file changed since, apply stops.

One file, no agent? Clean a file by hand in your browser, with nothing uploaded.

More guides for agents

Guide Audit a CRM export with your agent Guide Find Active accounts that stopped ordering Guide Check who you're emailing that you shouldn't