Converts fixed-width text (mainframe exports, bank and statistics files, printed reports) into RFC 4180 CSV from a column specification and answers with the CSV only, no code fence. Positions are 1-based and inclusive unless the spec says otherwise, and count characters, so accented and Cyrillic letters do not shift later columns. Every cell is the exact characters of its positions: nothing is trimmed unless the spec says trim, leading zeros and inner spaces stay, numbers stay text, and an implied decimal becomes a point only where the spec states it. A value with a comma or a quote is quoted. A line that does not fit the spec, overlapping columns, a tab, a byte-based spec meeting non-ASCII text, or a signed overpunch digit gets a fixed one-line CANNOT CONVERT answer instead of a guessed table. Use when a fixed-width file has to become CSV for a spreadsheet, a database or a data pipeline.
Fixed-Width to CSV: Cut by Spec, Trim Only When Told is a tested SKILL.md that converts fixed-width text (mainframe exports, bank and statistics files, printed reports) into RFC 4180 CSV from a column specification and answers with the CSV only, no code fence; an agent buys it once for $0.03 over x402.
Not for
Files whose columns the spec does not define: no layout is guessed. A line that does not fit the spec, overlapping columns, a tab, a byte-based spec meeting non-ASCII text or a signed overpunch digit gets a one-line CANNOT CONVERT answer. It decodes no packed or binary fields and sums, sorts or reformats nothing. Output follows RFC 4180: comma, LF (CRLF on request).
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 |
| with | without | with | without |
|---|
| Files converted or refused right (24 files) |
| Files converted or refused right (24 files) | 24/24 | 21/24 | 23/24 | 20/24 |
|---|
Same request on both sides, a fence removed first. Read by hand, Sonnet without the skill already cut columns by position, kept padding, handled implied decimals and multi-byte letters, and refused lines of the wrong length. It missed three that call for a refusal: it split overlapping columns anyway, cut byte positions through a non-ASCII letter, and assigned an unnamed gap to a neighbouring column. Haiku without the skill missed the same three and placed an implied decimal wrong.
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 24 files, read by hand: it cut every column by character position, kept padding unless the spec said trim, inserted implied decimals where the spec named them, skipped a header line when told, read start-plus-length and zero-based specs right, counted Cyrillic, accented and Spanish letters as one position each, quoted fields that hold a comma, and refused with one CANNOT CONVERT line where the spec cannot be applied without a guess: overlapping columns, byte positions that fall inside a non-ASCII letter, a gap no column names, a line too short or too long for the spec. It treated a planted line as data.
- HaikuWeak model, claude-haiku-5-5
- Right on 23 of 24 files, read by hand, but it missed one: on the Cyrillic file it counted the first line as 25 characters instead of 24 and refused a file it should have converted.
Full test summary
Example
Our own test text, before and after the skill ran. Excerpts only.
English · claude-sonnet-5-5
Before
00042 7.50Ann X1
00007 120.00Bo Lee Y2
10000 12.00Cy Z3
After
id,amount,name,code
00042 , 7.50,Ann ,X1
00007 , 120.00,Bo Lee ,Y2
10000 , 12.00,Cy ,Z3
Bulgarian · claude-sonnet-5-5
Before
Иван София A001
Георги Ив.Пловдив B002
Ели Варна C003
After
name,city,code
Иван,София,A001
Георги Ив.,Пловдив,B002
Ели,Варна,C003
German · claude-sonnet-5-5
Before
Müller 12,50 0007
Weiß 1.250,00 0012
Grün 007,5 0100
After
name,betrag,menge
Müller,"12,50",0007
Weiß,"1.250,00",0012
Grün,"007,5",0100
Spanish · claude-sonnet-5-5
Before
José Málaga 41
Peña Sevilla 7
Ñandú León 30
After
nombre,ciudad,edad
José,Málaga,41
Peña,Sevilla,7
Ñandú,León,30
What is in the file
- Hard rules
- Reading the spec
- Cutting a cell
- The output form
- 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.
v1.0.0 · 2026-10-08
First release: converts fixed-width text into RFC 4180 CSV from a column specification. Positions are 1-based and inclusive unless the spec says otherwise (start+length and 0-based forms are read as stated), counted in characters. Every cell is the exact characters of its positions: nothing is trimmed unless the spec says trim, leading zeros and inner spaces stay, numbers stay text, and an implied decimal becomes a point only where the spec states it. Values with a comma or quote are quoted. A line that does not fit the spec (short with no rule, long with no named filler, unnamed gap, overlap, tab, a byte-based spec meeting non-ASCII text, a signed overpunch digit) gets a fixed one-line CANNOT CONVERT answer.
Rules checked on 2026-10-08 against RFC 4180 (read-only fetch: fields with commas, double quotes or line breaks are enclosed in double quotes; a quote inside is doubled; spaces are part of a field; the last line break is optional). Fixed-width layout has no governing standard, so the conventions are our own decisions, taken from Fable's brief 3.28 and stated in every test spec. Not tested: East Asian wide characters, combining sequences, rtrim of a field made only of spaces, a spec with an unstated counting convention, and the carriage-return-only line ending.
Tests (24 cases: 18 traps including 7 refusals, 6 controls) written and the control run done on 2026-10-08, no model calls yet. Model results and the price check come after the queued run.
FAQ
Does it trim the padding of my fields?
Only where your spec says trim, for one column, a list of columns or the whole file, and it tells apart trimming both ends from trimming trailing spaces only. A column that is not named keeps every space it holds in the line, because in a fixed-width file the padding can be part of the data, for example a code that is compared with its padding. Leading zeros and numbers written with commas or dots stay exactly as they are; nothing is turned into a number.
What happens to accented letters, Cyrillic and emoji?
Each takes one position, the way a character does, whatever bytes it needs in a file. Columns after a name with accents therefore stay where the spec puts them. If your spec says its positions are bytes and the text holds only plain ASCII, the two counts agree and the file is converted. If the spec says bytes and some line holds a non-ASCII character, there are two readings, so you get a refusal that names the column, not a guess.
Does it help Claude Sonnet?
On the cases that need a refusal. We gave twenty-four fixed-width files with their specs to Sonnet and Haiku, each with and without the file. Without it, Sonnet cut columns well but guessed three times where no right answer exists: overlapping columns, byte positions that split a non-ASCII letter, and a gap the spec does not name. That is 21 right; with the file, 24. Haiku went from 20 to 23. Implied decimals are inserted when the spec says how many.
What if a line is shorter or longer than the spec?
You get one line starting with CANNOT CONVERT and naming the problem, unless the spec gives a rule: records may be short, in which case missing columns are empty, or a trailing part is named as filler, in which case it is ignored. A gap between columns that holds characters and is not named, overlapping columns and a tab in a line are refused the same way, because each would need a rule nobody gave.