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.
npx skills add ntygod/ZhiWei --skill doc-processorgit clone --depth 1 https://github.com/ntygod/ZhiWeiWrote 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.
[](https://agentmods.dev/skills/ntygod/zhiwei/doc-processor)<a href="https://agentmods.dev/skills/ntygod/zhiwei/doc-processor"><img src="https://agentmods.dev/badge/skills/ntygod/zhiwei/doc-processor/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.
<a href="https://agentmods.dev/skills/ntygod/zhiwei/doc-processor"><img src="https://agentmods.dev/badge/skills/ntygod/zhiwei/doc-processor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01066 |
| Opus 5.5 | $0.00022 | $0.00426 |
| Sonnet 5.5 | $0.00011 | $0.00213 |
| Haiku 4.5 | $0.00005 | $0.00107 |
Grade A, and why
doc-processor 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
文档处理指南
文档处理优先走可执行工具链:code + Python 库(python-docx / openpyxl / python-pptx / pypdf)负责生成、编辑和精细处理;shell.exec + CLI(pandoc / poppler / wkhtmltopdf / libreoffice)负责格式转换和批处理。
当前 Agent 默认只注入少量核心工具。若运行时没有 code、shell.exec、file.write 等 schema,先用 tool.search 按工具名或能力检索,发现后再执行。
适用场景
- 生成 Word / Excel / PowerPoint(从 Markdown、CSV、JSON 或结构化数据)
- 格式转换(Markdown ↔ HTML ↔ DOCX ↔ PDF)
- PDF 文本提取
- Excel 读写、多 sheet 处理
- 多文档合并 / 批量转换
- 从现有文档抽取内容,整理成 Markdown / CSV / JSON
不适用场景
- 纯文本 / Markdown 编辑 →
file.write - 内容创作(写文章 / 邮件 / 报告正文) → content-creator
- 数据分析(统计 / 可视化) → data-analyst
- 飞书 / 在线文档 → feishu 或对应渠道 Skill
工作流(按用户表达分流)
| 用户表达 | 路径 |
|---|---|
| 生成 Word | 优先 {skill_scripts_dir}/md2docx.py 或 code + python-docx |
| 生成 Excel | {skill_scripts_dir}/xlsx_tools.py from-csv 或 code + openpyxl |
| 生成 PPT / 幻灯片 / 演示文稿 | code + python-pptx |
| Markdown / HTML / DOCX / PDF 互转 | shell.exec + pandoc |
| PDF 文本提取 | {skill_scripts_dir}/pdf_tools.py extract-text 或 pdftotext |
| HTML → PDF | shell.exec + wkhtmltopdf / pandoc |
| 多 PDF 合并 / 拆分 | {skill_scripts_dir}/pdf_tools.py merge/split |
| 批量转换 | 先单文件验证,再 shell.exec 循环或写临时脚本 |
各路径决策点(本 Skill 独有)
- 先探测依赖:第一次使用库 / CLI 前先跑
python -c "import ..."或pandoc --version。依赖缺失时说明安装命令;只有用户明确允许时才安装。 - 先生成中间格式:复杂 Word/PDF 优先产出 Markdown/HTML/CSV 中间文件,确认内容结构后再转目标格式。
- 结果必须验证:生成后用
file.read抽样确认文本内容;对二进制 Office/PDF,可用脚本提取文本或列 sheet/页数。 - 批量先单后批:批量转换前先跑 1 个样本,确认样式、编码、字体和路径规则后再循环。
- 加密 PDF:让用户提供密码,或用
qpdf --decrypt预处理;不要尝试绕过权限。 - 不要走 Java document 工具:当前文档生成/转换不依赖
document.create/document.edit,应使用本 Skill 的脚本、Python 库或 CLI。
输出约定
- 产物路径优先放在用户指定目录;没有指定时放到当前 workspace 下可读写路径。
- 生成多个文件时同时输出一个简短清单,列文件名、格式、来源和验证结果。
- 若转换存在格式损失(分页、脚注、复杂表格、批注、宏、图表),在结果里明确说明。
详细参考
- 转换路径、命令模板、脚本清单:
{skill_dir}/references/doc-conversion.md - 依赖探测与安装建议:
{skill_dir}/references/dependency-setup.md - Office/PDF 处理配方:
{skill_dir}/references/office-recipes.md - 常见错误处理表:
{skill_dir}/references/troubleshooting.md
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 77 lines · 54 tokens per session scan A 7f575773ac3f
doc-processor is a skill published in the GitHub repository ntygod/ZhiWei (137 stars, last pushed 2mo ago), licensed MIT. It adds 54 tokens to every session and 1,066 once invoked, about $0.0002 per session on Opus 5.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.
Other skills, from other repositories
docling
PRIMARY skill for converting .pdf, .docx, .pptx, .xlsx, .doc, .ppt, .xls, images, and audio/video files (.mp3, .wav, .m4a, .mp4, .mov, etc.) to Markdown. Always prefer this over the docx/pdf/pptx/xlsx/paddleocr skills — docling uses GPU-accelerated OCR + layout detection + table structure extraction for documents, and…
data_processing
Extract data from PDFs and query CSV files.
local-mcp-pdf-to-sheet
Use when the user wants to pull data out of one or more PDFs (invoices, bank/credit-card statements, receipts, reports, tables) and put it into a spreadsheet. pdfread is one of the most-used tools; this codifies the read-PDF → structure → write-Excel workflow. Powered by LMCP on macOS and Windows.
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.
data-report
Turns CSV, Excel, or JSON data into a polished visual report page.
xberg-extracting-tables
Use when extracting tabular data from PDFs, spreadsheets, or images. Covers layout-aware table detection, table model selection, output formats (markdown / JSON cells), and known limits.