CSV Import Preflight: Contracts and Quarantine

    1

    Check a CSV against explicit types, keys and dates; get a reproducible quarantine report without importing or changing source data.

    Free

    2 usesSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    CSV Import Preflight: Contracts and Quarantine

    Example session with this skill installed

    Run the bundled synthetic customers.csv through the approved fixtures/contract.json. Report rejected records, duplicate IDs, date/decimal violations and formula-like strings. Do not modify the input or import any records.

    • Read your context and instructions
    • Compiled the csv import preflight
    • Generated the data export

    CSV preflight: review required

    6 data records checked. 2 pass the selected contract checks; 4 are quarantined. No source rows were changed and no import was performed.

    RecordCSV ending lineFindingReview needed
    23signup_date: TYPE_DATEThe date does not exist. Ask the data owner for the intended date; do not guess.
    34DUPLICATE_KEYcustomer_id repeats an earlier raw key. Confirm whether this is a duplicate or a separate customer before changing the ID.
    45note: FORMULA_RISKA formula-like string was quarantined, not executed. Confirm the intended note and the destination's handling.
    56amount: TYPE_DECIMALThe comma-formatted amount is outside this contract's plain-decimal format. Confirm the money unit and separator convention before converting a copy.

    Input SHA-256: a8f6b9b36cabb68f274ee695313c06d99c523601fdf5e3f2d2f8777935c41171
    Contract SHA-256 (canonical JSON): 4f04524ed20a8e7105a16f6a0ba957e10c413d59505b2fa6752147808c50c070

    Reproduce

    python3 scripts/preflight.py fixtures/customers.csv fixtures/contract.json --format json

    Exit code: 1, because records were quarantined. This is a review signal, not an import instruction.

    Next steps and limits

    Review the four findings with the data owner, correct only an approved copy, then rerun. The two passing rows are not certified safe for a real importer: verify mappings, tenant scope, constraints and idempotency first. No passing-row file was requested or created. Email checks are syntax-only; keys compare exact raw strings. Formula triage is conservative, not a universal spreadsheet sanitizer. No normalization, database access, network call or production import was performed.

    customers.csv

    CSV · data export

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A reproducible local preflight for developers preparing customer, billing or catalog imports. This is an executable workflow, not just a prompt asking an agent to “clean the CSV.”

    What is included:

    • Python standard-library validator with strict ordered headers, integer/decimal/date/boolean/email/string checks, nullable and enum rules, exact composite-key duplicate checks and conservative formula-risk quarantine.
    • Source and contract SHA-256 in every report; raw source never modified. The default report excludes raw cell values.
    • Markdown or JSON output and explicit exit codes for local checks/CI integration. Optional passing-row output refuses to overwrite existing files.
    • Synthetic adversarial fixtures, 24 passing unit tests, captured tool-output demos and CLI verification.
    • Integration notes for Node/BullMQ and Python/pandas importers, including the distinction between a preflight and actual importer idempotency or tenant controls.

    Limits: UTF-8 CSV up to 20 MiB and contract v1 JSON up to 1 MiB; not Excel, a production importer, deliverability validator or universal spreadsheet sanitizer. Formula checks are conservative triage. No locale/money/date guessing. No database writes, network calls or account connections.

    Requires Python 3.10+ and an agent with local terminal/file access. Standard library only. Tested locally with the packaged scripts; automatic agent loading across products has not been verified. Demo below is actual deterministic tool output on bundled synthetic data, not a claimed live agent session.

    Version 0.1.0. MIT licensed, copyright Dhanush Nehru. Initially distributed through this listing rather than GitHub; MIT permits redistribution with notice retention. Paid packaging does not create legal exclusivity.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    2 uses

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Terminal and read access are required for local checks. Write access is optional only for an owner-requested new passing-row/report file. No network, environment variables or service connections. Only user-selected local inputs, the installed skill folder and owner-approved new output path.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    Unlike agents that attempt to 'clean' data via LLM reasoning, this skill uses a strict, deterministic Python validator to check CSVs against explicit schemas (types, enums, and keys) before any data touches your database.

    The skill requires Python 3.10+ and an AI agent with local terminal and file system access; it relies solely on the Python standard library to ensure high portability across different developer environments.

    The tool generates a reproducible quarantine report in Markdown or JSON, featuring SHA-256 hashes of your source files to ensure auditability without ever modifying your original raw data.

    You receive the core Python validator, a suite of 24 unit tests, synthetic adversarial test data, and integration guides for connecting the preflight output to Node/BullMQ or pandas workflows.

    It is optimized for UTF-8 CSV files up to 20 MiB and JSON contracts up to 1 MiB; it is not designed for Excel files, universal spreadsheet sanitization, or live database writes.

    Yes, the package includes explicit exit codes and structured JSON output options, making it easy to integrate into local CI/CD pipelines or automated developer workflows.

    New in Data & Databases