agentleFS
EnjoyoerEnjoyoer/loadout/skills/research-docs/liteparse/SKILL.md

liteparse

Skill0 starsChanged 25 days agoMITView on GitHub

Use when a PDF is scanned or image-only and needs OCR, or when you need page screenshots, bounding boxes, or page coordinates. Ordinary text PDFs use `pdftotext -layout` instead, not LiteParse. Use the bundled type-specific artifact skills for Office files and native PDF authoring/editing.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use pdftotext -layout first for text PDFs.

    line 10
  2. Distinctive:

    Write output to a temp file, then read the file.

    line 18
  3. Very specific:

    If lit is missing, install with uv tool install liteparse.

    line 57
  4. Distinctive:

    Do not use LiteParse as a generic Office converter.

    line 58
  5. Distinctive:

    If visual layout matters, generate screenshots and inspect rendered pages before trusting text order.

    line 59

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

LiteParse

Rule

Use pdftotext -layout first for text PDFs. Use lit only when a PDF is scanned or image-only and needs OCR, and then use lit parse --format text, not markdown: markdown splits labels from values and table rows.

lit screenshot and lit parse --format json (bounding boxes, page coordinates) stay fine for any PDF when you need rendered pages or positions.

Route DOCX to documents:documents, XLSX/CSV to spreadsheets:Spreadsheets, PPTX to presentations:Presentations, and PDF authoring/editing or fillable forms to pdf:pdf. Use Browser or a structured HTML parser for web and HTML content.

Commands

Write output to a temp file, then read the file.

Text PDF (pdftotext comes from poppler):

pdftotext -layout "input.pdf" "input.extracted.txt"

Scanned or image-only PDF, screenshots, and coordinates:

lit parse "input.pdf" --format text -o "input.extracted.txt" --quiet
lit parse "input.pdf" --format json -o "input.extracted.json" --quiet
lit screenshot "input.pdf" -o "screenshots" --target-pages 1 --quiet

A text PDF is one where pdftotext returns the page's words; if it returns nothing or near nothing, treat the PDF as scanned.

Useful options:

OptionUse
--target-pages 1,3-5Parse selected pages only.
--max-pages 20Bound large files.
--ocr-language engOCR language.
--no-ocrSkip OCR when you only need JSON coordinates from a text PDF.

Helper Script

For repeatable extraction, run:

python "$env:USERPROFILE\.codex\skills\liteparse\scripts\parse_document.py" "input.pdf"

The script defaults to --format text and writes an adjacent .liteparse.txt file unless --output is provided. --format json and --format markdown stay selectable.

Fallbacks

  • If lit is missing, install with uv tool install liteparse.
  • Do not use LiteParse as a generic Office converter; invoke the matching bundled artifact skill.
  • If visual layout matters, generate screenshots and inspect rendered pages before trusting text order.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.