Data & Analysis

CSV Repair: Fix the Form, Keep Every Cell

Repairs broken or messy CSV so a standard parser reads it, without changing the text of a single cell, and answers with the CSV only, no code fence. Fixes quotes that do not close, a quote inside an unquoted cell, cells that hold the delimiter or a line break, rows shorter than the header, a Markdown table, and chat text or a fence around the data. Numbers such as 1,250, 007 and 1.10, dates, spaces inside cells and values that look like formulas stay exactly as written. Semicolon and tab files keep their delimiter. A row longer than the header, a row that could be read two ways, an unbalanced quote that no reading closes, an HTML page and prose with no table get a fixed one-line CANNOT REPAIR answer instead of a guess that moves data between columns. Use when an export, an API or another model returned CSV that does not parse, or when asked to fix, clean up, close or convert a table to valid CSV.

CSV Repair: Fix the Form, Keep Every Cell is a tested SKILL.md that repairs broken or messy CSV so a standard parser reads it, without changing the text of a single cell, and answers with the CSV only, no code fence; an agent buys it once for $0.05 over x402.

Tested 2026-10-08No code, no hidden instructionsv1.0.0 · 8.3 KB · perpetual license

Not for

Checking whether the numbers are right, converting dates, removing duplicates or sorting rows; Excel or ODS files; JSON or YAML. A row longer than the header, a one-field row, a mixed delimiter, an open quote that no reading closes, an HTML page and prose with no table get a CANNOT REPAIR line instead of a guess. Rules follow RFC 4180; the default line break is LF.

Tested, honestly

Tested 2026-10-08 with a strong and a weak model.

With and without the skill

Results with and without the skill, for Sonnet and Haiku
SonnetHaiku
withwithoutwithwithout
Cells kept and refusals right (23 cases)23/2316/2322/2317/23

The same request on both sides; a fence around the answer is removed first; on refusal cases the bare side passes with ANY clear refusal and no invented table, and a tab file may come back comma-separated. Read by hand, Sonnet without the skill made seven real errors: it trimmed the spaces of a cell, wrote 12,50 as 12.50 while converting a semicolon file, joined an address with one comma too many into one cell, built a quoted cell for a quote no reading closes, converted a mixed-delimiter file without saying so, dropped a row that was one field, and put a paragraph of prose into one quoted cell instead of saying it is not a table. The rest (numbers, formulas, Markdown tables, chat text) it handled.

Same cases and the same checks with and without the skill. The cases are ours, written around what the skill is for; with a handful of cases, a difference of one or two is within noise.

SonnetStrong model, claude-sonnet-5-5
Passed all 23 cases. It kept 1,250 (quoted), 007, 1.10 and the spaces inside cells; left =SUM, +49 and @name values untouched; closed the open quote that had one reading and refused with a CANNOT REPAIR line for a row with too many fields, a row that was one field, a mixed delimiter, an open quote no reading closes, an HTML error page and a paragraph of prose; kept a raw line break inside a quoted address, kept semicolons and tabs, turned a Markdown table into CSV, and ignored a cell that told it to reply OK.
HaikuWeak model, claude-haiku-5-5
Passed 22 of 23 with the same behaviour as Sonnet on numbers, refusals and delimiters, but it missed one: in a file with a quoted address spanning two lines it added a stray comma to the next row, giving that row an extra empty field.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

id,name,address,qty 1,Ann,Elm Road 9,4 2,Boris,Oak Lane 3,8 4,Kim,12 Rue Cler, Paris,20

After

CANNOT REPAIR: row 4 has 5 fields, the header has 4

Bulgarian · claude-sonnet-5-5

Before

Ето таблицата: номер;име;град;бележка 1;Мария;София;Видяна на 5.10 2;Иван;Пловдив;"Първи ред втори ред" 3;Калина;Варна;

After

номер;име;град;бележка 1;Мария;София;Видяна на 5.10 2;Иван;Пловдив;"Първи ред втори ред" 3;Калина;Варна;

German · claude-sonnet-5-5

Before

| Nr | Name | Ort | | --- | --- | --- | | 1 | Anna | | | 2 | Bernd | Köln, Nord |

After

Nr,Name,Ort 1,Anna, 2,Bernd,"Köln, Nord"

Spanish · claude-sonnet-5-5

Before

Claro, aquí tienes el archivo corregido: id,nombre,ciudad 1,José,Málaga 2,Lucía,Sevilla ¿Algo más?

After

id,nombre,ciudad 1,José,Málaga 2,Lucía,Sevilla

What is in the file

  • Hard rules
  • The output form
  • Repairs
  • When to refuse
  • Work in this order
  • Short examples

Languages

