ask-pdf-processing

📁 navanithans/agent-skill-kit 📅 11 days ago
2
总安装量
2
周安装量
#75161
全站排名
安装命令
npx skills add https://github.com/navanithans/agent-skill-kit --skill ask-pdf-processing

Agent 安装分布

qoder 2
gemini-cli 2
replit 2
antigravity 2
codebuddy 2
qwen-code 2

Skill 文档

<critical_constraints> ❌ NO arbitrary file writes → use provided scripts only ❌ NO loading huge PDFs into memory → process in chunks ❌ NO overwriting originals → backup first ✅ MUST use context managers (with statements) ✅ MUST validate PDFs before processing ✅ MUST handle encrypted PDFs with password </critical_constraints>

Form Filling (pypdf)

from pypdf import PdfReader, PdfWriter
writer = PdfWriter()
writer.append(PdfReader("template.pdf"))
writer.update_page_form_field_values(writer.pages[0], {"name": "John"})
writer.write(open("filled.pdf", "wb"))

Discover Fields

fields = PdfReader("form.pdf").get_fields()

Merge PDFs

writer = PdfWriter()
for pdf in ["a.pdf", "b.pdf"]:
    writer.append(pdf)
writer.write(open("merged.pdf", "wb"))