document-extraction

document-extraction is a skill for Claude Code, Codex from andrewyng/context-hub. It costs 222 tokens per session (8,441 once invoked), scanned A, original, MIT.

Guidance for using LandingAI's Agentic Document Extraction service to turn PDFs, images, spreadsheets, and presentations into structured content or selected data. It can parse layouts, extract fields using a schema, and split mixed batches by document type.

In plain words
What is it for?
Use it to parse documents into Markdown, extract fields into JSON or Python models, classify batches, and locate extracted data on specific pages.
Why use it?
It helps process documents with different layouts without first creating templates or training a machine-learning model. Structured results are easier to store, search, or use in later code.

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/andrewyng/context-hub/document-extraction
Any agent
npx skills add andrewyng/context-hub --skill document-extraction
Clone the repo
git clone --depth 1 https://github.com/andrewyng/context-hub

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/andrewyng/context-hub/document-extraction.svg)](https://agentmods.dev/skills/andrewyng/context-hub/document-extraction)
Your own site
<a href="https://agentmods.dev/skills/andrewyng/context-hub/document-extraction"><img src="https://agentmods.dev/badge/skills/andrewyng/context-hub/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 original No closer match found 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

Copies of this mod

1 near-identical copy found in the catalogue:

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 andrewyng/context-hub (13,961 stars, last pushed 3mo 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

paper-reader

Use when user asks to "read paper", "analyze paper", "summarize paper", "读论文", "分析文献", "帮我看一下这篇paper", "论文笔记", or provides a PDF file that appears to be an academic paper. Specialized for CV/DL papers. Also supports Zotero integration: "读一下这篇论文 ...", "快速看一下这篇论文 ...", "批判性分析这篇论文 ...", "读一下 Zotero 里的 XXX", "批量读一下 Zotero…

huangkiki/dailypaper-skills · 157 tokens

citra

Skill "citra" from SylphxAI/pdf-reader-mcp, covering citra — pdf evidence for agents, install, or, tools and sdk.

SylphxAI/pdf-reader-mcp · 0 tokens

graphic-ebook

Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF. 3–10 pages, 9 style presets, 11 page layout types. Trigger when user says "create an ebook", "design a lead magnet", "make a PDF guide", "build a gated content piece", "write a B2B ebook", "design a white paper", "create a…

Varnan-Tech/opendirectory · 97 tokens

pdf-fill

Fill PDF form fields from a data dict.

hardness1020/awesome-agent-architecture · 12 tokens

pdf-annotations

Use when reading, adding, updating, or removing PDF annotations (highlight, free-text, stamp) or page objects (path/text/image) with Android's platform PDF APIs, or when saving those edits back to disk — the editing surface added in API 36.1 (PdfRenderer.Page) and SDK extension 18 (PdfRendererPreV.Page on API 31+)…

rcosteira79/android-skills · 141 tokens