Chuyển đến nội dung
Skillpedia
PDF, Word và slide37k · #7513

doc-reader

Skill này làm gì

Skill này cho agent một công cụ duy nhất để lấy văn bản đọc được từ nhiều loại file phổ biến. Skill dành cho bất kỳ ai cần AI đọc báo cáo, hợp đồng, bảng tính hoặc trang đã quét.

Khi nào nên dùng

  • ✓Khi bạn cần AI đọc file PDF, tài liệu Word, bảng Excel hoặc file PowerPoint.
  • ✓Khi một trang quét hoặc hình ảnh cần được chuyển thành văn bản.
  • ✓Khi bạn muốn lấy văn bản từ file CSV, JSON hoặc file mã nguồn mà không phải mở thủ công.

Liên kết skill

https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/doc-reader/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/doc-reader/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Đọc file PDF báo cáo thường niên này, từ trang một đến trang mười, và tóm tắt các ý chính.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent gọi một công cụ đọc tài liệu, công cụ này chọn phương pháp phù hợp theo loại file. Các trang quét được nhận dạng văn bản, còn bảng tính được hiển thị dưới dạng xem trước. File nén và file chương trình bị chặn vì lý do an toàn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 .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
Câu hỏi thường gặp

Skill đọc được những loại file nào?

PDF, Word, Excel, PowerPoint, các định dạng hình ảnh phổ biến, CSV, văn bản thuần, file cấu hình, mã đánh dấu web và nhiều file mã nguồn.

Tại sao không mở được file zip?

File nén và file thực thi bị chặn, nên bạn cần giải nén trên máy tính của mình trước.

Skill có đọc được trang quét không?

Có. Trang quét hoặc chỉ có hình ảnh được đọc bằng nhận dạng văn bản.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
37k
Vị trí xếp hạng
#7513
Giấy phép
MIT
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự