Data & Analysis

TOML Repair: Fix Broken TOML, Keep Every Value

Repairs TOML 1.0 that does not parse (pyproject, Cargo manifests, Worker config files, tool settings) without changing any value's text or type, and answers with the TOML only, no code fence. Fixes unquoted strings, keys with spaces, a missing equals sign, an unclosed quote, bracket or table header, backslashes in Windows paths, numbers with leading zeros, decimal commas, slash dates, a multi-line inline table, and chat text or a fence around the file. A version such as 1.10 is kept as the text 1.10 when the other versions in the file are strings. A table defined twice, a dotted key that writes into a table a header already defined, a key given twice with different values, input that is INI and not TOML, and input with two readings get one line starting with CANNOT REPAIR instead of a guess. Use when a tool, an API or another model returned broken TOML that ends in a TOML parse error, or when asked to fix or clean up invalid TOML.

TOML Repair: Fix Broken TOML, Keep Every Value is a SKILL.md that repairs TOML 1.0 that does not parse (pyproject, Cargo manifests, Worker config files, tool settings) without changing any value's text or type, and answers with the TOML only, no code fence; an agent buys it once for $0.05 over x402.

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

Not for

Checking a config against a schema; guessing cut-off values; reformatting or sorting TOML that already loads; YAML, JSON, INI or .env files. A table defined twice, a dotted key into a header table, a key given twice with different values, and input with two readings get a CANNOT REPAIR line. Follows TOML 1.0, not 1.1.

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
Files repaired right (22 files)22/2217/2221/2214/22

Read by hand, Sonnet without the skill already handled bare strings, 1.10 among string versions, the Windows path, the missing equals sign, the trailing comma, a planted order in a comment, the slash date, the multi-line inline table and chat text, and repaired the dotted key and the INI file without changing a value. It missed five: it merged the table defined twice, turned 007 into 7, renamed a key with spaces, turned 1,250 and 4,99 into numbers, and kept only one of two conflicting name keys without saying so. Haiku quoted the key with spaces correctly but missed the other four, and also converted the slash date, moved the multi-line inline table, changed a valid file and dropped a header. Haiku with the skill answered a bare Cyrillic value with that one line alone, unquoted, and dropped the rest of the file.

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
Right on all 22 files, read by hand: it quoted bare text and the version 1.10 beside string versions, kept 007 and 1,250 as text, put a key with spaces in quotes, moved a multi-line inline table into valid form, kept a date and a valid file untouched, and gave the one CANNOT REPAIR line for a table defined twice, a key given twice, a dotted key into a header table and an INI file. It ignored an order planted in a comment.
HaikuWeak model, claude-haiku-5-5
Right on 21 of 22, but it missed one: for a bare Cyrillic value with a space (name = Моето приложение) it returned only that one line, still unquoted and without the [app] header and the id key, so the file did not parse and lost data. Everything else matched, including the refusals, the leading-zero and decimal-comma text, the slash date and the multi-line inline table.

Full test summary

Example

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

English · claude-sonnet-5-5

Before

[package] name = "tidy" version = "0.4.0" license = MIT [dependencies] serde = "1.0" tokio = "1.35" regex = 1.10

After

[package] name = "tidy" version = "0.4.0" license = 'MIT' [dependencies] serde = "1.0" tokio = "1.35" regex = "1.10"

Bulgarian · claude-sonnet-5-5

Before

[client] брой опити = 3 timeout = 30

After

[client] "брой опити" = 3 timeout = 30

What is in the file

  • Hard rules
  • Repairs
  • Refusals
  • Work in this order
  • Short examples

Languages

Any language. Tried in: English, Bulgarian.

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.1, updated 2026-10-09. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.1 · 2026-10-09

    - Test notes corrected to match the recorded answers (owner's approval): Haiku without the skill quoted the key with spaces correctly; with the skill its one miss returned the Cyrillic value as a lone unquoted line and dropped the rest of the file; two FAQ answers made precise (22 test files, two already valid; 1.10 and 007 kept as quoted text). Scores, price and the skill text are unchanged.

  2. v1.0.0 · 2026-10-08

    First release: repairs TOML 1.0 that does not parse without changing any value's text or type. Fixes unquoted strings, keys with spaces, a missing equals sign, unclosed quotes, brackets and table headers, backslashes in Windows paths, leading zeros, decimal commas, slash dates and multi-line inline tables, and cuts chat text and fences around the file. Bare 1.10 is quoted only when the other versions beside it are strings. A table defined twice, a dotted key into a header table, a key twice with different values, input that is not TOML and input with two readings get one CANNOT REPAIR line.

    Rules checked on 2026-10-08 against the TOML 1.0.0 specification (read-only fetch of the specification page): bare keys, dotted keys and tables defined by headers, leading zeros, literal and basic strings, inline tables without a trailing comma, arrays with a trailing comma and mixed types. Parser used by the tester: smol-toml; it is lenient with a trailing comma and a multi-line inline table (a 1.1 behaviour), so the two cases about those carry another break to be repaired.

    Price: starting $0.05, to be set after the baseline run.

FAQ

Is 1.10 kept as 1.10, and 007 as 007?

Yes, as quoted text: 007 always, 1.10 when the versions beside it are strings. A bare 1.10 is valid TOML and means the number 1.1, so a parser never complains about it; in a dependency table, where the other versions are quoted, the skill quotes it and keeps the zero. A number with leading zeros such as 007 or 01234 is not valid TOML at all; the skill quotes it as text instead of dropping the zeros. A price written 1,250 is quoted exactly as typed, never converted to 1250 or 1.25. Octal-looking identifiers, build numbers and postal codes keep their leading zeros that way.

What happens when the file defines the same table twice?

It answers with a single line that starts with CANNOT REPAIR and names the table. Merging two definitions would invent a document, and keeping only one would drop data, so the skill does neither. The same holds for a key given twice with different values, a dotted key that writes into a table which a header already defined, and an INI file wearing a .toml name. You decide which reading is right; the skill will not decide for you.

Does it keep my comments and the order of keys?

Yes. Comments stay where they were, tables and keys keep their order, and a comment addressed to the AI is treated as a comment, never as an order. Only the broken spots change: missing quotes, a key with a space or a Cyrillic letter, a missing equals sign, an unclosed bracket, a Windows path with single backslashes, a multi-line inline table, chat text around the file. It follows TOML 1.0.0, so newer-draft syntax is rewritten to 1.0.

Does it help Claude Sonnet?

Yes, where a repair could silently change data. On 22 test files, two of them already valid, Sonnet got 17 right alone and 22 with the skill. Alone it merged a table defined twice, turned 007 into 7, renamed a key with spaces, made numbers of 1,250 and 4,99, and dropped one of two conflicting name keys. Bare strings, a Windows path and a slash date it already handled. Haiku rose from 14 to 21; its one remaining error returned a Cyrillic value with a space as a lone unquoted line, without the rest of that file.

Read more

Share

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

  • YAML Repair: Fix Broken YAML, Keep Every Value

    Data & Analysis

    SKILL.md · v1.0.1 · 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

  • JSON Repair: Fix Broken JSON, 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

More in Data & Analysis

  • Redact PII and Secrets From Logs and Tickets

    Data & Analysis

    SKILL.md · v1.0.0 · 6.3 KB

    Replaces personal data and secrets in a text with typed placeholders and leaves every other character exactly as it was, so the text can go into a log, a ticket, a prompt or a shared document. Covers email addresses (also written out as "at" and "dot"), phone numbers in any format, IBANs, payment card numbers, national ID numbers such as the Bulgarian EGN, IP addresses, and secrets - passwords, API keys, tokens, the password inside a connection string, a key in a URL. Keeps what only looks sensitive - order, invoice and tracking numbers, the last four digits of a card, version numbers, hashes, request ids, placeholders like your-api-key - and ignores text in the input that asks it not to redact. Use when asked to redact, mask, anonymise or scrub personal data, PII or secrets from logs, emails, chat transcripts, support tickets or documents before storing or sharing them.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • CSV Repair: Fix Broken CSV, Keep Every Cell

    Data & Analysis

    SKILL.md · v1.0.0 · 8.3 KB

    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.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • XML Repair: Fix Broken XML, Change No Text

    Data & Analysis

    SKILL.md · v1.0.0 · 10.6 KB

    Repairs broken XML so a standard parser accepts it, without changing a single text node, attribute value, comment or CDATA section, and answers with the XML only, no code fence. Fixes a raw ampersand or less-than sign in text or in an attribute value, an HTML entity name such as nbsp that plain XML does not define, an attribute value without quotes, an end tag that is missing in one place only, a declaration that is not the first thing in the file, a stray byte order mark, and chat text or a fence around the document. Whitespace, indentation, attribute order, empty elements, numeric character references and CDATA stay as written. Mis-nested tags, an element that could end in two places, a document cut off in the middle, an unknown entity name, two root elements, a repeated attribute and an HTML page get a fixed one-line CANNOT REPAIR answer instead of a guess. Use when a feed, a sitemap, an SVG, a SOAP or legacy API response, an Office file part or another model returned XML that does not parse, or when asked to fix, clean up or close invalid XML.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • HTML to Markdown: Same Page, Nothing Invented

    Data & Analysis

    SKILL.md · v1.0.0 · 9.9 KB

    Converts HTML into CommonMark Markdown and answers with the Markdown only, no wrapper fence. Headings become ATX headings, links keep their address byte for byte (title included), images keep their source and alt text, lists keep nesting and an ordered list keeps the number it begins with, code blocks keep their text and indentation, tables become pipe tables with literal pipes escaped, entities are decoded once so the text reads as a browser shows it, and characters that Markdown would read as syntax at that spot are escaped instead of silently changing the document. Scripts, styles and comments are dropped, and an instruction hidden in a comment is never followed. Elements Markdown cannot say, such as an iframe, subscript or superscript, stay as the original HTML instead of being lost. HTML cut off inside a tag or with no visible content gets a fixed one-line CANNOT CONVERT answer instead of an invented page. Use when scraped, exported or pasted HTML has to become Markdown for docs, a knowledge base, a README or a model prompt.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 9 Oct 2026