ocr-document-processing-skill
БесплатноЗапускает вложенные скриптыНе проверенAmazon Textract document processing without an MCP server. Extracts reading-order linearized text, raw OCR with low-confidence flagging, tables…
от aws★ 3 696 звёзд на GitHubОб этом скилле
Textract Document Processing
Overview
One AWS CLI call gets you the raw Textract JSON; one bundled parser
(scripts/parse.py) turns it into whatever you need — parse.py --mode <mode>
dispatches to every parser the Textract MCP server exposed. No MCP server, no
boto wrapper, no infrastructure to stand up.
Works best with the AWS MCP server —
recommended for sandboxed command execution and audit logging. All guidance here
also works with standard AWS CLI access and does not assume any MCP-specific
tooling (no call_aws, no run_script); every step is plain aws textract ….
When the AWS MCP server is available, running scripts/parse.py through its
run_script tool is the preferred (sandboxed) runtime; it is optional, and the
script runs equally well on any host Python 3.10+ interpreter.
This SKILL.md is the always-loaded overview: the routing table, the sync/async
decision, and Step 0 setup. The detailed runbooks, worked command templates, and
mode-selection guidance live in references/ — load them on demand (see
Reference files).
Guardrail — where this skill's own files live (MCP vs local install)
This skill can be loaded two ways, and they resolve the skill's own bundled
files (scripts/parse.py, references/*.md) from different places. Determine how
the skill was loaded before reading a reference or running a script:
- Loaded through the AWS MCP
retrieve_skilltool: The skill is not installed on the local filesystem. You MUST fetch each reference or script viaretrieve_skillwith thefileparameter (e.g.file="scripts/parse.py",file="references/procedures.md"), and run the script from the returned content. Do NOTfile_readthese paths locally — they do not exist on disk. - Installed locally (e.g.
.kiro/skills/ocr-document-processing-skill/or~/.claude/skills/ocr-document-processing-skill/): Read and run files from the local skill directory using relative paths.
This distinction applies only to the skill's own packaged files. User data and
session artifacts are always read from and written to the user's working
directory. Never fetch or write customer data through retrieve_skill.
Runtime requirements — Step 0 (before any Textract call)
parse.py requires a general-purpose Python interpreter, so this skill is
display-only on hosts without Python 3.10+. The agent owns setup, not the
script (idempotent — safe to run every time):
python3 -c 'from importlib.metadata import version; assert version("amazon-textract-textractor") == "1.10.0"' 2>/dev/null \
|| pip install 'amazon-textract-textractor==1.10.0'
python3 -c 'from importlib.metadata import version; assert version("pandas") == "2.2.3"' 2>/dev/null \
|| pip install 'pandas==2.2.3'
amazon-textract-textractoris Amazon-owned open source.pandasis a required third-party dependency, pinned to2.2.3per exact-version pinning per AWS dependency-management best practice. textractor renders reading-order tables in--mode linearizethroughTable.to_pandas(), so a LAYOUT+TABLES document cannot be linearized without it. Bump the pin only through a reviewed CR, never float tolatest.- Confirm AWS access: credentials with least-privilege Textract actions
(
DetectDocumentText,AnalyzeDocument,AnalyzeExpense,AnalyzeID, and the specificStart*/Get*async pairs — nottextract:*) pluss3:GetObjecton the source prefix, andAWS_REGIONset (andAWS_PROFILEif used). parse.pyinstalls nothing. If a required dependency is missing it exits 3 and reprints the install command above:amazon-textract-textractorfor any mode, andpandasfor the--mode linearizeMarkdown-table path (textractor renders those tables viaTable.to_pandas()). Install both in Step 0 above.
Let $SKILL_DIR = this skill's directory; the parser is $SKILL_DIR/scripts/parse.py.
Which Textract call + mode for each task
| Need | AWS CLI call (feature types) | parse.py mode |
|---|---|---|
| Reading-order text | analyze-document LAYOUT [TABLES] |
--mode linearize |
| Raw OCR + flag low confidence | detect-document-text |
--mode raw-text --flag-below 80 |
| Tables → Markdown / CSV | analyze-document TABLES |
--mode tables [--format csv] |
| Form key-value pairs | analyze-document FORMS |
--mode forms |
| Ask a document a question | analyze-document QUERIES (+--queries-config) |
--mode queries |
| Receipt / invoice | analyze-expense |
--mode expense |
| Identity document | analyze-id |
--mode identity |
| Per-block geometry/confidence | any Blocks call | --mode blocks |
| Auto-accept ≥80% / human review <80% | analyze-document FORMS |
--mode confidence-route --threshold 80 |
Combine features in ONE call when you need several (e.g. --feature-types TABLES FORMS LAYOUT)
— you pay per feature, so request only what you need, but batch them i
Установить ocr-document-processing-skill в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ocr-document-processing-skill?
Amazon Textract document processing without an MCP server. Extracts reading-order linearized text, raw OCR with low-confidence flagging, tables (Markdown/CSV), form key-value pairs, QUERIES answers, receipts/invoices (AnalyzeExpense), identity documents (AnalyzeID), per-block geometry and confidence, and the auto-accept/human-review confidence-routing pattern. Use for any OCR or document-understanding task on a PDF or image — "extract text", "reading order", "tables to markdown/CSV", "form fields", "ask this document a question", "parse this receipt", "driver's license fields", "process a 40-page PDF", "batch these documents", or "auto-accept high-confidence fields and flag the rest". Drives the AWS CLI directly (sync plus async polling) and runs a bundled parser (scripts/parse.py). Works in any runtime with AWS credentials (Textract + S3) and Python 3.10+. Also known as intelligent document processing (IDP): handles scanned PDFs, handwriting, and W2, KYC, passport, and claim documents.
Как установить скилл ocr-document-processing-skill?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ocr-document-processing-skill запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic