skills/pdf-reader/SKILL.md
PDF 文档解析与知识提取。将 PDF 转为纯文本,支持分页提取、摘要生成、 结构化整理,并可将内容持久化为 workspace 参考资料。 当用户发送 PDF 文件,或提到"解析PDF"、"提取内容"、"PDF转文字"时激活。
npx skillsauth add Damon-GSY/claude-skills pdf-readerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
将 PDF 文件解析为结构化文本,并整理成可检索、可复用的知识文件。
references/ 目录,跨会话可用飞书收到的文件存放在 /root/.openclaw/media/inbound/,文件名可能含乱码。
用 ls -lt 找到最新的文件:
ls -lt /root/.openclaw/media/inbound/*.pdf | head -5
python3 -c "import fitz; print('pymupdf ready')" 2>&1
如果不可用,安装:
pip install --break-system-packages pymupdf
提取全部内容:
import fitz
doc = fitz.open('/path/to/file.pdf')
print(f'Pages: {doc.page_count}')
for i in range(doc.page_count):
text = doc[i].get_text()
print(f'--- Page {i+1} ---')
print(text)
提取指定页(快速预览):
import fitz
doc = fitz.open('/path/to/file.pdf')
for i in range(start_page, end_page):
print(doc[i].get_text())
提取并保存为文本文件:
import fitz
doc = fitz.open('/path/to/file.pdf')
text = ''
for i in range(doc.page_count):
text += doc[i].get_text()
with open('/path/to/output.txt', 'w') as f:
f.write(text)
print(f'Extracted {doc.page_count} pages, {len(text)} chars')
根据 PDF 内容特点,将文本整理为:
references/ 并更新 TOOLS.md整理完成后,在 TOOLS.md 中记录新增的参考资料,确保跨会话可查。
references/
├── 原始PDF.pdf ← 保留原始文件
├── 文档名.txt ← 纯文本版(用于搜索)
└── 文档名-笔记.md ← 结构化笔记(可选,用于快速参考)
## 参考资料库
| 来源 | 文件 | 核心内容 |
|------|------|---------|
| 刘润 | references/刘润-经典商业思维模型手册.txt | 25个商业思维模型 |
testing
财商训练工具顾问。基于《财商训练工具手册》24个模块。 当用户讨论个人理财、储蓄预算、投资理财、消费心理、财务规划、 保险保障、债务管理、财务自由等财务智商话题时激活。 也适用于"怎么理财"、"如何攒钱"、"该不该买"、"投资建议"、 "怎么规划财务"类问题。
tools
Web search without an API key using DuckDuckGo Lite via web_fetch. Use as a fallback when web_search fails with missing_brave_api_key error, or whenever you need to search the web and no search API is configured. Provides titles, URLs, and snippets for research queries. Zero dependencies — works with just the built-in web_fetch tool.
testing
On-demand agent loader from The Agency (msitarzewski/agency-agents). Searches 184 specialized AI agents by context, loads relevant ones into ~/.claude/agents/.
tools
现代思维工具顾问。基于《现代思维工具词典》148个思维工具。 当用户需要分析问题、做决策、评估方案、批判性思考、理解复杂系统、 或需要思维框架辅助判断时激活。也适用于回答"怎么想"、"从什么角度看"类问题。