document-extraction

document-extraction is a skill for Claude Code, Codex from nrl-ai/chub. It costs 222 tokens per session (8,441 once invoked), scanned A, a copy of document-extraction, MIT.

A document-processing tool that turns PDFs, images, spreadsheets, and presentations into structured text and data, and can separate mixed document batches by type.

In plain words
What is it for?
Use it to parse documents into Markdown or JSON, extract fields that match a schema, and split batches containing different document types.
Why use it?
It removes the need to build a separate template or train a model for every document layout. It also preserves layout details such as page numbers and where extracted information appears.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nrl-ai/chub/document-extraction
Any agent
npx skills add nrl-ai/chub --skill document-extraction
Clone the repo
git clone --depth 1 https://github.com/nrl-ai/chub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for document-extraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/nrl-ai/chub/document-extraction.svg)](https://agentmods.dev/skills/nrl-ai/chub/document-extraction)
Your own site
<a href="https://agentmods.dev/skills/nrl-ai/chub/document-extraction"><img src="https://agentmods.dev/badge/skills/nrl-ai/chub/document-extraction.svg" alt="Measured on agentmods" height="20"></a>
Per session 222 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00222 $0.08441
Opus 5 $0.00111 $0.04221
Sonnet 5 $0.00044 $0.01688
Haiku 4.5 $0.00022 $0.00844

Measured 4d ago against content hash ff91d6eac78f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

document-extraction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to document-extraction — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

content/landingai/skills/ade/document-extraction/SKILL.md · 994 lines

How it starts

The opening of the file, as written. The whole thing — 994 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Document Extraction (ADE)

Overview

LandingAI's Agentic Document Extraction (ADE) is a document processing SaaS that parses, extracts, and classifies documents without requiring templates or training. It provides three main capabilities:

  1. Parse: Convert documents into structured Markdown with hierarchical JSON representation
  2. Extract: Pull specific structured data using JSON schemas or Pydantic models
  3. Split: Classify and separate multi-document batches by type

Key Benefits:

  • No ML training or templates required
  • Layout-agnostic parsing (works with any document structure)
  • Supports 20+ file formats (PDF, images, spreadsheets, presentations)
  • Precise visual grounding (bounding boxes, page numbers)
  • Multiple models optimized for different document types

Quick Start

1. Installation

Never install packages globally without user approval. Always check for a local Python environment first.

1. .venv/bin/python       — uv-managed (this project)
2. venv/bin/python        — standard Python venv
3. uv run python          — if pyproject.toml exists
4. poetry run python      — if poetry.lock exists
5. python3                — system fallback; warn the user

Use the local environment to install: landingai-ade, python-dotenv

2. API Key Setup

The user may have already setup a .env file in the same directory as the document-extraction skill with the API key. You MUST check this path first (ls -la .*/skills/document-extraction/.env). Also try checking on the same directory as this SKILL.md file.

If not, provide instructions to create one. The script below will search for .env in common locations and load it.

.venv/bin/python - << 'EOF'
import os
from pathlib import Path
from dotenv import load_dotenv

# Load API key: prefer existing env var, then .env file lookup
if os.environ.get("VISION_AGENT_API_KEY"):
    print("API key found in existing environment variable")
else:
    def _find_env():
        for d in [Path.cwd().resolve(), *Path.cwd().resolve().parents]:
            for candidate in [
                # ADD the directory where the document-extraction skill is located
                d / '.env',
                d / 'document-extraction/.env',
                d / 'skills/document-extraction/.env',
            ]:
                if candidate.is_file():
                    return candidate
        return None
    env = _find_env()
    if env:
        load_dotenv(env)
        print(f"API key loaded from: {env}")
    else:
        print("Warning: VISION_AGENT_API_KEY not set and no .env found")
EOF

Read the full file on GitHub · 994 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 994 lines · 222 tokens per session scan A ff91d6eac78f

Subscribe to this mod's changes

document-extraction is a skill published in the GitHub repository nrl-ai/chub (11 stars, last pushed 5mo ago), licensed MIT. It adds 222 tokens to every session and 8,441 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to document-extraction, differing in 0 lines, and is treated as a copy.