PDF Simple Tool

👤 daguniang 📦 v1.2.0 ⭐ 4.3 ⬇️ 781 下載
📄 辦公效率 免費

📖 技能介紹


name: pdf_simple_tool description: PDF splitting and PDF-to-Word conversion tools implemented in Node.js.


PDF Simple Tool Skill

This skill provides two main actions for working with PDF files:

  1. split_pdf – Extract a page range from a PDF into a new PDF.
  2. pdf_to_word – Convert a PDF into a simple Word (.docx) document.

Install

cd skills/pdf-simple-tool/node/ 執行命令: npm install

Actions

split_pdf

小蔥技能7w4.net持續更新中。

When the user asks to split a PDF by page range (for example, "把這個 PDF 的第 3-5 頁拆出來" / "split pages 3–5"), call the Node implementation:

  • Entry: skills/pdf-simple-tool/node/index.js
  • Function: splitPdf(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

pdf_to_word

When the user asks to convert a PDF to Word (for example, "把這個 PDF 轉成 Word" / "convert to docx"), call the Node implementation:

  • Entry: skills/pdf-simple-tool/node/index.js
  • Function: pdfToWord(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"

Notes

  • Implementation code lives in skills/pdf-simple-tool/node/index.js and uses:
  • pdf-lib for PDF manipulation.
  • pdf-parse + docx for PDF-to-Word conversion.
  • You are responsible for wiring these actions into your agent so that natural language requests are converted into the appropriate function calls with the correct paths and page ranges.

🤖 AI 評測

這個 Skill 質量中等偏上,核心功能穩定可用,文件說明詳細,錯誤提示友好。優點是使用簡單、引數校驗完善。不足之處在於 PDF 轉 Word 功能比較基礎,只能提取文字,排版、圖片、表格等資訊會丟失,體驗不夠理想。如果你只需要簡單的拆分頁面或提取文本,這個工具夠用;如需高質量轉換,建議期待後續版本最佳化。

📊 多維度評分

適應性4.4
規範性4.3
有效性4
可靠性4.2
可信度5

📁 包含檔案 (5 個)

📄 SKILL.md 2.3 KB
📄 _meta.json 134 B
📄 node/index.js 3.4 KB
📄 node/package-lock.json 10.2 KB
📄 node/package.json 173 B