# Catch Bad CSV Data Before Analysis

> 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.

Catch Bad CSV Data Before Analysis is a free AI agent skill on Agensi by JingJing Xiong, in Data & Databases. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [JingJing Xiong](https://www.agensi.io/creators/xiongjingjing)
- Category: [Data & Databases](https://www.agensi.io/skills/data-databases)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/catch-bad-csv-data-before-analysis
- Tags: database, csv, data-quality, padas, data-audit, data-cleaning, data-validation, 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`.

## Requires

- Python 3.8+

## Known limitations

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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Catch Bad CSV Data Before Analysis skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific problems does the CSV Data Quality Auditor solve for data scientists?

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.

### Which AI agents or platforms are compatible with this skill?

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.

### Does the auditor automatically modify or clean my CSV files?

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.

### Are there any file size or format limitations I should be aware of?

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.

### What exactly is included in the purchase of this skill?

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.

### Can this skill help me identify PII before I upload data to a cloud environment?

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.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
