Add to Claude

Guides · For agents

Check a CSV every night automatically (n8n, cron or GitHub Actions)

Command line: siftdata checkNo agent needed

Run one command on a schedule: Sift checks the file against the limits in a rules file and exits with 0 on a pass, 1 on a fail and 2 if it could not run, so n8n, cron or GitHub Actions can stop the next step. In the test files, the first night fails three limits and the second night passes.

The command

npx @heyife/siftdata@0.8.2 check signups.csv --rules rules.json --history runs.jsonl

It needs Node 18 or newer, and nothing else. The version is pinned, so the check only changes when you change it.

The limits

Each limit in the rules file is the largest share of rows allowed. Over a limit fails; exactly on it passes. These are the limits from the rules file for a sign-ups list:

"limits": {
  "duplicates": 0.01,
  "missing": { "email": 0.02, "first_name": 0.05 },
  "not_standard": { "email": 0.05 }
}

Night one: a fail, exit code 1

Sift check: /path/to/signups.csv (20 rows, memory engine)
FAIL  duplicates               1    5.0%  max 1.0%
FAIL  missing.email            1    5.0%  max 2.0%
pass  missing.first_name       1    5.0%  max 5.0%
FAIL  not_standard.email       2   10.0%  max 5.0%
Result: FAIL (3 limits broken)

One blank first name is 5.0% of 20 rows, exactly on its limit, so it passes.

Night two: a pass, exit code 0

The new export is saved over the same file. The history file holds last night's run, so Sift says what moved.

Sift check: /path/to/signups.csv (20 rows, memory engine)
pass  duplicates               0    0.0%  max 1.0%
pass  missing.email            0    0.0%  max 2.0%
pass  missing.first_name       0    0.0%  max 5.0%
pass  not_standard.email       1    5.0%  max 5.0%
Since the last run (2026-11-30T22:54:40.385Z): duplicates 1 to 0, missing.email 1 to 0, missing.first_name 1 to 0, not_standard.email 2 to 1
Result: pass

When it can't run: exit code 2

Sift could not run the check: Could not read the file at /path/to/signups.csv.

Put it on a schedule

Save each night's export to the same path. The history file compares runs of the same file, and it is only ever added to.

Questions

Does it need an AI agent?
No. The check is one command, with no agent. The same check is also an MCP tool, sift_check, if an agent should run it.
What happens exactly on a limit?
It passes. Over the limit fails. In the example, one blank first name in 20 rows is 5.0% against a 5.0% limit, so it passes.
Can I see the full result as data?
Yes. Add --json and Sift prints every limit, count and share as JSON instead of the table.

More guides

Guide Write a rules file for your CRM Guide Did my CRM import actually land? Guide Audit a CRM export with your AI agent