Data & Analysis

YAML Repair: Fix Broken YAML, Keep Every Value

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.

YAML Repair: Fix Broken YAML, Keep Every Value is a SKILL.md that 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; an agent buys it once for $0.05 over x402.

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

Not for

Checking that a config is correct or fits a schema; guessing values that were cut off; reformatting, sorting or merging YAML that already loads; JSON, TOML or XML; adding comments. Duplicate keys, input that is not YAML at all, and input with two readings get a one-line answer instead of a guess.

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
Values right (code fence ignored)22/2216/2221/2216/22
Right and parses as it is22/220/2220/229/22

The same request on both sides, asking for the YAML only. Without the skill the answers were mostly in a code fence (Sonnet 21 of 22, Haiku 12 of 22), which is why the second row is so low; the first row removes the fence. Read by hand, Sonnet without the skill made real errors: 1,250 became 1250, debug: off was left unquoted for a YAML 1.1 reader, 1.10 was put in quotes (a number became a string), draft: no became false in front matter, and an HTML error page and a plain error message were turned into invented YAML (a map with a retry-time field for the page, an error key holding the message) instead of a refusal. Refusals in any wording count as right on the plain side.

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 cases, answering with bare YAML every time: tabs became spaces, a cut-off summary was closed with its quote and kept as cut, a value with a colon inside and a pattern starting with a star got quotes, 1,250 stayed a string, NO and yes stayed strings, the on: key of a workflow stayed on, 1.10 stayed unquoted, and for a YAML 1.1 reader NO and off were quoted. Front matter came back without the dash lines or the Markdown, an HTML error page and a plain error message each got the single line # not yaml, and valid input kept its values.
HaikuWeak model, claude-haiku-5-5
Right on 21 of 22 cases, but not on the one with a note addressed to the AI: it left the value, which contains a colon and a space, without quotes, so the file still does not parse. One more answer, the YAML 1.1 case, came in a code fence, which a program cannot read as it is. Everything else matched Sonnet: tabs, cut-off values, 1,250, NO, the refusals and the front matter.

Full test summary

Example

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

English · claude-sonnet-5-5

Before

title: Release notes summary: "the cut te

After

title: Release notes summary: "the cut te"

Bulgarian · claude-sonnet-5-5

Before

град: "София население: 1286000 статус: столица

After

град: "София" население: 1286000 статус: столица

What is in the file

  • Hard rules
  • Repairs
  • 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): the YAML Sonnet invented without the skill was a map with a retry-time field for the page and an error key holding the message, not error codes. Scores, price and the skill text are unchanged.

  2. v1.0.0 · 2026-10-08

    First release: repairs broken YAML and Markdown front matter without changing any value's text or type. Fixes tabs as indentation, indentation that fits no parent, quotes and brackets that do not close, and values that need quotes; a value cut off at the end is closed and kept as cut. Yes, no, on, off and NO stay strings, 1,250 stays a string, text that already parses is never re-quoted. Duplicate keys, input that is not YAML and input with two readings get a fixed one-line answer.

    Price $0.05. Measured value for the strong model: Sonnet 16 of 22 without the skill, 22 of 22 with it.

FAQ

Will it turn NO, yes, on or off into true and false?

No. Under YAML 1.2 these are plain strings and the skill leaves them as they are, so country: NO stays the text NO. If your reader is a YAML 1.1 parser, say so in the task and the skill puts double quotes around each of them, which is the only way a 1.1 reader keeps them as text. Keys are treated the same way, so a workflow file keeps its on: trigger instead of getting a key named true. Only the words themselves are protected; a real true or false in the file is untouched.

How does it treat a value cut off at the very end?

The open quote or bracket is closed and the value stays exactly as far as it got. A cut summary is not finished, a cut list is not completed. This differs from our JSON repair skill, where the cut value becomes null. A key cut off before its colon is dropped, since half a name is not a name, and a key with a colon and nothing after it keeps its empty value. That is the honest choice when nothing tells you the missing text.

Does it touch numbers like 1,250 or 1.10?

No. Text that already loads is neither quoted nor unquoted: a price written 1,250 is left alone, 1.10 stays the number 1.1, and a zip code 01234 stays exactly as written. Quotes are added only where the file would otherwise fail, for example around a value that holds a colon and a space, or begins with a star or an at sign. Curly quotes and Cyrillic text inside a value are ordinary characters and are never straightened or translated. Numbers are never computed or rounded.

Does the skill make a difference for Claude Sonnet?

A clear one. On 22 of our cases Sonnet scored 16 alone and 22 with the skill, the fence ignored. Alone, 1,250 became 1250, debug: off stayed unquoted for a YAML 1.1 reader, 1.10 got quotes, draft: no became false, and an HTML page and an error message were turned into made-up YAML. It also wrapped 21 of 22 answers in a fence. With the skill every answer was bare YAML.

Read more

Share

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

  • 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

  • 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

More in Data & Analysis

  • Recommended

    Env File Repair: Fix .env and INI Syntax, Keep Values

    Data & Analysis

    SKILL.md · v1.0.2 · 10.4 KB

    Repairs a broken .env file or INI file so the program that loads it reads every variable with the value its author meant, and answers with the file only, no code fence. Quotes a value that holds a hash sign or must keep its leading or trailing spaces, closes a quote that was left open, joins a key pasted over several lines, picks the quote style that keeps backslashes and mixed quotes intact, and leaves numbers such as 007 and 1.10, empty values and placeholders exactly as written. A key set twice to different values, a bare line that may be a lost key, a quote with two ways to close, and input that is JSON or another format get a one-line CANNOT REPAIR answer instead of a guess. Use when a config pasted from chat or model output loads wrongly, cuts a value short, or fails to parse, or when asked to fix, clean up or close a broken env file.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • TOML Repair: Fix Broken TOML, Keep Every Value

    Data & Analysis

    SKILL.md · v1.0.1 · 9.5 KB

    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.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 8 Oct 2026

  • 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