Evals / pdf / Multi-step jobs

Collect invoice line items

The invoices folder has three PDF invoices. Put every line item from all of them into items.csv, with a single header row.

The task

The reference answer shows the job can be done with deft. It is not an agent run.

deft pdf extract-sheets invoices/ -o tables/
deft sheet merge tables/invoice-1-table-1.csv tables/invoice-2-table-1.csv tables/invoice-3-table-1.csv -o items.csv

Input

invoices/invoice-1.pdf 17.2 KB · 1 page
Page 1
invoices/invoice-2.pdf 16.4 KB · 1 page
Page 1
invoices/invoice-3.pdf 16.6 KB · 1 page
Page 1

Reference output

items.csv 213 B
ItemQtyUnit price
Paper, A4 box1230.00
Toner cartridge285.00
Desk lamp324.50
Business cards5000.12
Poster, large109.75
Binding46.20
Lunch for ten1140.00
Coffee service238.00
Delivery115.00
ItemQtyUnit price
Paper, A4 box1230.00
Toner cartridge285.00
Desk lamp324.50
ItemQtyUnit price
Business cards5000.12
Poster, large109.75
Binding46.20
ItemQtyUnit price
Lunch for ten1140.00
Coffee service238.00
Delivery115.00
How a result is judged (1 check)
  • python: code = "import csv\nrows = list(csv.reader(open('items.csv', encoding='utf-8-sig')))\ntext = ' '.join(' '.join(r) for r in rows)\nfor item in ('Toner cartridge', 'Business cards', 'Lunch for ten', 'Delivery'):\n assert item in text, item\nassert len([r for r in rows if any(c.strip() for c in r)]) == 10, len(rows)\nheading = [r for r in rows if any(c.strip().lower() in ('qty', 'quantity') for c in r)]\nassert len(heading) == 1 and heading[0] == rows[0], 'want one header row, at the top'\nassert 'Thank you' not in text and 'Payment' not in text, 'text around the table came too'\n"

Runs

CodexWithout deftPassed2026-11-07

Time
65s
New tokens
33.3k
Total input
313.6k
Output tokens
1.3k
Commands
10
Failed
1

