doc-reader
하는 일
이 스킬은 에이전트에게 여러 일반 파일 형식에서 읽을 수 있는 텍스트를 뽑아내는 도구 하나를 제공합니다. 보고서, 계약서, 스프레드시트, 스캔한 페이지를 AI가 읽도록 해야 하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓PDF, 워드 문서, 엑셀 시트 또는 파워포인트 파일을 AI가 읽어야 할 때.
- ✓스캔한 페이지나 이미지를 텍스트로 바꿔야 할 때.
- ✓CSV, JSON 또는 코드 파일의 텍스트를 직접 열지 않고 얻고 싶은 경우.
스킬 링크
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/doc-reader/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 연간 보고서 PDF의 1쪽부터 10쪽까지 읽고 주요 내용을 요약해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 파일 형식에 맞는 방법을 스스로 고르는 문서 읽기 도구 하나를 호출합니다. 스캔한 페이지는 문자 인식을 거치고, 스프레드시트는 미리보기로 보여 줍니다. 압축 파일과 실행 파일은 안전을 위해 차단됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Universal Document Reader
Purpose
Return extracted text from any supported file in a single unified JSON envelope. The tool dispatches by file extension — you always call the same tool regardless of format.
Supported formats
| Category | Extensions | Notes |
|---|---|---|
.pdf |
Text pages extracted in ms; scanned/image pages fall back to OCR | |
| Word | .docx |
Paragraphs + table cells |
| Excel | .xlsx, .xls |
All sheets, first 100 rows per sheet as preview |
| PowerPoint | .pptx |
Slide text content |
| Images | .png/.jpg/.jpeg/.gif/.bmp/.webp/.tiff |
OCR only |
| CSV / TSV | .csv, .tsv |
Raw text with encoding fallback |
| Plain text | .txt/.md/.log/.rst |
Encoding fallback |
| Config | .json/.yaml/.yml/.toml/.ini/.cfg/.env |
Raw text |
| Markup | .html/.htm/.xml |
Raw text (no HTML stripping) |
| Source code | .py/.js/.ts/.tsx/.go/.rs/.java/.cpp/.c/.sql/.sh/... |
Raw text |
| Unknown extension | anything else | Best-effort read as UTF-8/GBK text |
Blocked (rejected at /upload): executables (.exe/.dll/.so/...) and
archives (.zip/.tar/...). Ask the user to unpack archives locally first.
Usage
Always call the tool directly — do not run Python from bash.
read_document(file_path="uploads/paper.pdf")
read_document(file_path="uploads/annual_report.pdf", pages="1-10")
read_document(file_path="uploads/contract.docx")
read_document(file_path="uploads/sales.xlsx")
read_document(file_path="uploads/deck.pptx")
read_document(file_path="uploads/chart.png") # image → OCR
read_document(file_path="uploads/config.yaml")
read_document(file_path="uploads/notes.md")
The pages parameter only applies to PDF; other formats ignore it.
Return envelope
All formats share this shape:
{
"status": "ok",
"file": "paper.pdf",
"format": "pdf",
"char_count": 52000,
"truncated": true,
"text": "..."
}
Format-specific extra fields:
| Format | Extra keys |
|---|---|
pdf |
total_pages, pages_read, ocr_pages, ocr_engine, ocr_quality, skipped_pages |
docx |
paragraphs, tables |
excel |
sheets (array of {name, rows, cols}) |
pptx |
slides |
text |
encoding, size |
Content longer than 15000 chars is truncated; for PDFs use the pages
parameter to read slices.
Workflows
Paper / report summary
1. read_document(file_path="paper.pdf") → full text
2. Extract abstract, methodology, conclusion → summarize
Contract review
1. read_document(file_path="contract.docx") → paragraphs + tables
2. Flag key clauses (termination, liability, payment, IP)
Spreadsheet quick-look
1. read_document(file_path="sales.xlsx") → all sheet previews
2. If user wants trade journal analysis specifically, pivot to
`analyze_trade_journal` tool instead (see trade-journal skill).
Chart / screenshot / scanned PDF
1. read_document(file_path="scan.png") → OCR text
2. If OCR returns empty, tell the user; don't fabricate.
OCR Configuration
The read_document tool automatically uses OCR for PDF pages with insufficient extractable text.
OCR Threshold
Use min_text_per_page to control when OCR is triggered (default: 50 characters):
read_document("scanned_report.pdf", min_text_per_page=10) # More aggressive OCR
read_document("mixed_pdf.pdf", min_text_per_page=100) # Less aggressive OCR
OCR Engine Configuration
Two OCR engines are built in — no extra packages needed beyond the engine SDK:
| Engine | Type | Requires | Install |
|---|---|---|---|
rapid |
Local (offline) | rapidocr_onnxruntime |
pip install rapidocr_onnxruntime |
llm-vision |
Cloud | A vision-capable LLM model + API key | No extra install — uses your existing LLM provider config |
The llm-vision engine works with any OpenAI-compatible vision model (GPT-4o, Qwen-VL, Gemini, Claude, GLM-4V, etc.). It reuses your existing LANGCHAIN_PROVIDER / LANGCHAIN_MODEL_NAME / API key configuration — no separate provider mapping needed. If you explicitly set VIBE_TRADING_OCR_ENGINE=llm-vision, your model choice is trusted; a real API error from the provider is clearer feedback than a heuristic guess.
To override the model used for OCR (without changing your agent's main model):
VIBE_TRADING_OCR_LLM_MODEL=qwen3.7-plus
Set VIBE_TRADING_OCR_ENGINE to select the engine:
auto(default): use local engines only, never cloud (privacy: docum
자주 묻는 질문
어떤 파일 형식을 읽을 수 있나요?
PDF, 워드, 엑셀, 파워포인트, 일반 이미지 형식, CSV, 일반 텍스트, 설정 파일, 웹 마크업, 여러 소스 코드 파일을 읽을 수 있습니다.
왜 zip 파일은 열 수 없나요?
압축 파일과 실행 파일은 차단되므로, 압축은 직접 자신의 컴퓨터에서 풀어야 합니다.
스캔한 페이지도 읽나요?
네. 스캔했거나 이미지로만 된 페이지는 문자 인식으로 읽습니다.
상세 정보
작성자의 원본 설명
Read any common document/data file — PDF, Word (.docx), Excel (.xlsx/.xls), PowerPoint (.pptx), images (OCR), CSV/TSV, plain text, JSON/YAML/TOML, HTML/XML, and most source-code files. Use the `read_document` tool.
repo: HKUDS/Vibe-Trading
인기도
- GitHub 스타
- 37k
- 순위
- #7513
- 라이선스
- MIT
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
vibe-trading
37k에이전트에게 백테스트, 팩터 분석, 옵션 가격 결정, 여러 시장의 시장 데이터를 포함하는 완전한 금융 연구 도구 모음을 제공합니다.
adr-hshare
37k에이전트에게 미국 ADR과 홍콩 주식처럼 여러 시장에 상장된 중국 기업의 가격을 비교하는 방법을 보여 줍니다.
akshare
37k에이전트가 API 키 없이 중국과 해외 주식, 선물, 외환, 경제 지표의 무료 시장 데이터를 가져오도록 돕습니다.
alpha-zoo
37k에이전트가 만들어진 주식 팩터 라이브러리를 둘러보고, 선택한 시장에서 팩터 묶음이 수익률을 얼마나 잘 예측하는지 시험하도록 돕습니다.
비슷한 스킬
feishu-doc
394k에이전트가 문서 도구를 사용해 텍스트, 이미지, 표를 포함한 Feishu 클라우드 문서를 읽고, 만들고, 편집하도록 돕습니다.
feishu-drive
394k에이전트가 봇과 공유된 Feishu 클라우드 폴더의 파일을 찾아보고, 정리하고, 댓글을 달도록 돕습니다.
feishu-perm
394k에이전트가 요청을 충족하는 가장 작은 권한을 골라, Feishu 파일에 누가 접근할 수 있는지 확인하고 바꾸도록 돕습니다.