用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/jleechanorg/claude-commands --skill pdf命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Token-efficient second opinion slash command /advice. Extracts decision point + artifact (≤150 lines), then fans out in parallel: (1) Opus subagent reviewer with fallback chain codex→agy→cursor, (2) /research on the decision topic, (3) /secondo multi-model opinion. Use instead of advisor() which ships the full conversation uncached.
Use this skill when working in repositories managed by Agent Orchestrator or when the user asks how to use `ao` properly. Covers the default AO workflow: bootstrap with `ao start`, dispatch work with `ao spawn`, inspect progress with `ao status` or `ao session ls`, steer sessions with `ao send`, and recover or clean up sessions safely. Includes strict parameter fidelity, pre-spawn cap cleanup, quota-wall fallback, and post-spawn verification.
Generate a full agento PR status report — draft readiness, canonical /green, zero-touch rate, inline display, and Slack summary.
基于 SOC 职业分类
正在显示 SKILL.md
| name | |
| description | Create, merge, split, fill, and secure PDF files. |
| version | 1.0.0 |
| author | Anthropic (adapted by Nous Research) |
| license | Proprietary. LICENSE.txt has complete terms |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["PDF","Documents","Forms","Office","Productivity"],"category":"productivity","related_skills":["ocr-and-documents","nano-pdf","docx","xlsx"]}} |
Create, combine, split, transform, and secure PDF files — merging, page manipulation, form filling, watermarks, encryption, and text/table extraction. For heavy text extraction from scanned documents prefer the ocr-and-documents skill; for natural-language edits to existing PDF text prefer nano-pdf.
Use this skill whenever the user wants to do anything with PDF files: reading or extracting text/tables, combining or merging multiple PDFs, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting, extracting images, or OCR on scanned PDFs. If the user mentions a .pdf file or asks to produce one, use this skill.
pip install pypdf pdfplumber reportlab
which pdftotext || sudo apt install -y poppler-utils # pdftotext, pdftoppm, pdfimages
which qpdf || sudo apt install -y qpdf # CLI merge/split/decrypt
macOS: brew install poppler qpdf. OCR extras: pip install pytesseract pdf2image + sudo apt install -y tesseract-ocr.
Script paths below are relative to this skill's directory. Form filling has its own workflow — read forms.md and follow it. Advanced library usage (pypdfium2, pdf-lib) and troubleshooting: reference.md.
| Task | Best Tool | Command/Code |
|---|---|---|
| Merge PDFs | pypdf | writer.add_page(page) per page |
| Split PDFs | pypdf | One page per file |
| Extract text | pdfplumber | page.extract_text() |
| Extract tables | pdfplumber | page.extract_tables() |
| Create PDFs | reportlab | Canvas or Platypus |
| Command-line merge/split | qpdf | qpdf --empty --pages ... |
| OCR scanned PDFs | pytesseract | Convert to images first (or use ocr-and-documents) |
| Fill PDF forms | see forms.md | scripts/fill_fillable_fields.py etc. |
| Edit existing text | nano-pdf skill | nano-pdf edit file.pdf <page> "<instruction>" |
from pypdf import PdfReader, PdfWriter
# Merge
writer = PdfWriter()
for pdf_file in ["doc1.pdf", "doc2.pdf"]:
for page in PdfReader(pdf_file).pages:
writer.add_page(page)
with open("merged.pdf", "wb") as f:
writer.write(f)
# Split: one file per page
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
w = PdfWriter(); w.add_page(page)
with open(f"page_{i+1}.pdf", "wb") as f:
w.write(f)
# Rotate
page = reader.pages[0]
page.rotate(90) # clockwise
import pdfplumber, pandas as pd
with pdfplumber.open("document.pdf") as pdf:
text = "\n".join(page.extract_text() or "" for page in pdf.pages)
tables = [pd.DataFrame(t[1:], columns=t[0])
for page in pdf.pages
for t in page.extract_tables() if t]
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak
from reportlab.lib.styles import getSampleStyleSheet
doc = SimpleDocTemplate("report.pdf", pagesize=letter)
styles = getSampleStyleSheet()
story = [Paragraph("Report Title", styles["Title"]), Spacer(1, 12),
Paragraph("Body text...", styles["Normal"]), PageBreak(),
Paragraph("Page 2", styles["Heading1"])]
doc.build(story)
Subscripts/superscripts: never use Unicode sub/superscript characters (₀₁₂, ⁰¹²) — the built-in fonts lack the glyphs and render solid black boxes. Use <sub>/<super> markup inside Paragraph objects: Paragraph("H<sub>2</sub>O", styles['Normal']). For canvas-drawn text, adjust font size and position manually.
pdftotext -layout input.pdf output.txt # text, layout preserved
pdftotext -f 1 -l 5 input.pdf output.txt # pages 1-5
qpdf --empty --pages file1.pdf file2.pdf -- merged.pdf # merge
qpdf input.pdf --pages . 1-5 -- pages1-5.pdf # split range
qpdf input.pdf output.pdf --rotate=+90:1 # rotate page 1
qpdf --password=pw --decrypt encrypted.pdf decrypted.pdf # remove password
pdfimages -j input.pdf img # extract images
from pypdf import PdfReader, PdfWriter
watermark = PdfReader("watermark.pdf").pages[0]
reader, writer = PdfReader("document.pdf"), PdfWriter()
for page in reader.pages:
page.merge_page(watermark)
writer.add_page(page)
with open("watermarked.pdf", "wb") as f:
writer.write(f)
writer.encrypt("userpassword", "ownerpassword")
import pytesseract
from pdf2image import convert_from_path
pages = convert_from_path("scanned.pdf")
text = "\n\n".join(pytesseract.image_to_string(img) for img in pages)
For batch/structured extraction from scans, the ocr-and-documents skill (pymupdf, marker-pdf) is the better path.
Read forms.md first — it distinguishes fillable (AcroForm) PDFs from flat scanned forms and walks through the helper scripts:
scripts/check_fillable_fields.py — does the PDF have AcroForm fields?scripts/extract_form_field_info.py / scripts/extract_form_structure.py — enumerate fieldsscripts/fill_fillable_fields.py — fill AcroForm fieldsscripts/fill_pdf_form_with_annotations.py — overlay text on flat formsscripts/check_bounding_boxes.py, scripts/create_validation_image.py — verify placement visuallypage.extract_text() returns None on image-only pages — guard with or "" and fall back to OCR.PdfReader(path, password=...) before pages are accessible.PdfReader and assert the expected page count.pdftotext or pdfplumber) and confirm the content you added is present.pdftoppm -jpeg -r 100 output.pdf page and inspect the images with vision_analyze.ocr-and-documents (scanned-document text extraction), nano-pdf (NL text edits in place), docx (Word), xlsx (spreadsheets), powerpoint (decks).