Trace

  1. I’ll inspect the three PDFs in the current directory and extract their line items into one CSV with a single header row.

  2. rg --files
    output
    invoices/invoice-3.pdf
    invoices/invoice-2.pdf
    invoices/invoice-1.pdf
  3. for f in invoices/*.pdf; do echo "--- $f"; pdftotext -layout "$f" -; done (exit 127)
    output
    --- invoices/invoice-1.pdf
    zsh:1: command not found: pdftotext
    --- invoices/invoice-2.pdf
    zsh:1: command not found: pdftotext
    --- invoices/invoice-3.pdf
    zsh:1: command not found: pdftotext
  4. python3 - <<'PY' import importlib.util for x in ['pypdf','PyPDF2','pdfplumber','fitz']: print(x, bool(importlib.util.find_spec(x))) PY file invoices/*.pdf
    output
    pypdf False
    PyPDF2 False
    pdfplumber False
    fitz False
    invoices/invoice-1.pdf: PDF document, version 1.7, 1 pages
    invoices/invoice-2.pdf: PDF document, version 1.7, 1 pages
    invoices/invoice-3.pdf: PDF document, version 1.7, 1 pages
  5. which swift; strings invoices/invoice-1.pdf | head -80
    output
    /usr/bin/swift
    %PDF-1.7
    1 0 obj
    <</Type/Pages/Count 1/Kids[38 0 R]>>
    endobj
    2 0 obj
    <</Parent 3 0 R/Title(Invoice from Northwind Supplies)/Dest 30 0 R>>
    endobj
    3 0 obj
    <</Type/Outlines/First 2 0 R/Last 2 0 R/Count 1>>
    endobj
    4 0 obj
    <</Type/StructTreeRoot/RoleMap<</Datetime/Span/Terms/Part/Title/P/Strong/Span/Em/Span>>/K[28 0 R]/ParentTree<</Nums[0 5 0 R]>>/IDTree<</Names[(U1x0y0)8 0 R(U1x1y0)9 0 R(U1x2y0)10 0 R]>>/ParentTreeNextKey 1>>
    endobj
    5 0 obj
    [6 0 R 7 0 R 8 0 R 9 0 R 10 0 R 13 0 R 14 0 R 15 0 R 17 0 R 18 0 R 19 0 R 21 0 R 22 0 R 23 0 R 27 0 R]
    endobj
    6 0 obj
    <</Type/StructElem/S/H1/P 28 0 R/T(Invoice from Northwind Supplies)/K[0]/Pg 38 0 R>>
    endobj
    7 0 obj
    <</Type/StructElem/S/P/P 28 0 R/K[1]/Pg 38 0 R>>
    endobj
    8 0 obj
    <</Type/StructElem/S/TH/P 11 0 R/ID(U1x0y0)/A[<</O/Table/Scope/Column/Headers[]>><</O/Layout/BorderStyle/Solid>>]/K[2]/Pg 38 0 R>>
    endobj
    9 0 obj
    <</Type/StructElem/S/TH/P 11 0 R/ID(U1x1y0)/A[<</O/Table/Scope/Column/Headers[]>><</O/Layout/BorderStyle/Solid>>]/K[3]/Pg 38 0 R>>
    endobj
    10 0 obj
    <</Type/StructElem/S/TH/P 11 0 R/ID(U1x2y0)/A[<</O/Table/Scope/Column/Headers[]>><</O/Layout/BorderStyle/Solid>>]/K[4]/Pg 38 0 R>>
    endobj
    11 0 obj
    <</Type/StructElem/S/TR/P 12 0 R/K[8 0 R 9 0 R 10 0 R]>>
    endobj
    12 0 obj
    <</Type/StructElem/S/THead/P 26 0 R/K[11 0 R]>>
    endobj
    13 0 obj
    <</Type/StructElem/S/TD/P 16 0 R/A[<</O/Table/Headers[(U1x0y0)]>><</O/Layout/BorderStyle/Solid>>]/K[5]/Pg 38 0 R>>
    endobj
    14 0 obj
    <</Type/StructElem/S/TD/P 16 0 R/A[<</O/Table/Headers[
    … 1451 more characters
  6. strings invoices/invoice-1.pdf | tail -80
    output
    `X#:"z
    endstream
    endobj
    46 0 obj
    <</Length 258/N 1/Range[0 1]/Filter/FlateDecode>>
    stream
    C|>b
    E5VW~
    endstream
    endobj
    47 0 obj
    <</Title(Invoice from Northwind Supplies)/Creator(Typst 0.15.1)>>
    endobj
    48 0 obj
    <</Length 989/Type/Metadata/Subtype/XML>>
    stream
    <?xpacket begin="
    " id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:xmp="http://ns.adobe.com/xap/1.0/"  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"  xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"  xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><dc:title><rdf:Alt><rdf:li xml:lang="x-default">Invoice from Northwind Supplies</rdf:li></rdf:Alt></dc:title><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmpTPg:NPages>1</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>EguakeDzXd3vSxeyC4k54A==</xmpMM:InstanceID><xmpMM:DocumentID>EguakeDzXd3vSxeyC4k54A==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
    endstream
    endobj
    49 0 obj
    <</Type/Catalog/Pages 1 0 R/Metadata 48 0 R/Lang(en)/StructTreeRoot 4 0 R/MarkInfo<</Marked true/Suspects false>>/ViewerPreferences<</Direction/L2R>>/Outlines 3 0 R>>
    endobj
    xref
    0 50
    0000000000 65535 f
    0000000016 00000 n
    000000
    … 1029 more characters
  7. python3 - <<'PY' import re,zlib b=open('invoices/invoice-1.pdf','rb').read() for m in re.finditer(rb'<<(.*?)>>\\s*stream\\r?\\n',b,re.S): d=m.group(1); start=m.end(); end=b.find(b'endstream',start); raw=b[start:end].rstrip(b'\\r\\n') try: out=zlib.decompress(raw) except: continue print('\\n---',d[:200]); print(out[:5000]) PY
    output
    --- b'/Type/Pages/Count 1/Kids[38 0 R]>>\nendobj\n2 0 obj\n<</Parent 3 0 R/Title(Invoice from Northwind Supplies)/Dest 30 0 R>>\nendobj\n3 0 obj\n<</Type/Outlines/First 2 0 R/Last 2 0 R/Count 1>>\nendobj\n4 0 obj\n<'
    b'\xff\xff\xfc'
    
    --- b'/Length 446/Type/CMap/Filter/FlateDecode/WMode 0'
    b'%!PS-Adobe-3.0 Resource-CMap\n%%DocumentNeededResources: procset CIDInit\n%%IncludeResource: procset CIDInit\n%%BeginResource: CMap Custom\n%%Title: (Custom Adobe Identity 0)\n%%Version: 1\n%%EndComments\n/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo 3 dict dup begin\n    /Registry (Adobe) def\n    /Ordering (Identity) def\n    /Supplement 0 def\nend def\n/CMapName /Custom def\n/CMapVersion 1 def\n/CMapType 0 def\n/WMode 0 def\n1 begincodespacerange\n<0000> <FFFF>\nendcodespacerange\n21 beginbfchar\n<0001> <0049>\n<0002> <006E>\n<0003> <0076>\n<0004> <006F>\n<0005> <0069>\n<0006> <0063>\n<0007> <0065>\n<0008> <0020>\n<0009> <0066>\n<000A> <0072>\n<000B> <006D>\n<000C> <004E>\n<000D> <0074>\n<000E> <0068>\n<000F> <0077>\n<0010> <0064>\n<0011> <0053>\n<0012> <0075>\n<0013> <0070>\n<0014> <006C>\n<0015> <0073>\nendbfchar\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend\n%%EndResource\n%%EOF'
    
    --- b'/Length 2500/Filter/FlateDecode/Subtype/CIDFontType0C'
    b'\x01\x00\x04\x04\x00\x01\x01\x01\x15LibertinusSerif-Bold\x00\x01\x01\x01F\xf8\x1b\xf8\x1c\x8b\x0c\x1e\xf8\x1d\x0c\x00\x1e\n\x00\x1f\x8b\x8b\x1e\n\x00\x1f\x8b\x8b\x0c\x07\x1c\xe7}\xfb\xdc\x1c\x
    … 34165 more characters
  8. swift -e 'import PDFKit; import Foundation; for p in CommandLine.arguments.dropFirst() { let d=PDFDocument(url: URL(fileURLWithPath:p))"'!; print("--- '"\\(p)\"); print(d.string ?? \"\") }' invoices/invoice-1.pdf invoices/invoice-2.pdf invoices/invoice-3.pdf
    output
    --- invoices/invoice-1.pdf
    Invoice from Northwind Supplies
    Payment is due within 30 days of this invoice.
    Item Qty Unit price
    Paper, A4 box 12 30.00
    Toner cartridge 2 85.00
    Desk lamp 3 24.50
    Thank you for your business.
    --- invoices/invoice-2.pdf
    Invoice from Harbor Print Co
    Payment is due within 30 days of this invoice.
    Item Qty Unit price
    Business cards 500 0.12
    Poster, large 10 9.75
    Binding 4 6.20
    Thank you for your business.
    --- invoices/invoice-3.pdf
    Invoice from Greenline Catering
    Payment is due within 30 days of this invoice.
    Item Qty Unit price
    Lunch for ten 1 140.00
    Coffee service 2 38.00
    Delivery 1 15.00
    Thank you for your business.
  9. which mutool pdftotext qpdf gs; swift -e 'import PDFKit; print(\"hi\")'
    output
    mutool not found
    pdftotext not found
    qpdf not found
    /usr/local/bin/gs
    hi
  10. for f in invoices/*.pdf; do echo "--- $f"; gs -q -dNOPAUSE -dBATCH -sDEVICE=txtwrite -sOutputFile=- "$f"; done
    output
    --- invoices/invoice-1.pdf
                    Invoice from Northwind Supplies
                    Payment is due within 30 days of this invoice.
                     Item              Qty   Unit price
                     Paper, A4 box     12    30.00
                     Toner cartridge   2     85.00
                     Desk lamp         3     24.50
                    Thank you for your business.
    --- invoices/invoice-2.pdf
                    Invoice from Harbor Print Co
                    Payment is due within 30 days of this invoice.
                     Item             Qty   Unit price
                     Business cards   500   0.12
                     Poster, large    10    9.75
                     Binding          4     6.20
                    Thank you for your business.
    --- invoices/invoice-3.pdf
                    Invoice from Greenline Catering
                    Payment is due within 30 days of this invoice.
                     Item            Qty   Unit price
                     Lunch for ten   1     140.00
                     Coffee service  2     38.00
                     Delivery        1     15.00
                    Thank you for your business.
  11. cat > items.csv <<'EOF' invoice,vendor,item,quantity,unit_price invoice-1.pdf,Northwind Supplies,\"Paper, A4 box\",12,30.00 invoice-1.pdf,Northwind Supplies,Toner cartridge,2,85.00 invoice-1.pdf,Northwind Supplies,Desk lamp,3,24.50 invoice-2.pdf,Harbor Print Co,Business cards,500,0.12 invoice-2.pdf,Harbor Print Co,\"Poster, large\",10,9.75 invoice-2.pdf,Harbor Print Co,Binding,4,6.20 invoice-3.pdf,Greenline Catering,Lunch for ten,1,140.00 invoice-3.pdf,Greenline Catering,Coffee service,2,38.00 invoice-3.pdf,Greenline Catering,Delivery,1,15.00 EOF cat items.csv
    output
    invoice,vendor,item,quantity,unit_price
    invoice-1.pdf,Northwind Supplies,"Paper, A4 box",12,30.00
    invoice-1.pdf,Northwind Supplies,Toner cartridge,2,85.00
    invoice-1.pdf,Northwind Supplies,Desk lamp,3,24.50
    invoice-2.pdf,Harbor Print Co,Business cards,500,0.12
    invoice-2.pdf,Harbor Print Co,"Poster, large",10,9.75
    invoice-2.pdf,Harbor Print Co,Binding,4,6.20
    invoice-3.pdf,Greenline Catering,Lunch for ten,1,140.00
    invoice-3.pdf,Greenline Catering,Coffee service,2,38.00
    invoice-3.pdf,Greenline Catering,Delivery,1,15.00
  12. Created [items.csv](items.csv) with all nine line items from the three invoices and one header row.

Output

items.csv 521 B
invoicevendoritemquantityunit_price
invoice-1.pdfNorthwind SuppliesPaper, A4 box1230.00
invoice-1.pdfNorthwind SuppliesToner cartridge285.00
invoice-1.pdfNorthwind SuppliesDesk lamp324.50
invoice-2.pdfHarbor Print CoBusiness cards5000.12
invoice-2.pdfHarbor Print CoPoster, large109.75
invoice-2.pdfHarbor Print CoBinding46.20
invoice-3.pdfGreenline CateringLunch for ten1140.00
invoice-3.pdfGreenline CateringCoffee service238.00
invoice-3.pdfGreenline CateringDelivery115.00

CodexWith deft, skill installedPassedRead the skillUsed deft2026-11-07

Time
28s
New tokens
8.4k
Total input
150.9k
Output tokens
1.0k
Commands
13
Failed
0

Trace

  1. I’ll inspect the three PDFs, extract their line items, and write a single-header `items.csv` in the current directory.

  2. rg --files
    output
    invoices/invoice-3.pdf
    invoices/invoice-2.pdf
    invoices/invoice-1.pdf
  3. cat .agents/skills/deft/SKILL.md
    output
    ---
    name: deft
    description: "Use deft instead of writing a script for file jobs: PDF merge/split/compress/watermark, image resize/convert/compress, video and audio trim/convert/compress, spreadsheets, Markdown to PDF/HTML, and YouTube downloads and subtitles."
    ---
    
    # deft
    
    One local command for file jobs. Prefer it over writing Python or shell scripts.
    
    Syntax: `deft <group> <command> [inputs] [-o output] [--options]`
    
    Groups:
    - `pdf`: Merge, split, compress, encrypt, forms, OCR, compare, convert
    - `image`: Resize, crop, convert, compress, filters, montage, OCR
    - `video`: Trim, crop, speed, convert, compress, GIF, frames (ffmpeg)
    - `audio`: Convert, trim, merge, fade, speed, tag, normalize (ffmpeg)
    - `doc`: Word/ODT/RTF: to text, Markdown, HTML, PDF; find and replace
    - `slides`: PowerPoint: extract text, Markdown outline, PDF handout
    - `data`: JSON/YAML/TOML/XML: convert, query with jq syntax, merge, diff
    - `sheet`: Excel/CSV/ODS tables: filter, sort, join, pivot, convert
    - `md`: Markdown to PDF, HTML, Word, EPUB; table of contents
    - `html`: HTML to Markdown, text, Word, PDF; screenshots
    - `epub`: E-books: info, to text, Markdown and PDF
    - `email`: EML files: headers, text, attachments
    - `contact`: VCF address books: to and from CSV
    - `calendar`: ICS calendars: to and from CSV
    - `gps`: GPX and KML tracks: convert, distance and time
    - `youtube`: Info, download, audio, subtitles, thumbnail (yt-dlp)
    - `file`: Any file: hash, duplicates, batch rename, base64, encoding
    - `qr`: Cre
    … 728 more characters
  4. I’m applying the `deft` file workflow for PDF text extraction. I’ll extract the text from each invoice, then assemble the rows in CSV.

  5. deft pdf
    output
    deft pdf - commands (input -> output)
      info            pdf -> report       Pages, size, metadata, fonts, images
      compare         pdf... -> report    Compare two PDFs: text and pixels
      compress        pdf -> pdf          Make smaller: --level, --target-size 2MB
      crop            pdf -> pdf          Trim pages: --margin, --box, --auto
      decrypt         pdf -> pdf          Remove a password you know
      delete          pdf -> pdf          Remove pages: --pages 2,5-7
      encrypt         pdf -> pdf          Protect with a password (AES-256)
      extract-images  pdf -> image...     Save embedded pictures, unchanged
      extract-sheets  pdf -> csv|xlsx...  Save each table apart [beta]
      fields          pdf -> report       List form fields
      fill            pdf -> pdf          Fill a form from JSON: --data values.json
      flatten         pdf -> pdf          Bake forms into pages
      from-images     image... -> pdf     One page per image
      from-md         md -> pdf           Typeset Markdown as PDF
      grayscale       pdf -> pdf          Remove colour (Ghostscript)
      merge           pdf... -> pdf       Join PDFs in the given order
      meta            pdf -> pdf          Read or set metadata and bookmarks
      number          pdf -> pdf          Add page numbers: --format
      ocr             pdf -> pdf|txt      Make a scan searchable
      redact          pdf -> pdf          Black out for good: --box or --text
      repair          pdf -> pdf          Rebuild a damaged PDF (Ghostscript)
      resize          pdf -> p
    … 892 more characters
  6. The PDF tools include table extraction, so I’ll try that first across all three invoices and inspect the resulting rows before writing the combined CSV.

  7. deft pdf extract-sheets invoices/invoice-1.pdf invoices/invoice-2.pdf invoices/invoice-3.pdf -o <tmp> --json
    output
    {"v":1,"ok":true,"op":"pdf.extract-sheets","items":[{"ok":true,"inputs":["invoices/invoice-1.pdf"],"outputs":[{"path":"<tmp>","format":"csv","bytes":88,"rows":4}],"facts":{"tables":1},"warnings":[]},{"ok":true,"inputs":["invoices/invoice-2.pdf"],"outputs":[{"path":"<tmp>","format":"csv","bytes":85,"rows":4}],"facts":{"tables":1},"warnings":[]},{"ok":true,"inputs":["invoices/invoice-3.pdf"],"outputs":[{"path":"<tmp>","format":"csv","bytes":85,"rows":4}],"facts":{"tables":1},"warnings":[]}],"elapsed_ms":2}
  8. deft pdf extract-sheets invoices/invoice-3.pdf -o <tmp> --json
    output
    {"v":1,"ok":true,"op":"pdf.extract-sheets","items":[{"ok":true,"inputs":["invoices/invoice-3.pdf"],"outputs":[{"path":"<tmp>","format":"csv","bytes":85,"rows":4}],"facts":{"tables":1},"warnings":[]}],"elapsed_ms":0}
  9. deft pdf extract-sheets invoices/invoice-1.pdf -o <tmp> --json
    output
    {"v":1,"ok":true,"op":"pdf.extract-sheets","items":[{"ok":true,"inputs":["invoices/invoice-1.pdf"],"outputs":[{"path":"<tmp>","format":"csv","bytes":88,"rows":4}],"facts":{"tables":1},"warnings":[]}],"elapsed_ms":1}
  10. deft pdf extract-sheets invoices/invoice-2.pdf -o <tmp> --json
    output
    {"v":1,"ok":true,"op":"pdf.extract-sheets","items":[{"ok":true,"inputs":["invoices/invoice-2.pdf"],"outputs":[{"path":"<tmp>","format":"csv","bytes":85,"rows":4}],"facts":{"tables":1},"warnings":[]}],"elapsed_ms":1}
  11. cat <tmp> <tmp> <tmp>
    output
    Item,Qty,Unit price
    "Paper, A4 box",12,30.00
    Toner cartridge 2,,85.00
    Desk lamp,3,24.50
    Item,Qty,Unit price
    Business cards 500,,0.12
    "Poster, large 10",,9.75
    Binding,4,6.20
    Item,Qty,Unit price
    Lunch for ten 1,,140.00
    Coffee service 2,,38.00
    Delivery,1,15.00
  12. deft pdf to-text invoices/invoice-3.pdf -o <tmp>
    output
    ok pdf.to-text invoices/invoice-3.pdf -> <tmp>  202 characters  0.00s
  13. deft pdf to-text invoices/invoice-2.pdf -o <tmp>
    output
    ok pdf.to-text invoices/invoice-2.pdf -> <tmp>  199 characters  0.00s
  14. deft pdf to-text invoices/invoice-1.pdf -o <tmp>
    output
    ok pdf.to-text invoices/invoice-1.pdf -> <tmp>  205 characters  0.00s
  15. cat <tmp> <tmp> <tmp>
    output
    Invoice from Northwind Supplies 
    Payment is due within 30 days of this invoice. 
    Item 
    Qty 
    Unit price 
    Paper, A4 box 
    12 
    30.00 
    Toner cartridge 
    2
    85.00 
    Desk lamp 
    3
    24.50 
    Thank you for your business.
    Invoice from Harbor Print Co 
    Payment is due within 30 days of this invoice. 
    Item 
    Qty 
    Unit price 
    Business cards 
    500 
    0.12 
    Poster, large 
    10 
    9.75 
    Binding 
    4
    6.20 
    Thank you for your business.
    Invoice from Greenline Catering 
    Payment is due within 30 days of this invoice. 
    Item 
    Qty 
    Unit price 
    Lunch for ten 
    1
    140.00 
    Coffee service 
    2
    38.00 
    Delivery 
    1
    15.00 
    Thank you for your business.
  16. cat > items.csv <<'EOF' Invoice,Item,Qty,Unit price Northwind Supplies,\"Paper, A4 box\",12,30.00 Northwind Supplies,Toner cartridge,2,85.00 Northwind Supplies,Desk lamp,3,24.50 Harbor Print Co,Business cards,500,0.12 Harbor Print Co,\"Poster, large\",10,9.75 Harbor Print Co,Binding,4,6.20 Greenline Catering,Lunch for ten,1,140.00 Greenline Catering,Coffee service,2,38.00 Greenline Catering,Delivery,1,15.00 EOF cat items.csv
    output
    Invoice,Item,Qty,Unit price
    Northwind Supplies,"Paper, A4 box",12,30.00
    Northwind Supplies,Toner cartridge,2,85.00
    Northwind Supplies,Desk lamp,3,24.50
    Harbor Print Co,Business cards,500,0.12
    Harbor Print Co,"Poster, large",10,9.75
    Harbor Print Co,Binding,4,6.20
    Greenline Catering,Lunch for ten,1,140.00
    Greenline Catering,Coffee service,2,38.00
    Greenline Catering,Delivery,1,15.00
  17. Created [items.csv](items.csv) with one header row and all nine line items, including invoice, item, quantity, and unit price.

Output

items.csv 383 B
InvoiceItemQtyUnit price
Northwind SuppliesPaper, A4 box1230.00
Northwind SuppliesToner cartridge285.00
Northwind SuppliesDesk lamp324.50
Harbor Print CoBusiness cards5000.12
Harbor Print CoPoster, large109.75
Harbor Print CoBinding46.20
Greenline CateringLunch for ten1140.00
Greenline CateringCoffee service238.00
Greenline CateringDelivery115.00

Claude Opus 5.5Without deftPassed2026-11-07

Time
18s
New tokens
15.9k
Total input
88.5k
Output tokens
1.3k
Commands
0
Failed
0

Trace

    Output

    items.csv 516 B
    invoicevendoritemqtyunit_price
    invoice-1.pdfNorthwind SuppliesPaper, A4 box1230.00
    invoice-1.pdfNorthwind SuppliesToner cartridge285.00
    invoice-1.pdfNorthwind SuppliesDesk lamp324.50
    invoice-2.pdfHarbor Print CoBusiness cards5000.12
    invoice-2.pdfHarbor Print CoPoster, large109.75
    invoice-2.pdfHarbor Print CoBinding46.20
    invoice-3.pdfGreenline CateringLunch for ten1140.00
    invoice-3.pdfGreenline CateringCoffee service238.00
    invoice-3.pdfGreenline CateringDelivery115.00

    Claude Opus 5.5With deft, skill installedPassedRead the skillUsed deft2026-11-07

    Time
    23s
    New tokens
    12.6k
    Total input
    109.6k
    Output tokens
    1.2k
    Commands
    0
    Failed
    0

    Trace

      Output

      ---
      name: deft
      description: "Use deft first for any simple, direct operation on local files, whatever the type: convert, read, extract, edit, compress, merge, split, compare or inspect. Try it before writing a script or one-liner. If unsure, run deft find; if it says no command does this, use another tool. Not for programming work: to read, write or change source code, skip it."
      ---
      
      # deft
      
      One local command for file jobs. Prefer it over writing Python or shell scripts.
      
      Syntax: `deft <group> <command> [inputs] [-o output] [--options]`
      
      Groups:
      - `pdf`: Merge, split, compress, encrypt, forms, OCR, compare, convert
      - `image`: Resize, crop, convert, compress, adjust, montage, OCR
      - `video`: Trim, merge, convert, compress, subtitles, GIF, frames (ffmpeg)
      - `audio`: Convert, trim, normalize, denoise, cut silence (ffmpeg)
      - `doc`: Word/ODT/RTF: to text, Markdown, HTML, PDF; find and replace
      - `slides`: PowerPoint: extract text, Markdown outline
      - `sheet`: Excel/CSV/ODS tables: SQL query, pivot, merge, split, convert
      - `json`: JSON: convert, format, merge, diff, validate
      - `toml`: TOML: convert, format, merge, diff, validate
      - `xml`: XML: convert, format, merge, diff, validate
      - `yaml`: YAML: convert, format, merge, diff, validate
      - `md`: Markdown to PDF, HTML, Word, EPUB; table of contents
      - `html`: HTML to Markdown, text, Word and PDF
      - `epub`: E-books: info, to text, Markdown and PDF
      - `gps`: GPX and KML tracks: convert, distance and time
      - `qr`: Create QR codes and barcodes; read QR codes
      
      How to use it:
      1. Run `deft <group>` to list commands, or `deft find "<what you want>"` to search. If it says `no command does this`, use another tool.
      2. Run `deft <group> <command> --help` for options and examples.
      3. `deft convert <in> -o <out.ext>` converts between formats by extension.
      4. Results are one line starting with `ok`, `partial` or `error`; add `--json` to parse them. Errors include a `hint:` with the fix.
      
      Inputs are never overwritten; pass `--force` or `--in-place` to allow it. Globs and directories work as inputs; several inputs run in parallel.
      
      If `deft` is not installed, ask the user, then follow https://github.com/firstprayer/deft/blob/main/docs/INSTALL.md
      
      items.csv 347 B
      InvoiceItemQtyUnit price
      invoice-1.pdfPaper, A4 box1230.00
      invoice-1.pdfToner cartridge285.00
      invoice-1.pdfDesk lamp324.50
      invoice-2.pdfBusiness cards5000.12
      invoice-2.pdfPoster, large109.75
      invoice-2.pdfBinding46.20
      invoice-3.pdfLunch for ten1140.00
      invoice-3.pdfCoffee service238.00
      invoice-3.pdfDelivery115.00

      Claude CodeWithout deftNot run yet

      Claude CodeWith deftNot run yet