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 zhixuli0406/DuDuClaw --skill pdfgit clone --depth 1 https://github.com/zhixuli0406/DuDuClawWrote 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/zhixuli0406/duduclaw/pdf)<a href="https://agentmods.dev/skills/zhixuli0406/duduclaw/pdf"><img src="https://agentmods.dev/badge/skills/zhixuli0406/duduclaw/pdf.svg" alt="Measured on agentmods" 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.00034 | $0.00996 |
| Opus 5 | $0.00017 | $0.00498 |
| Sonnet 5 | $0.00007 | $0.00199 |
| Haiku 4.5 | $0.00003 | $0.00100 |
Grade A, and why
pdf 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 8d 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.
What it actually says
PDF 文件處理
處理 PDF 的兩件事:讀取抽取與建立。腳本用 uv run 執行,依賴以 PEP 723
inline metadata 宣告(讀取用 pypdf、建立用 reportlab);uv 不存在時改用
pip install pypdf reportlab 後 python3 執行。
何時使用
- 收到
.pdf附件,需要讀出文字來彙總、擷取、分析。 - 要把整理好的文字/報告直接產成一份 PDF 回傳。
腳本
腳本位於本技能的 scripts/ 目錄。兩種執行路徑,依你有沒有 Bash 工具擇一:
-
有 Bash / shell 工具 → 直接跑
uv run scripts/<script>.py ...(見下方各節)。 -
沒有 Bash / shell 工具(API 模式後端,如 Grok / DeepSeek / MiniMax) → 不要只回文字, 改用
office_scriptMCP 工具在伺服器端跑同一支腳本:skill:pdfscript:create/extract(不含路徑,.py可省略)args:字串陣列,等同uv run後面那串參數;任何路徑須落在你的 agent 目錄或其attachments/。
例(把整理好的文字產成 PDF):
{"skill": "pdf", "script": "create", "args": ["report.md", "--out", "/你的agent目錄/attachments/report.pdf"]}工具以
uv run(uv 不存在時退回python3)在你的 agent 目錄內執行並回傳腳本 stdout; 產出檔案後務必依下方 📎DELIVER 協定交付。
1. 讀取抽取 — extract.py
uv run scripts/extract.py <input.pdf> --format json # {"pages": ["p1 text", ...]}
uv run scripts/extract.py <input.pdf> --format md # 逐頁文字,以 --- 分隔
2. 建立 — create.py
把 markdown 或純文字產成 PDF(#/## 標題會用較大字級,其餘為內文;CJK 以內建
字型排版):
來源型別依副檔名判定(.txt → 純文字,其餘 → markdown):
uv run scripts/create.py report.md --out /abs/out.pdf
uv run scripts/create.py notes.txt --out /abs/out.pdf
若需要把 Word/Excel/PPT 轉成 PDF,請改用對應的
docx/xlsx/pptx技能的to_pdf.py(LibreOffice headless)。
交付檔案給使用者(📎DELIVER 協定)
產出後在回覆最後另起一行:
📎DELIVER:/絕對路徑/report.pdf
路徑須為絕對路徑且位於你的 agent 工作目錄(或其 attachments/)下;標記行不顯示給
使用者,請另用文字說明。
API 模式同樣適用:用 office_script 產出 .pdf 後,一樣在最後一行輸出
📎DELIVER:<絕對路徑>——只回文字不算完成。
What ships with it
2 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.
- 8d ago First seen · 82 lines · 34 tokens per session scan A 6348b51cab90
pdf is a skill published in the GitHub repository zhixuli0406/DuDuClaw (47 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 996 once invoked, about $0.0002 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.
Other skills, from other repositories
report-generator
Generate professional HTML/PDF investment reports with interactive visualizations.
docutranslate
Use when translating documents locally via LLM — PDF, Word, Excel, Markdown, SRT subtitles with format preservation. DocuTranslate: LLM-powered multi-format local file translation tool with MCP server support.
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When GLM needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
nano-pdf
Extract, analyze, and summarize PDF documents using available tools.
ocr-and-documents
Turn screenshots, scans, and messy files into structured working context.
financial-expense-automation
An expense-receipt workflow that reads PDF and image attachments, extracts their details, checks whether they are valid expense receipts, and records them in Feishu Bitable, a cloud table service.