doc-reader
यह क्या करती है
यह स्किल एजेंट को कई आम फ़ाइल प्रकारों से पढ़ने योग्य टेक्स्ट निकालने का एक ही टूल देती है। यह उन सभी के लिए है जिन्हें किसी रिपोर्ट, अनुबंध, स्प्रेडशीट या स्कैन किए गए पेज को AI से पढ़वाना है।
कब इस्तेमाल करें
- ✓जब आपको AI से PDF, Word दस्तावेज़, Excel शीट या PowerPoint फ़ाइल पढ़वानी हो।
- ✓जब किसी स्कैन किए गए पेज या इमेज को टेक्स्ट में बदलना हो।
- ✓जब आपको CSV, JSON या कोड फ़ाइल से हाथ से खोले बिना टेक्स्ट चाहिए।
Skill का लिंक
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/doc-reader/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस वार्षिक रिपोर्ट PDF के पेज एक से दस पढ़िए और मुख्य बातों का सार दीजिए।”
हर हफ़्ते 5 नई skills, 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, Word, Excel, PowerPoint, आम इमेज फ़ॉर्मेट, 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
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
vibe-trading
37kयह आपके एजेंट को वित्त शोध का पूरा टूलकिट देती है, जिसमें बैकटेस्ट, फ़ैक्टर एनालिसिस, ऑप्शन प्राइसिंग और कई बाज़ारों का डेटा शामिल है।
adr-hshare
37kयह आपके एजेंट को दिखाती है कि कई बाज़ारों में लिस्टेड एक चीनी कंपनी के भाव की तुलना कैसे करें, जैसे अमेरिकी ADR और हॉन्गकॉन्ग शेयर।
akshare
37kयह आपके एजेंट को चीनी और वैश्विक शेयरों, फ़्यूचर्स, फ़ॉरेक्स और आर्थिक संकेतकों का मुफ़्त बाज़ार डेटा लेने देती है, बिना API key के।
alpha-zoo
37kयह आपके एजेंट को बने-बनाए स्टॉक फ़ैक्टरों की लाइब्रेरी देखने और चुने हुए बाज़ार पर उनके पूरे समूह के रिटर्न की भविष्यवाणी की क्षमता जाँचने देती है।
मिलती-जुलती skills
feishu-doc
394kयह आपके एजेंट को document टूल से Feishu क्लाउड दस्तावेज़ पढ़ने, बनाने और बदलने में मदद करती है, जिसमें टेक्स्ट, इमेज और टेबल शामिल हैं।
feishu-drive
394kयह आपके एजेंट को बॉट के साथ साझा किए गए Feishu क्लाउड फ़ोल्डर में फ़ाइलें देखने, व्यवस्थित करने और उन पर टिप्पणी करने देती है।
feishu-perm
394kयह आपके एजेंट को Feishu फ़ाइल तक किसकी पहुंच है, यह जांचने और बदलने देती है, और आपके अनुरोध के लिए सबसे छोटी अनुमति चुनती है।