doc

doc is a command for Claude Code from jzl-maker/EA-SKILL. It costs 0 tokens per session (2,229 once invoked), scanned A, original, MIT.

A document parser that converts text-based PDF, Word, and Excel files into Markdown or JSON. It can extract headings, tables, pages, and worksheets, but it does not read scanned images.

In plain words
What is it for?
Use it to read chip manuals, requirements, pin assignments, register tables, test reports, and protocol documents.
Why use it?
It turns technical documents into structured text that an AI can inspect directly. This removes manual copying from manuals, specifications, reports, and spreadsheets.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths.

Good fit Use it to read chip manuals, requirements, pin assignments, register tables, test reports, and protocol documents.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jzl-maker/ea-skill/doc
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.

Clone the repo
git clone --depth 1 https://github.com/jzl-maker/EA-SKILL

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/jzl-maker/ea-skill/doc/github.svg)](https://agentmods.dev/commands/jzl-maker/ea-skill/doc)
Your own site
<a href="https://agentmods.dev/commands/jzl-maker/ea-skill/doc"><img src="https://agentmods.dev/badge/commands/jzl-maker/ea-skill/doc/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doc

Your own site · 80×15
<a href="https://agentmods.dev/commands/jzl-maker/ea-skill/doc"><img src="https://agentmods.dev/badge/commands/jzl-maker/ea-skill/doc.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,229 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.02229
Opus 5 $0.00000 $0.01115
Sonnet 5 $0.00000 $0.00446
Haiku 4.5 $0.00000 $0.00223

Measured yesterday against content hash 46c493879c74, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

doc 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 yesterday.

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.

commands/doc.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

命令: /ea doc (文档识别)

功能

把 PDF / Word(.docx) / Excel(.xlsx) 转成 Markdown 或 JSON,供 AI 直接消费。 用于识别:芯片手册/数据手册、需求规格文档、引脚分配表、寄存器表、测试报告、协议说明。

只做解析,不做 OCR。扫描件(无文本层的 PDF)明确报错,不做图片文字识别。

触发

/ea doc <路径>                 # Markdown(默认,表格超 20 行截断)
/ea doc <路径> --outline       # 只输出结构大纲(快速判断文档讲什么)
/ea doc <路径> --full          # 不截断
/ea doc <路径> --tables        # 只输出表格
/ea doc <路径> --pages 1-20    # PDF 页范围(也支持 1,5,7-9)
/ea doc <路径> --sheet Sheet1  # 只解析指定工作表(可重复)
/ea doc <路径> --json          # 结构化 JSON
/ea doc <路径> --out <文件>    # 同时写入文件
/ea doc <路径> --keep-watermark  # 保留平铺水印行(默认自动过滤)
/ea doc --scan <目录>          # 列出目录下可识别文档

执行流程

  1. 【依赖检查】 首次运行前确认 pdfplumber(PDF 需要;DOCX/XLSX 零依赖):
    py ~/.claude/skills/EA-SKILL/tools/doc-reader/scripts/deps_check.py --detect
    
  2. 【路径确认】 确认目标文件存在、扩展名受支持
  3. 【调用工具】
    py ~/.claude/skills/EA-SKILL/tools/doc-reader/scripts/doc_reader.py <路径> [参数]
    
  4. 【解读】 按用户意图消费结果(见下方「串联场景」)

支持矩阵

格式 解析方式 依赖 说明
PDF pdfplumber pip 需文本层;含表格提取(--pages 分段)
Word .docx zipfile + XML 保留标题层级 + 表格
Excel .xlsx zipfile + XML 多工作表 + sharedStrings + 内联字符串

不支持(明确报错并给替代方案):

格式 提示
扫描件 PDF 无文本层 → 改用 Read 工具走视觉识别
.doc / .xls 老二进制格式 → 另存为 .docx / .xlsx
.pptx / .ppt 另存为 PDF 后再 /ea doc
.csv / .txt / .md 直接用 Read 工具读取

输出格式

# <文件名>

> 来源: `<路径>`
> 格式: pdf | 解析: 2026-09-10 09:45
> pages_total=120 | pages_parsed=120 | pages_with_text=118 | tables=3
> ⚠️ 2 页无文本层(可能是扫描页/纯图页),已跳过其文本

## 第 1 页
<正文>

| 列1 | 列2 |
|---|---|
  • 标题行 > 元信息 + 警告,便于 AI 判断可信度(有几页没解析到)
  • --json 输出 {path, format, meta, warnings, sections[]}sections[].kind ∈ heading/paragraph/page/table/sheet

平铺水印过滤(默认开启)

供应商给的规格书常带斜向铺满页面的水印(如"仅供东屋参考")。这类水印有文本层, 会被逐字提取成大量重复的单字行(实测可占非空行的 80%)。后果:

  • --outline 的每页 200 字摘录被水印占满,"快速判断文档讲什么"的作用完全失效
  • 表格数值被粘上水印字:| 参 57600 || 屋 Φ20.90 || 供 V1.0.5 |

Read the full file on GitHub · 143 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. yesterday Changed · +33 lines 46c493879c74
  2. 2d ago First seen · 110 lines · 0 tokens per session scan A 27d5f36014b8

Subscribe to this mod's changes

doc is a command published in the GitHub repository jzl-maker/EA-SKILL (6 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,229 tokens. 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-09-10.