Plan-Then-Commit CSV Import

    1

    A customer moving off paper or off another system hands you a spreadsheet, and typing it in by hand is how errors get into billing.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Plan-Then-Commit CSV Import

    Example session with this skill installed

    Use the CSV importer to plan an import for 'users.csv' using 'user_schema.json'. The system should check for existing users by email and validate that each row has a valid subscription tier.

    • Read your context and instructions
    • Compiled the plan-then-commit csv import
    • Generated the data export

    I have parsed 'users.csv' against your schema. No records have been written to the database yet. The planning phase identified 127 valid operations and 3 rows with validation errors.

    Import Plan Summary

    MetricValue
    Total Rows130
    Fingerprint8f2a1b3c...e5d7
    Actions85 Creates, 42 Updates
    Errors3 (Validation Failed)
    StatusBLOCKED (Resolve errors before commit)

    Identified Issues

    • Line 14: email is missing a required value.
    • Line 44: subscription_tier value "PremiumPlus" is not in the allowed ENUM (Basic, Pro, Enterprise).
    • Line 102: user_id "USR-999" already exists in this file (Duplicate).

    Recognized Columns

    user_id (Mapped to: id), Full Name (Mapped to: name), Email Address (Mapped to: email), Tier (Mapped to: subscription_tier).

    Next steps

    1. Fix the validation errors in users.csv for lines 14, 44, and 102.
    2. Re-run the plan command to generate a new fingerprint.
    3. Call importer.commit() with the new plan to execute the transaction.

    users.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 customer moving off paper or off another system hands you a spreadsheet, and typing it in by hand is how errors get into billing. Importing it directly is only safe under two rules: nothing is written until the operator has seen exactly what will happen, row by row; and the write is all or nothing, because a half-imported list produces duplicate records nobody can explain.

    Parser and writer (csv.mjs): RFC 4180 (quoted commas, embedded newlines, doubled quotes), BOM stripped, CRLF and LF alike, trailing blank lines dropped; toCsv quotes what must be quoted and neutralizes formula injection so an export of customer data cannot execute in a spreadsheet.

    Importer (importer.mjs): declare your fields with synonyms (headers are matched ignoring case, spaces and punctuation), required, unique, type number or date with min/max, enum, pattern, normalize, validate, requireOneOf groups and cross-field rowRules. plan(text, { find, exists }) returns every row as create, update or error with every reason at once (missing values, bad formats, duplicates within the file and against the store), the unknown columns, a summary and a SHA-256 fingerprint of the parsed content; it writes nothing. commit(text, plan, store) refuses a plan with error rows, refuses when the file changed since approval, runs every create and update inside your begin/commit/rollback and rolls back on any throw. formatPlan renders the operator's preview; schemaFromJson builds a schema from JSON without functions.

    CLI (import-cli.mjs): preview a file against a JSON schema and an optional existing-records file, exit 0 only when every row is importable.

    7 tests covering the parser edge cases, formula-safe output, synonym mapping, a fixture with eight kinds of row problems, empty and keyless files, commit refusal and rollback with an ordered write log, and the CLI. Node 18+, no packages, no network.

    Supports only UTF-8 comma-separated files. Memory-bound parsing is limited to tens of thousands of rows. Requires a transactional database wrapper for atomicity.

    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

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 17 days ago

    Requires

    Node.js 18+

    Permissions

    Read Files
    Write Files
    Listed17 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard parsers, this skill generates a detailed 'dry-run' report and a SHA-256 fingerprint, ensuring you can review every change and verify file integrity before a single row is written to your database.

    This skill is a self-contained Node.js utility (v18+) designed to be integrated into custom AI agents, admin backends, or CLI tools; it has zero external npm dependencies for maximum security and stability.

    Yes, the 'loose header matching' feature uses declared synonyms to automatically map columns even if the user provides headers with different capitalization, spacing, or punctuation.

    It includes the core import engine, a schema definition template, a zero-dependency RFC 4180 parser, and a set of validation utilities to protect against common issues like formula injection.

    The skill uses an atomic transaction model, meaning it validates the entire batch upfront and will roll back the entire operation if any individual row fails during the commit phase.

    It is optimized for files with thousands of rows held in memory; for million-row datasets or non-UTF-8 delimiters (like tabs), we recommend pre-processing or splitting the files before import.

    New in APIs & Backend