Evals / documents / Document facts

How long is this document

How many words are in demo.docx? Write the number to count.txt.

easysingledeft doc info

The task

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

(none)

The files are not kept here, because demo.docx is under GPL-3.0. Its source is linked.

Input

No input file.

Reference output

How a result is judged (1 check)
  • python: code = "assert 1000 < int(open('count.txt').read()) < 3000"

Runs

CodexWithout deftPassed2026-11-07

Time
12s
New tokens
3.1k
Total input
26.7k
Output tokens
0.3k
Commands
1
Failed
0

Trace

  1. I’ll locate `demo.docx`, count its words, and write the count to `count.txt` in the current directory.

  2. python3 -c 'import zipfile, xml.etree.ElementTree as ET; p=\"demo.docx\"; z=zipfile.ZipFile(p); root=ET.fromstring(z.read(\"word/document.xml\")); ns={\"w\":\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\"}; text=\" \".join(t.text or \"\" for t in root.findall(\".//w:t\",ns)); import re; words=re.findall(r\"\\b[\\w]+(?:[’\\x27-][\\w]+)*\\b\", text, flags=re.UNICODE); open(\"count.txt\",\"w\").write(str(len(words))+\"\\n\"); print(len(words))'
    output
    1556
  3. `demo.docx` contains **1,556 words**. I wrote the count to [count.txt](count.txt).

Output

Files not kept here, for licence reasons.

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

Time
18s
New tokens
4.8k
Total input
70.7k
Output tokens
0.4k
Commands
4
Failed
0

Trace

  1. I’ll inspect the document and write its word count to `count.txt` in the current directory.

  2. cat .agents/skills/deft/SKILL.md
    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; r
    … 700 more characters
  3. deft find "count words in a Word document"
    output
    doc info      doc -> report  Title, author, words, headings, tables, images
    md from-docx  doc -> md      Convert to Markdown, keeping headings, lists and tables
    md to-docx    md -> docx     Write a Word document with headings, lists, tables, images
    html to-docx  html -> docx   Convert the content to a Word document
    doc replace   docx -> docx   Find and replace text in Word, keeping the formatting
  4. deft doc info demo.docx
    output
    ok doc.info demo.docx  1631 words
    title="DOCX Demo" author="Kovid Goyal" words=1631 paragraphs=49 headings=17 tables=5 images=3
  5. printf '%s\\n' 1631 > count.txt && cat count.txt
    output
    1631
  6. `demo.docx` contains **1,631 words**. I wrote `1631` to [count.txt](count.txt).

Output

Files not kept here, for licence reasons.

Claude Opus 5.5Without deftPassed2026-11-07

Time
24s
New tokens
12.1k
Total input
104.4k
Output tokens
2.0k
Commands
0
Failed
0

Trace

    Output

    Files not kept here, for licence reasons.

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

    Time
    9s
    New tokens
    10.1k
    Total input
    75.1k
    Output tokens
    0.5k
    Commands
    0
    Failed
    0

    Trace

      Output

      Files not kept here, for licence reasons.

      Claude CodeWithout deftNot run yet

      Claude CodeWith deftNot run yet