Heavy file ingestion

From NateBJones-Projects/OB1 · View interactive version

Heavy file ingestion is an AI agent skill from the GitHub repository NateBJones-Projects/OB1. Use when a user asks to read, analyze, summarize, or extract from a heavyweight file such as PDF, DOCX, PPTX, XLSX, CSV, or TSV. Convert the file into markdown or CSV first, generate a lightweight index, and only spend model tokens on the compressed artifact. Trigger on requests like "read this PDF"

How to use this skill

Skill file

Heavy File Ingestion

Problem

Agents waste money and context when they read heavyweight files raw. This skill turns bulky documents into cheaper working artifacts first, then tells the main agent how much reasoning power the file actually deserves.

Trigger Conditions

Core Policy

  1. Convert before reading. Do not dump raw heavyweight files into model context if a deterministic converter can create a cheaper artifact.
  2. Index before reasoning. Read the generated index.md or index.json first. It should tell you what is in the file, how clean the extraction was, and whether escalation is justified.
  3. Match the converter to the file type.
  1. Escalate by cost tier, not instinct.

Process

  1. Identify the file path, extension, and rough size.
  2. Run the converter script instead of reading the original file directly:
uv run \
  --with pdfplumber \
  --with python-docx \
  --with python-pptx \
  --with openpyxl \
  python skills/heavy-file-ingestion/scripts/convert_heavy_file.py /absolute/path/to/file.ext
  1. If you already have markitdown installed and want to prefer it for PDF or DOCX conversion, rerun with:
python skills/heavy-file-ingestion/scripts/convert_heavy_file.py /absolute/path/to/file.ext --prefer markitdown
  1. Read the generated index.md first.
  2. Only read the extracted markdown or CSV outputs that the index says are worth reading.
  3. If the index flags weak extraction, use a cheap fallback:

Output

The skill should leave behind:

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.