跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
文档处理

pdf_merge

Merge multiple PDF files into a single PDF. Use when: user asks to combine, join, or concatenate PDFs. Supports page selection and ordering. NOT for: splitting PDFs, editing content, or converting formats.

ericwang915 · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add ericwang915/PythonClaw --skill pdf_merge

技能说明


name: pdf_merge description: "Merge multiple PDF files into a single PDF. Use when: user asks to combine, join, or concatenate PDFs. Supports page selection and ordering. NOT for: splitting PDFs, editing content, or converting formats." dependencies: PyPDF2 metadata: emoji: "📎"

PDF Merge Skill

Merge multiple PDF files into one combined document using PyPDF2.

When to Use

✅ USE this skill when:

  • "Merge these PDFs together"
  • "Combine report1.pdf and report2.pdf"
  • "Join all PDFs in this folder"
  • "Append this PDF to the end of another"
  • User wants to create a single PDF from multiple source PDFs

When NOT to Use

❌ DON'T use this skill when:

  • Splitting a single PDF → use pdf_split
  • Creating a PDF from text → use pdf_writer
  • Extracting text from PDF → use pdf_reader
  • Converting PDF to images → use pdf_convert

Usage/Commands

python {skill_path}/merge_pdf.py OUTPUT_PATH INPUT1 INPUT2 [INPUT3 ...] [options]

Options:

  • --pages "1:1-3,2:5-10" — select specific pages per input file (1-indexed, file_index:page_range)
  • --dir PATH — merge all PDFs in a directory (alphabetical order)
  • --reverse — reverse the input order
  • --format json — output result as JSON

Examples

  • "Merge a.pdf and b.pdf" → python {skill_path}/merge_pdf.py combined.pdf a.pdf b.pdf
  • "Merge all PDFs in reports/" → python {skill_path}/merge_pdf.py combined.pdf --dir reports/
  • "Combine only pages 1-3 of first and 5-10 of second" → python {skill_path}/merge_pdf.py out.pdf a.pdf b.pdf --pages "1:1-3,2:5-10"

Notes

  • Install dependency: pip install PyPDF2
  • Input files must be valid PDFs
  • Preserves bookmarks and links when possible