name: pdf_simple_tool description: PDF splitting and PDF-to-Word conversion tools implemented in Node.js.
This skill provides two main actions for working with PDF files:
7w4.net小葱技能站,你的AI助手技能库。
cd skills/pdf-simple-tool/node/ 执行命令: npm install
When the user asks to split a PDF by page range (for example, "把这个 PDF 的第 3-5 页拆出来" / "split pages 3–5"), call the Node implementation:
skills/pdf-simple-tool/node/index.jssplitPdf(inputPath, outputPath, fromPage, toPage)Inputs
- inputPath (string): The absolute path to the source PDF.
- outputPath (string): The absolute path where the new PDF will be written.
- fromPage (integer): Start page (1-based).
- toPage (integer): End page (1-based, inclusive).
Example behavior:
- If the user says: "帮我把 /Users/xingxing/.openclaw/workspace/test.pdf 的第 1-3 页拆成一个 PDF 文件",
map this to:
- inputPath = "/Users/xingxing/.openclaw/workspace/test.pdf"
- outputPath = "/Users/xingxing/.openclaw/workspace/test_p1-3.pdf"
- fromPage = 1
- toPage = 3
When the user asks to convert a PDF to Word (for example, "把这个 PDF 转成 Word" / "convert to docx"), call the Node implementation:
skills/pdf-simple-tool/node/index.jspdfToWord(inputPath, outputPath)Inputs
- inputPath (string): The absolute path to the source PDF.
- outputPath (string): The absolute path where the Word file (.docx) will be written.
Example behavior:
- If the user says: "把 /Users/xingxing/.openclaw/workspace/test.pdf 转成 Word",
map this to:
- inputPath = "/Users/xingxing/.openclaw/workspace/test.pdf"
- outputPath = "/Users/xingxing/.openclaw/workspace/test.docx"
skills/pdf-simple-tool/node/index.js and uses:pdf-lib for PDF manipulation.pdf-parse + docx for PDF-to-Word conversion.这个 Skill 质量中等偏上,核心功能稳定可用,文档说明详细,错误提示友好。优点是使用简单、参数校验完善。不足之处在于 PDF 转 Word 功能比较基础,只能提取文字,排版、图片、表格等信息会丢失,体验不够理想。如果你只需要简单的拆分页面或提取文本,这个工具够用;如需高质量转换,建议期待后续版本优化。