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

Written for no agent in particular: nothing here depends on one.

Good fit Use it to parse documents into Markdown, extract fields into JSON or Python models, classify batches, and locate extracted data on specific pages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/andrewyng/context-hub/document-extraction
About the project

Context Hub is a repository and command-line tool that supplies coding agents with curated, versioned documentation and skills in markdown form. It is for agents that need accurate API information across tasks, and the catalogue entries provide skills for searching, fetching, and improving that context.

andrewyng/context-hub · 13,972 stars · on GitHub

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.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for document-extraction

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 50
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 70
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 79
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 95
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 58
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 59
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 60
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.1 $0.00222 $0.08441
Opus 5.5 $0.00089 $0.03376
Sonnet 5.5 $0.00044 $0.01688
Haiku 4.5 $0.00022 $0.00844

Measured 1mo ago against content hash ff91d6eac78f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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,972 stars, last pushed 4mo ago), licensed MIT. It adds 222 tokens to every session and 8,441 once invoked, about $0.0009 per session on Opus 5.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

skill-doc-delivery

Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.

nyldn/claude-octopus · 29 tokens

meta-web-to-pdf-briefing

Render a topic into a distributable PDF briefing in three steps: web search → bullet summary → styled PDF. Trigger when the user asks for a PDF briefing on a single topic.

opensquilla/opensquilla · 45 tokens

chat-complex-documents

Chat with and search your complex documents — ask questions, extract tables and fields, and get answers grounded in the source. Connects the hosted Unstructured Transform MCP server to parse, structure, and enrich PDFs, Word/Excel/PowerPoint, images, scanned files, emails, and 60+ other formats into clean, AI-ready…

vellum-ai/vellum-assistant · 90 tokens

pkf-writing

Author, update, convert, validate, persist, and render PKF (.pkf) content through message-inline, Library Asset, or Memory Page carriers. Use for structured reports, knowledge pages, delivery cards, or any .pkf body. NOT for recall, memory-graph placement, or curation decisions — those belong to the memory skill.

Prismer-AI/PrismerCloud · 78 tokens

paper-reader

A reading assistant for computer-vision and deep-learning research papers. It can work with PDF files, arXiv papers, and papers stored in Zotero, a reference-management app.

huangkiki/dailypaper-skills · 157 tokens