doc-reader

doc-reader is a skill for Claude Code, Codex from HKUDS/Vibe-Trading. It costs 65 tokens per session (1,616 once invoked), scanned A, original, MIT.

A unified document reader that extracts text from common files, including PDF, Word, Excel, PowerPoint, images, CSV, plain text, configuration files, web markup, and source code. Images are read with optical character recognition, or OCR, which converts visible text into machine-readable text.

In plain words
What is it for?
Use it to inspect reports, spreadsheets, presentations, scanned images, datasets, configuration files, web pages, and code. It is also useful when a file’s contents need to be searched or analyzed before another task.
Why use it?
It removes the need to choose a different reading method for each file format. It returns the extracted content through one document-reading tool, while rejecting executables and archives for safety.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

About the project

Vibe-Trading is a personal trading agent that gives an AI system tools for market analysis, algorithmic trading, backtesting, and related workflows. It is for users who want an agent to research and evaluate trading strategies or manage simulated and other trading activities. The catalogue contains skills that expose these trading capabilities to compatible agents.

HKUDS/Vibe-Trading · 32,590 stars · on GitHub · vibetrading.wiki

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hkuds/vibe-trading/doc-reader
Any agent
npx skills add HKUDS/Vibe-Trading --skill doc-reader
Clone the repo
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-reader

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/vibe-trading/doc-reader.svg)](https://agentmods.dev/skills/hkuds/vibe-trading/doc-reader)
Your own site
<a href="https://agentmods.dev/skills/hkuds/vibe-trading/doc-reader"><img src="https://agentmods.dev/badge/skills/hkuds/vibe-trading/doc-reader.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.01616
Opus 5 $0.00032 $0.00808
Sonnet 5 $0.00013 $0.00323
Haiku 4.5 $0.00006 $0.00162

Measured 6d ago against content hash 01fd83063ac5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

doc-reader scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent/src/skills/doc-reader/SKILL.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on 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 .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

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 159 lines · 65 tokens per session scan A 01fd83063ac5

Subscribe to this mod's changes

doc-reader is a skill published in the GitHub repository HKUDS/Vibe-Trading (32,590 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 1,616 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

markdown-converter

Convert binary documents (PDF, DOCX, XLSX, PPTX, HTML, EPUB, images) to clean LLM-friendly Markdown using Microsoft's markitdown Python tool. Use when a user attaches a binary file and you need to read its contents.

Team-Commonly/commonly · 57 tokens

doc-reader

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 readdocument tool.

skloxo/TideTrading · 65 tokens

research-brief

Turn sourced web findings into a concise PDF brief and an auditable XLSX evidence table.

kdcube/kdcube · 22 tokens

document-material-ingestion

Use this skill when the team must turn Boss-provided mixed-format documents into PPT-ready facts, arguments, data tables, and source traces.

BingHanOfUESTC/open_agent_team · 0 tokens

doc-reader

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 readdocument tool.

SZWzz/AStockPursue · 65 tokens

file-maker

Generate structured files (PDF, PPTX, DOCX, XLSX, ZIP) using Python inside a container sandbox. Use when the user asks to create, export, or generate a document, report, spreadsheet, presentation, or archive. After creation, use file-delivery skill to send the file. When explicitly requested, can also package multiple…

berrzebb/SoulFlow-Orchestrator · 120 tokens