csv-quality-gate
csv-quality-gate is a command-line data quality gate that runs CSV preflight validation, failing fast before a pipeline ingests broken, incomplete, duplicated, or junk input.
csv-quality-gate is developed by Hermes Labs.
Hermes Labs is an agentic infrastructure company building the reliability layer for autonomous systems.

It runs batch quality checks on a CSV and returns pass, warn, or fail (with matching exit codes) before expensive pipeline steps burn time on bad input. It checks for missing required columns, empty files, empty critical cells, duplicate rows, and — under the outreach profile — suspicious company-name patterns. Teams can declare their own columns, thresholds, and patterns in a small TOML/JSON config, every issue points at the affected line numbers (never cell values), and the same gate runs as a pre-commit hook or a GitHub Action. It is stdlib-only: no third-party runtime dependencies.
The problems it is built for:
- "We keep running expensive pipeline steps on broken CSVs."
- "A batch run fails 20 minutes in because the input CSV was junk."
- "We only discover missing required columns after the job already started."
- "Duplicate rows and empty contact fields keep polluting our batch runs."
- "The gate says 12% duplicates, but which rows?"
- "Our CSVs have
email and order_id, not company."
- "I want CSV preflight validation, not a whole data platform."
Quickstart (60 seconds)
pip install csv-quality-gate
python -c "from importlib.metadata import version; print(version('csv-quality-gate'))" # confirm the installed release
csv-quality-gate check leads.csv --profile outreach
Example output for a CSV with a missing column and a borderline duplicate rate:
csv-quality-gate: FAIL
file: leads.csv
profile: outreach
rows: 125
ERROR: missing required column: person_name
WARNING: duplicate rate 12% exceeds warning threshold 10%
evidence: column=company affected=15 rows at line(s) 4, 9, 15, 22, 31 (+10 more)
The process exits 0 on pass, 1 on warnings only, and 2 on fail, so you can wire it directly into a shell script, a pre-commit hook, or a CI step.

Try it with the included fixtures
You can verify the gate before connecting it to your own pipeline. From a
checkout, install the package and run the included clean and broken inputs:
git clone https://github.com/hermes-labs-ai/csv-quality-gate.git
cd csv-quality-gate
python -m pip install .
csv-quality-gate check examples/clean.csv
csv-quality-gate check examples/promptfoo-dataset/tests-broken.csv \
--config examples/promptfoo-dataset/csv-quality-gate.toml \
--profile promptfoo
The first command exits 0 with PASS; the second exits 2 with bounded
line-number evidence for the broken rows. This gives a first-use check without
creating a sample CSV or guessing which profile and config to choose.
Development installation
For everyday use, follow the Quickstart above. For a
source checkout, editable install, and lint/test commands, see
Development below.
As an agent skill (Claude Code, Codex CLI, Gemini CLI)
The repository root is a portable Agent Plugin
(plugin.json) that ships one skill, skills/csv-quality-gate/SKILL.md. It
teaches the agent to run this gate on the CSV files you name and report the
status and line-number evidence without overclaiming.
| Host | Install | Read back |
|---|
| Claude Code | claude plugin marketplace add hermes-labs-ai/csv-quality-gate
claude plugin install csv-quality-gate@csv-quality-gate | claude plugin list |
| OpenAI Codex CLI | codex plugin marketplace add hermes-labs-ai/csv-quality-gate
codex plugin add csv-quality-gate@csv-quality-gate | codex plugin list |
| Gemini CLI | gemini extensions install https://github.com/hermes-labs-ai/csv-quality-gate --ref main | gemini skills list |
| skills.sh | npx skills add https://github.com/hermes-labs-ai/csv-quality-gate --skill csv-quality-gate | npx skills list |
What each host reads: