Catch Bad CSV Data Before Analysis

    by JingJing Xiong

    1

    For analysts who inherit raw CSV exports: it audits missing values, duplicate rows, mixed types and encoding damage, then returns a fixed five-section Markdown quality checklist instead of editing your file.

    Free

    Security scanned

    Works with the AI Agents you already use

    Catch Bad CSV Data Before Analysis

    Example session with this skill installed

    Audit normal_customers.csv for data quality before I build the monthly report. Use customer_id as the primary key.

    • Read your context and instructions
    • Compiled the catch bad csv
    • Generated the data export

    *## 1. File overview

    • File: normal_customers.csv
    • Size: 0.5 KB
    • Encoding: utf-8 (auto-detected)
    • Data rows: 12
    • Columns: 6
    • Verdict: PASS

    2. Column problems

    ColumnMissingInferred typeMixedCharacter issuesSensitive
    customer_id0 (0.0%)text0.0%noneno
    name0 (0.0%)text0.0%noneno
    city0 (0.0%)text0.0%noneno
    signup_date0 (0.0%)date0.0%noneno
    orders_count0 (0.0%)int0.0%noneno
    total_amount0 (0.0%)float0.0%noneno

    3. Row problems

    • Empty rows: 0
    • Rows with wrong field count: 0
    • Fully duplicated rows: 0 (0.0%)
    • Duplicate keys: 0 (column customer_id)

    4. Risk level

    PASS — no rule triggered (R1–R9 all clear).

    5. Next steps

    No cleaning needed; proceed to analysis.

    This report only states problems. No data was modified; every fix needs a human decision.

    normal_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

    What it does

    Audits one local CSV file before you analyse it, and returns a fixed five-section checklist: file overview, per-column problems, row problems, risk level, next steps.

    How it works

    Nine numbered rules (R1–R9) with published thresholds: field-count mismatch, header duplicates, missing rate, duplicate rows, duplicate keys, mixed types per column, invisible characters and encoding damage, plus sensitive-field flagging. Every PASS / WARN / FAIL cites the rule and the number that triggered it, so two runs on the same file reach the same verdict.

    Where it stops

    Read-only. It never edits, deduplicates or imputes your data. Unsupported input (xlsx, over 200 MB, undecodable text, header-only files) stops with a stated reason instead of guessing. Sensitive columns are flagged by name only; values are never printed.

    How to run it

    Pure Python standard library, no install. In Spyder, set the path at the top of the script and press F5, or run python audit_csv.py orders.csv --key order_id --out report.md.

    Supports only .csv files under 200MB. Read-only; cannot edit, deduplicate, or impute data. Requires manual user action for all suggested fixes.

    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 buying a skill.

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 12 days ago

    • Free with an Agensi account

    Software
    Python 3.8+

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed12 days ago

    What's inside

    Frequently Asked Questions

    This skill performs a comprehensive, read-only audit of your CSV files to identify structural errors, encoding issues, and inconsistent data types before you begin analysis or modeling. It saves time by catching 'invisible' problems like zero-width spaces or mixed types that often cause data pipelines to crash.

    The skill is compatible with AI agents that support local file access and Python-based tool execution. It is designed to work seamlessly within environments where the agent can run scripts against local directories to maintain data privacy.

    No, this is a diagnostic tool designed to be strictly read-only to ensure your raw data remains untouched and secure. It provides a detailed Markdown report with specific manual fix suggestions so you can decide how to clean the data yourself.

    The auditor handles files up to 200MB and is optimized for standard UTF-8 and GB18030 encodings. While it is highly robust for structural and field-level audits, it currently focuses strictly on .csv formats and does not support .xlsx or .json files.

    You receive the full auditing engine, the R1-R9 rule definitions, and the structured Markdown reporting template. Your purchase also includes any future updates or rule refinements to keep the tool compatible with evolving AI agent environments.

    Yes, the skill includes a 'Sensitive Data Flagging' feature that identifies potential PII like emails or phone numbers. It alerts you to their presence and location within the file without exposing the actual values in the audit report, ensuring your compliance workflows are supported.

    New in Data & Databases

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.

    Free