csv-validator
Skill0 starsChanged 2 months agoMITView on GitHub
Validates CSV files against expected column names, uniform row lengths, delimiters, and missing-value constraints.
In this repository49 other files it gives its agents.
- bug-reproducerSkill
- claim-checkerSkill
- command-failure-diagnoserSkill
- config-risk-reviewerSkill
- deployment-checklist-makerSkill
- diff-reviewerSkill
- factual-summarizerSkill
- field-extractorSkill
- api-contract-testerSkill
- database-migration-helperSkill
- security-vulnerability-fixerSkill
- git-commit-stagerSkill
- git-conflict-resolverSkill
- github-actions-debuggerSkill
- github-issue-triagerSkill
- github-pr-creatorSkill
- github-pr-reviewerSkill
- go-code-qualitySkill
- go-lint-and-vetSkill
- go-testingSkill
- json-schema-converterSkill
- lint-and-typecheckSkill
- meaning-preserving-editorSkill
- meeting-notes-to-actionsSkill
- minimal-bug-fixSkill
- option-comparatorSkill
- py-code-qualitySkill
- py-lint-and-typecheckSkill
- py-testingSkill
- readme-writerSkill
- regression-test-writerSkill
- release-notes-drafterSkill
- repo-inspectorSkill
- research-briefSkill
- reversible-cleanup-plannerSkill
- rust-clippy-checkSkill
- rust-code-qualitySkill
- rust-testingSkill
- small-refactorSkill
- status-updateSkill
- step-by-step-tutorialSkill
- step-decomposerSkill
- tabular-analyzerSkill
- task-briefSkill
- test-runner-debuggerSkill
- ts-code-qualitySkill
- ts-lint-and-typecheckSkill
- ts-testingSkill
- skill-templateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Verify that a target CSV file has a consistent delimiter, valid header row, uniform row lengths, and conforms to required column …
- Distinctive: line 14
Use this skill when:
- Distinctive: line 16
Before running data analysis, migrations, or database inserts.
- Very specific: line 20
Do not use to parse complex JSON payloads.
- Very specific: line 21
Do not use to compute summary statistics or metrics.
- Very specific: line 22
Do not use to extract single arbitrary text fields.
- Very specific: line 30
If csv_path is not supplied, stop immediately and ask: "Please provide the file path to the CSV file."
- Very specific: line 31
If csv_path points to a missing file, report: "Error: File <path> not found."
- Very specific: line 32
If expected_columns is omitted, validate structure only (uniform row lengths, non-empty header, parseable rows).
- Distinctive: line 35
Follow these numbered actions:
- Distinctive: line 39
Run the companion validator script:
- Distinctive: line 45
Check for header mismatches, row count mismatches, and trailing blank rows.
- Very specific: line 50
If any row has a different column count than the header: mark status as INVALID.
- Very specific: line 51
If expected columns are specified and header names do not match exactly (case-sensitive or trimmed): mark status as INVALID.
- Very specific: line 52
If the file is 0 bytes or has no rows after header: mark status as EMPTY.
- Very specific: line 53
If 0 issues are detected: mark status as VALID.
- Distinctive: line 87
Stop and ask the user when:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CSV Validator
Validates tabular CSV data against structural rules and schema requirements before ingestion or transformation.
1. Purpose
Verify that a target CSV file has a consistent delimiter, valid header row, uniform row lengths, and conforms to required column constraints. A "CSV" is a comma-separated values text file per RFC 4180.
2. When to Use
Use this skill when:
- Receiving an uploaded or imported CSV file.
- Before running data analysis, migrations, or database inserts.
- User asks to "check", "clean", or "validate" a CSV file.
3. When Not to Use
- Do not use to parse complex JSON payloads; use
json-schema-converter. - Do not use to compute summary statistics or metrics; use
tabular-analyzer. - Do not use to extract single arbitrary text fields; use
field-extractor.
4. Required Inputs
csv_path: File path to the CSV file (string).expected_columns: Optional list of expected column header names (comma-separated string or array).delimiter: Optional separator character (default:,).
5. Missing-Input Behavior
- If
csv_pathis not supplied, stop immediately and ask: "Please provide the file path to the CSV file." - If
csv_pathpoints to a missing file, report: "Error: File<path>not found." - If
expected_columnsis omitted, validate structure only (uniform row lengths, non-empty header, parseable rows).
6. Procedure
Follow these numbered actions:
- Action 1: Inspect File Metadata
- Confirm file exists, is non-empty, and check byte size.
- Action 2: Execute Validation
- Run the companion validator script:
python3 skills/csv-validator/scripts/validate_csv.py <csv_path> [--columns <cols>] [--delimiter <delim>] --json - Alternatively, if python3 is unavailable, manually read the header and inspect the first 100 lines for matching field count.
- Run the companion validator script:
- Action 3: Parse Validation Issues
- Check for header mismatches, row count mismatches, and trailing blank rows.
- Action 4: Emit Summary Report
- Format the findings using Section 8.
7. Decision Rules
- If any row has a different column count than the header: mark status as
INVALID. - If expected columns are specified and header names do not match exactly (case-sensitive or trimmed): mark status as
INVALID. - If the file is 0 bytes or has no rows after header: mark status as
EMPTY. - If 0 issues are detected: mark status as
VALID.
8. Output Format
Emit the CSV validation report using this template:
### CSV Validation Report: [Filename]
- **Status**: [VALID | INVALID | EMPTY]
- **Delimiter**: `[e.g., ,]`
- **Header Columns**: `[col1, col2, col3]`
- **Rows Processed**: [integer]
- **Issues Found**: [count]
#### Issue Details (if any)
- `Row [N]`: [Description of error, e.g., expected 4 columns, got 5]
#### Recommended Remediation
- [Concrete action to fix the CSV or schema]9. Verification Checklist
- File existence confirmed on disk.
- Header was extracted and verified.
- Every data row was checked for matching column length.
- Companion script validate_csv.py executed or fallback executed.
10. Common Failures and Recovery
| Failure Symptom | Cause | Recovery Action |
| Comma in unquoted text | Unescaped field containing comma | Instruct data provider to wrap string fields in quotes. |
| Inconsistent delimiter (tab or semicolon) | European CSV or TSV format | Re-run validation with --delimiter ';' or '\t'. |
| Memory error on large file | Giant multi-GB file | Use streaming reader in scripts/validate_csv.py or check first 10,000 rows. |
11. Stop or Escalation Conditions
Stop and ask the user when:
- File is corrupted or encoded in an unreadable binary format.
- File size exceeds memory or storage limits.
12. Examples
Example 1: Successful Execution
Input:
File: /data/users.csv
Expected columns: id,username,email,status
Content:
id,username,email,status
101,alice,alice@example.com,active
102,bob,bob@example.com,inactiveExpected Observable Actions:
- Ran
validate_csv.py /data/users.csv --columns "id,username,email,status" --json. - Verified 2 rows and identical headers.
Output:
### CSV Validation Report: users.csv
- **Status**: VALID
- **Delimiter**: `,`
- **Header Columns**: `id`, `username`, `email`, `status`
- **Rows Processed**: 2
- **Issues Found**: 0
#### Recommended Remediation
- None. File is ready for processing.Example 2: Ambiguous or Failure Case
Input:
File: /data/orders.csv
Expected columns: order_id,total,created_at
Content:
order_id,total,created_at
201,49.99
202,12.50,2026-09-01,EXTRA_FIELDOutput:
### CSV Validation Report: orders.csv
- **Status**: INVALID
- **Delimiter**: `,`
- **Header Columns**: `order_id`, `total`, `created_at`
- **Rows Processed**: 2
- **Issues Found**: 2
#### Issue Details
- `Row 2`: column count mismatch (expected 3, got 2)
- `Row 3`: column count mismatch (expected 3, got 4)
#### Recommended Remediation
- Ensure each row in `orders.csv` has exactly 3 fields matching `order_id`, `total`, and `created_at`.Example 3: Expected Final Output
Output:
### CSV Validation Report: inventory.csv
- **Status**: VALID
- **Delimiter**: `,`
- **Header Columns**: `sku`, `quantity`, `warehouse_id`
- **Rows Processed**: 1540
- **Issues Found**: 0
#### Recommended Remediation
- None. File conforms to schema.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