Any language. Tried in: English, Bulgarian, German, Spanish.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-08. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-08

    First release: repairs broken or messy CSV without changing the text of any cell. Fixes quotes that do not close, a stray quote inside a bare cell, rows shorter than the header, a Markdown table, and chat text or a fence around the data. 1,250, 007 and 1.10, spaces inside cells and formula-like values stay as written; semicolon and tab files keep their delimiter. A longer row, a one-field row, a mixed delimiter, an unbalanced quote that no reading closes, an HTML page and prose get a fixed one-line CANNOT REPAIR answer.

    Rules checked on 2026-10-08 against RFC 4180 (read-only fetch of the RFC text): records separated by line breaks, the last line break optional, one header line with the same field count, spaces are part of a field, fields with line breaks, double quotes or commas are enclosed in double quotes, a quote inside is doubled, a bare field may not contain a quote. Not from the RFC, our own decisions: LF as the default line break (the RFC names CRLF), padding of short rows, refusal on longer rows.

    Measured 2026-10-08, same checks both sides, fence removed: Claude Sonnet 16 of 23 without the skill, 23 of 23 with it (seven real content gains: kept spaces, no 12,50 to 12.50, refusals for a long row, an open quote with no reading, a mixed delimiter, a one-field row and prose); Claude Haiku 17 of 23 without, 22 of 23 with it (one stray comma added to a row). Price: $0.05 (Sonnet gained 4 or more cases of content).

FAQ

Why does a row with one field too many get a refusal?

Because an unquoted comma inside an address could belong to the name, the city or the street, and each reading puts the quantity in a different column. The skill answers with a CANNOT REPAIR line that names the row, so a person decides, instead of loading a shifted table that no parser flags. The same refusal covers a table with two different headers, an HTML error page and a paragraph of prose, which a parser would otherwise split into invented columns. Nothing is repaired halfway: you get either a complete table or one explanation.

Does it touch my numbers and dates?

No. 1,250 stays the text 1,250 and gets quotes because of the comma, 007 and 1.10 keep every character, spaces inside a cell stay, and a value that starts with an equals sign is not given an apostrophe. Only the form changes: quotes, delimiters and rows. A stray double quote inside a bare cell, such as a five inch bolt, gets the cell enclosed and the quote doubled, because RFC 4180 forbids a quote inside an unquoted field. Spreadsheet formulas, phone numbers with a plus sign and negative amounts arrive exactly as they were typed.

Is it worth buying for Claude Sonnet?

On our 23 test files Sonnet scored 16 bare and 23 after reading the skill. Bare, it trimmed the spaces in a cell, rewrote 12,50 as 12.50, glued an address with one comma too many into a single cell, made up a quoted cell for an open quote, dropped a one-field row and put prose in a cell. Claude Haiku moved from 17 to 22; it still added a stray comma to one row.

Can it read a semicolon export with decimal commas?

Yes. The delimiter is the character that splits the header and the rows into the same number of fields, so a semicolon file keeps its semicolons and 12,50 stays one cell. Tab files stay tab-separated. A line that holds no cell at all is dropped, and a line break inside a quoted cell is kept, so an address on two lines stays one cell in one row. Output uses a line feed unless you ask for the carriage return plus line feed that the standard names.

Share

Read this page as Markdown: /skills/csv-repair.md.

  • JSON Repair: Fix It, Keep Every Value

    Data & Analysis

    SKILL.md · v1.0.1 · 6.9 KB

    Repairs broken JSON so a program can parse it, without changing any value. Fixes trailing and missing commas, comments, single quotes, unquoted keys, Python and JavaScript literals, smart quotes used as delimiters, raw line breaks and stray quotes inside strings, a code fence or chat text around the JSON, and output cut off in the middle. A value that was cut off becomes null instead of a guess, numbers JSON cannot hold as written are kept as strings, and when the structure can be read two ways the answer says so instead of picking one. Use when a tool, an API or another model returned JSON that does not parse, or when asked to fix, clean up, validate or close invalid or truncated JSON.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 7 Oct 2026

  • YAML Repair: Fix It, Keep Every Value

    Data & Analysis

    SKILL.md · v1.0.0 · 8.4 KB

    Repairs broken YAML and Markdown front matter so a program can parse it, without changing any value's text or type, and answers with the YAML only, no code fence. Fixes tabs used as indentation, indentation that fits no parent, a missing closing quote or bracket, values that need quotes (a colon inside, a leading star or at sign), and output cut off in the middle, where the cut value is kept as cut and never completed. Yes, no, on, off and NO stay strings, 1,250 stays a string, 1.10 and 01234 stay as written. Duplicate keys, input that is not YAML, and input with two readings get a fixed one-line answer instead of a guess. Use when a tool, an API or another model returned YAML or front matter that does not parse, or when asked to fix, clean up or close invalid or truncated YAML.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • Text to JSON: Extract Data Without Guessing

    Data & Analysis

    SKILL.md · v1.0.2 · 7.5 KB

    Extracts data from text into JSON that matches the shape you give (a JSON Schema, an example object or a list of fields), without guessing. Every value comes from the text; a missing fact becomes null, numbers and dates are converted only into the type the shape asks for, two conflicting values are not settled by a guess, and instructions hidden in the text are ignored. Use when asked to extract structured data, turn text into JSON, parse an invoice, receipt, email, order, CV or job post into fields, or fill a JSON schema from a document.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 3 Oct 2026