document-workflows
하는 일
이 스킬은 문서 읽기 단계를 배치 파일을 위한 전체 워크플로로 연결하는 방법을 보여 줍니다. 송장이나 양식 같은 문서를 대량으로 처리하는 시스템을 만드는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓한 번에 많은 문서를 일괄 처리해야 할 때.
- ✓청킹으로 AI 검색 시스템에 쓸 문서를 준비하고 싶을 때.
- ✓추출한 문서 결과를 데이터베이스에 불러오고 싶을 때.
스킬 링크
https://github.com/andrewyng/context-hub/blob/main/content/landingai/skills/ade/document-workflows/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 폴더의 모든 송장을 처리해서 합계를 데이터베이스에 넣는 작업을 도와줄 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 읽기, 추출, 분류 단계를 결합하는 준비된 패턴을 제공하며, 오류 처리와 병렬 처리가 포함됩니다. 에이전트는 코드를 쓰기 전에 샘플 문서를 먼저 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Document Workflows — ADE Pipeline Patterns
Overview
This skill provides reusable building blocks for composing LandingAI ADE
primitives (parse, extract, split) into production-ready document processing
pipelines. It complements the document-extraction skill:
| Concern | document-extraction |
document-workflows |
|---|---|---|
| Scope | ADE SDK API: parse, extract, split, grounding | End-to-end pipelines: batch, RAG, DB, classify-route |
| When | Need to call a single ADE operation | Need to compose operations into a workflow |
| Code | SDK method calls with parameters | Complete functions with error handling, parallelism |
| Deps | landingai-ade only |
+ workflow-specific libs (pandas, chromadb, etc.) |
Philosophy: Organize by workflow pattern (batch, RAG, DB insertion), not by document type. The same pattern applies whether documents are invoices, utility bills, or medical forms.
Step 0 (mandatory) — Pre-Flight Document Exploration {#pre-flight}
Run this before writing any pipeline code whenever working with documents whose internal structure has not already been inspected in this session.
Rule: never write section-detection, heading-matching, or text-search code without first running Tool 2 (diagnostic parse) on the sample document. Heading format is document-specific and cannot be inferred from the task description or document type alone — the only reliable way to know it is to look at the actual ADE output.
Common surprises: a paper's "Introduction" heading may appear as
1. Introduction(plain text, no#),## Introduction,INTRODUCTION(all-caps), or embedded inside a text chunk with body copy. Getting this wrong means a silent failure (zero chunks matched) that requires a full re-parse to debug.
Run Tool 1 (visual render) and Tool 2 (diagnostic parse) on 1–3 representative sample documents before writing any code. This takes under a minute and prevents debugging iterations that a pre-flight would have avoided.
Tool 1 — Visual page render
Render 1–2 pages as PNG and read them as visual context. No ADE credits used, but each PNG consumes context tokens. Use when layout is ambiguous or document origin is unknown (handwriting? scan? form?).
.venv/bin/python - << 'EOF'
import pymupdf
from pathlib import Path
from PIL import Image
pdf = Path('path/to/sample.pdf')
out_dir = Path('/tmp/ade_preflight'); out_dir.mkdir(exist_ok=True)
doc = pymupdf.open(pdf)
for pg in range(min(2, len(doc))): # first 2 pages only
pix = doc[pg].get_pixmap(matrix=pymupdf.Matrix(1.5, 1.5)) # 108 DPI
img = Image.frombytes("RGB", [pix.width, pix.height], pix.samples)
out = out_dir / f"{pdf.stem}_page{pg + 1}.png"
img.save(out)
print(out)
doc.close()
EOF
Then read the saved PNGs. Immediately answers:
- Are headings bold text (→ ADE may output plain-text heading, not
# Heading) - Is the document handwritten or scanned? → Tesseract OCR needed, not PyMuPDF
- Single-column or two-column layout?
- Any noise: running headers, page numbers, watermarks, stamps?
Tool 2 — ADE diagnostic parse
Parses 1 sample and prints markdown structure + chunk inventory. Uses ADE credits — keep to 1–3 samples only, never the full corpus.
.venv/bin/python - << 'EOF'
import os
from pathlib import Path
from collections import Counter
from dotenv import load_dotenv
# Load API key: prefer existing env var, then .env file lookup
load_dotenv() # Load API key from .env. Add a path to the .env if needed.
from landingai_ade import LandingAIADE
client = LandingAIADE()
pr = client.parse(document=Path('path/to/sample.pdf'))
print("=== MARKDOWN (first 80 lines) ===")
for i, ln in enumerate(pr.markdown.splitlines()[:80], 1):
print(f"{i:3}: {ln}")
print("\n=== CHUNKS ===")
for ch in pr.chunks:
txt = (ch.markdown or '').replace('\n', ' ')[:70]
b = ch.grounding.box
print(f"p{ch.grounding.page} {ch.type:12} "
f"l={b.left:.2f} t={b.top:.2f} r={b.right:.2f} b={b.bottom:.2f} | {txt}")
print(f"\nPages: {pr.metadata.page_count} "
f"Chunks: {len(pr.chunks)} "
f"Types: {dict(Counter(ch.type for ch in pr.chunks))}")
EOF
Cost note: Save the parse result with
pr.model_dump()to a JSON file after the first run. Load it for later development instead of callingclient.parse()again. Only re-parse when the document set changes.
What to look for
|
자주 묻는 질문
샘플 문서를 먼저 확인해야 하나요?
네. 스킬은 섹션이나 제목 코드를 작성하기 전에 샘플 문서를 확인하도록 요구합니다.
어떤 데이터베이스를 언급하나요?
Snowflake 같은 데이터베이스에 결과를 불러오는 것을 언급합니다.
문서 추출 스킬과는 무엇이 다른가요?
그 스킬은 단일 서비스 호출을 다루고, 이 스킬은 여러 단계로 된 전체 파이프라인을 다룹니다.
상세 정보
작성자의 원본 설명
Use this skill for building end-to-end document processing workflows and pipelines using LandingAI ADE. Trigger when users need to: (1) Process batches of documents in parallel or async, (2) Build classify-then-extract pipelines for mixed document types, (3) Prepare parsed documents for RAG systems with chunking and vector DB ingestion, (4) Load extraction results into databases like Snowflake or export to CSV/DataFrames, (5) Visualize extraction results: draw bounding box overlays on pages, crop chunk images, or highlight/annotate specific words or phrases found in documents, (6) Build Stream
repo: andrewyng/context-hub
인기도
- GitHub 스타
- 14k
- 순위
- #11272
- 라이선스
- MIT
- 업데이트
- 2026. 5. 31.
댓글
- …
이 저장소의 다른 스킬
get-api-docs
14k에이전트가 코드를 쓰기 전에, 오래된 기억 대신 서드파티 API와 라이브러리의 최신 문서를 가져오도록 돕습니다.
bloc-cubit
14k에이전트에게 Flutter 앱의 상태를 Bloc이나 Cubit으로 관리하는 방법을 가르칩니다. 각 도구를 고르는 기준과 테스트용 기본값을 포함합니다.
riverpod
14k에이전트가 Riverpod으로 Flutter 앱의 상태를 관리하도록 가르칩니다. 프로바이더, 비동기 데이터, 테스트를 다룹니다.
document-extraction
14k에이전트가 PDF, 이미지, 스프레드시트를 읽어 깨끗한 텍스트로 바꾸고, LandingAI ADE 서비스로 송장 합계 같은 항목을 뽑아내도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.