{"slug":"markdown-table-repair","name":"Markdown Table Repair: Fix the Table, Keep Every Cell","version":"1.0.0","updated_at":"2026-10-08T16:22:26.244Z","use_when":"Repairs a broken Markdown table so GitHub Flavored Markdown renders it as one table with the right columns, without changing the text of any cell, and answers with the table only, no code fence. Adds a missing or malformed alignment row and keeps the alignment colons it finds, adds the missing leading and trailing pipes, escapes a literal pipe inside a cell as backslash-pipe (also inside inline code), pads a short row with empty cells without moving a cell, and turns a tab-separated or HTML table into a Markdown table. Bold, links, code, emoji, numbers such as 007 and 1.10, backslashes and double spaces inside a cell stay exactly as written. A row with more cells than the header, an alignment row that cannot be matched to its columns, a pipe that cannot be told from a border and text with no table get a fixed one-line CANNOT REPAIR answer instead of a guess that moves data between columns. Use when a README, wiki page or another model's answer shows a table as plain text with pipes, or when asked to fix, clean up or convert a table to Markdown.","not_for":"Checking numbers, sorting rows, merging columns, changing alignment or translating cells; spreadsheets; CSV (use csv-repair). Longer rows, unmatched delimiter rows with colons, ambiguous pipes and text with no table get a CANNOT REPAIR line. A table not rendering or a tab-separated to Markdown table job is in scope. Follows the GitHub Flavored Markdown tables extension.","languages":["any"],"tags":["markdown","markdown-table","gfm","table-repair","readme","llm-output","no-guessing"],"category":"data","category_url":"https://aiskills402.com/categories/data","keywords":["broken Markdown table","table not rendering","tab-separated to Markdown table"],"faq":[{"q":"Why does a row with one cell too many get a refusal?","a":"GitHub Flavored Markdown drops a surplus cell without any warning, and an unescaped pipe in plain text looks exactly like a border. The surplus value might be part of the product name, a note or the price, and each choice leaves a different number under a different heading. So the skill names the offending row in a CANNOT REPAIR line and a person decides. The same line answers a delimiter row whose colons cannot be matched to the header cells, and a paragraph that merely mentions a pipe, because a renderer would build a table from nothing."},{"q":"Does it touch my numbers, links and code?","a":"No cell text is rewritten. Zeros before a number, a trailing zero after a decimal point, bold text, links, inline code and emoji stay as typed, a backslash stays a backslash and a double space between two words stays too. Only the frame changes: the pipes at the edges, the alignment row, and empty cells at the end of a short row. A single edit to cell text is allowed, a backslash in front of a literal pipe inside inline code, and only when that gives the row exactly the header width. Anything else that looks wrong in a cell is left for a person to judge."},{"q":"What about tab-separated text and HTML tables?","a":"Both become a Markdown table: the first line or the header cells form the header row, each tab or cell is a border, the tags are dropped and the text is kept. A pipe inside such a cell is escaped, because the cell is already delimited by the tab or the tag and there is no doubt where it belongs. An HTML cell with a line break in it is refused, because a Markdown cell has no line breaks."},{"q":"Does it help Claude Sonnet?","a":"Where a guess is the wrong answer, yes. Bare Sonnet scored 17 of 21 tables; with the skill it scored all 21. The plain repairs it did alone: alignment row, pipe inside code, 007 and 1.10 kept, tabs, a cell giving orders. It missed four: a row with one cell too many (it invented a column, in English and Bulgarian), two colons over three columns (it guessed a third) and a sentence that only mentions a pipe (it built a table). Haiku went from 17 to 20 of 21, but one tab-separated line got an empty fourth cell."}],"examples":[{"lang":"en","model":"claude-sonnet-5-5","input_excerpt":"| call | note |\n| --- | --- |\n| `a|b` | ok |\n| `x` | fine |","output_excerpt":"| call | note |\n| --- | --- |\n| `a\\|b` | ok |\n| `x` | fine |"},{"lang":"bg","model":"claude-sonnet-5-5","input_excerpt":"| продукт | цена |\n| --- | --- |\n| Хляб | 2 |\n| Мляко | прясно | 3 |","output_excerpt":"CANNOT REPAIR: row 2 has 3 cells, the header has 2"},{"lang":"de","model":"claude-sonnet-5-5","input_excerpt":"Straße | Ort | Nr\nMüllerweg | Köln | 12\nGroße Gasse | Düsseldorf | 7","output_excerpt":"| Straße | Ort | Nr |\n| --- | --- | --- |\n| Müllerweg | Köln | 12 |\n| Große Gasse | Düsseldorf | 7 |"},{"lang":"es","model":"claude-sonnet-5-5","input_excerpt":"| Nº | Nombre | Ciudad |\n| --- | :-: | --- |\n| 1 | José | Málaga |\n| 2 | Lucía | |","output_excerpt":"| Nº | Nombre | Ciudad |\n| --- | :-: | --- |\n| 1 | José | Málaga |\n| 2 | Lucía | |"}],"page_url":"https://aiskills402.com/skills/markdown-table-repair","markdown_url":"https://aiskills402.com/skills/markdown-table-repair.md","image_url":"https://cdn.aiskills402.com/og/skills/markdown-table-repair/38abccf0.png","related_url":"https://api.aiskills402.com/v1/skills/markdown-table-repair/related","purchases_count":null,"tested":{"date":"2026-10-08","strong":{"model":"claude-sonnet-5-5 (Claude Code alias \"sonnet\")","verdict":"Right on all 21 setups, read by hand: it added the missing alignment row, escaped the pipe inside inline code and inside an HTML cell, kept 007, 1.10, 1,250, the double spaces and the backslashes in a path, turned tab-separated text into a table, padded short rows at the end, ignored a planted cell that told it to reply OK, and answered the fixed CANNOT REPAIR line for a row with one cell too many (English and Bulgarian), for an alignment row with two colons over three columns, and for a sentence that only mentions a pipe."},"weak":{"model":"claude-haiku-5-5 (Claude Code alias \"haiku\")","verdict":"Right on 20 of 21 by the skill's own checks, but it missed one detail on the tab-separated text: it turned the short last line into a table row with a fourth, empty cell, so that row is wider than the header. The cell text was right and every other setup matched, including the refusals for the long row, the unmatched alignment row and the sentence with a pipe."},"note":"Twenty-one inputs written by us (15 with a trap, 6 controls that are already valid or only need the frame): a pipe inside code, a long row, a missing alignment row, a short row, tabs, an HTML table, a Bulgarian, a German and a Spanish table, a planted instruction in a cell. Each answer is scored by one regex built from the expected cells, byte for byte; spaces around the pipes, edge pipes, the number of hyphens and missing empty cells at the end of a short row are free, a code fence, a sentence around the table, a moved or changed cell or an unescaped pipe fails. Rules re-checked on 2026-10-08 against the GitHub Flavored Markdown tables extension (read-only fetch); the refusal rules are our own decision and not a claim about the renderer. Checks widened after the run: for the alignment row with two colons over three columns, a table without any colons now passes next to the refusal, on both sides, because dropping the colons guesses nothing; a table that keeps or invents a colon still fails. One run per model and case. The sets of the with and without side use the same inputs and the same request.","baseline":{"date":"2026-10-08","rows":[{"label":"Tables repaired right (21 tables)","better":"higher","strong":{"with":{"n":21,"of":21},"without":{"n":17,"of":21}},"weak":{"with":{"n":20,"of":21},"without":{"n":17,"of":21}}}],"note":"Same request on both sides; the bare side is scored on the table in any phrasing, fence removed first, and a clear refusal in any words is accepted where the skill refuses. Read by hand, Sonnet without the skill did the 17 plain repairs alone: missing alignment row, pipes in code and HTML cells, numbers and spaces untouched, tabs, short rows, the planted order. It missed the four places where the honest answer is a refusal: it invented a column for a row with one cell too many (English and Bulgarian), guessed a third alignment for two colons over three columns, and built a table out of a sentence. Haiku without the skill missed the same four, merging the extra cell into its neighbour, adding an empty header, guessing the alignment. Haiku with the skill still added an empty fourth cell to a tab-separated line."},"report_url":null},"price_usd":"0.05","price_micro":50000,"size_bytes":10282,"sha256":"e4c77db7b7da52ac7e12bab1fbd512b2f072a8ac32bda1ac8bf24e22d9af2167","outline":["Hard rules","What the renderer needs","The output form","Repairs","When to refuse","Work in this order","Short examples"],"license":{"summary":"Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing","holder":"Georgi Kalchev, aiskills402.com","url":"https://aiskills402.com/docs#license"},"buy_url":"https://api.aiskills402.com/v1/skills/markdown-table-repair/file","redownload_url_template":"https://api.aiskills402.com/v1/purchases/{token}","mcp_tool":null,"payment":{"protocol":"x402","scheme":"exact","asset":"USDC","selling":true,"network":"base","network_caip2":"eip155:8453","pay_to":"0x8e37022edcf0f21cf3c9f93fee9d4d32519f36f4","facilitator":"cdp"},"seo_title":"Markdown Table Repair Skill for GFM","seo_description":"Fix a Markdown table that does not render: alignment row, pipes, escaped pipes, short rows; every cell kept, refuses a guess. Pay $0.05 once, in USDC.","versions":[{"version":"1.0.0","date":"2026-10-08","changelog":"# Changelog\n\n## 1.0.0 — 2026-10-08\n\nFirst release: repairs a broken Markdown table so GitHub Flavored Markdown renders it as one table with the right columns, without changing the text of any cell. Adds a missing or malformed alignment row and keeps alignment colons, adds missing pipes, escapes a literal pipe (also inside inline code) when it is clear which cell it belongs to, pads a short row at the end, turns tab-separated and HTML tables into Markdown tables. A longer row, a delimiter row with colons that does not match the header, an ambiguous pipe and text with no table get a fixed one-line CANNOT REPAIR answer.\n\nRules checked on 2026-10-08 against the GitHub Flavored Markdown specification, tables extension (read-only fetch): header plus delimiter row of equal cell count, optional edge pipes, trimmed spaces, escaped pipes also inside code and bold, short rows padded and long rows cut by the renderer, table ends at the first empty line. Our own decisions: refusal on a longer row, the clear-pipe rule, completing a short colon-free delimiter row.\n\nTest set: 21 cases (15 traps, 6 controls); control.mjs makes no model call and passes. No model measurement yet; the price below is the starting price (class B), to be set after the baseline.\n\n## 1.0.1 — 2026-10-08 (test run and listing)\n\nCheck change after the run (both sides, control.mjs extended and green): `short-delimiter-colons` accepts, next to the one-line refusal, a plain table with the colons dropped and every cell kept (nothing is guessed). A table that keeps a colon or invents one on the third column still fails. Scores did not change.\n\nMeasured, Sonnet: 21 of 21 with the skill, 17 of 21 without (gain 4: long row in English and Bulgarian, two colons over three columns, sentence with a pipe). Haiku: 20 of 21 with, 17 of 21 without; with the skill it added an empty fourth cell to a short tab-separated line. One run per model and case.\n\nPrice set to $0.05 (Sonnet gain 4).\n"}]}