Our review
Extracts text from PDFs, fills forms, and merges documents using automated Python scripts.
Strengths
- Reliable automation of recurring PDF tasks
- Modular and well-documented Python scripts
- Built-in validation of results
Limitations
- Requires Python knowledge to customize scripts
- Depends on third-party libraries (pypdf, pdfplumber)
- May fail on highly complex or malformed PDFs
When you need to batch process PDF files (extraction, merging, form filling) in a reproducible manner.
For a simple one-off PDF manipulation, a GUI or online tool is quicker.
Security analysis
SafeThe skill is a template for creating code skills; it contains example boilerplate and benign Python scripts for PDF processing. No actual execution, network access, or destructive commands are present.
No concerns found
Examples
Extract text from the PDF file 'invoice.pdf' and save it to 'invoice.txt' using the PDF processing skill.Analyze the structure of 'report.pdf' to show page count, form fields, and text presence.Merge the PDFs 'file1.pdf', 'file2.pdf', and 'file3.pdf' into a single document called 'combined.pdf'.Code Skill Template
스크립트를 포함하는 스킬용
디렉토리 구조
my-code-skill/
├── SKILL.md
├── reference.md
└── scripts/
├── analyze.py
├── process.py
└── validate.py
SKILL.md 예시
---
name: processing-pdfs
description: "Extracts text from PDFs, fills forms, merges documents. Use when working with PDF files or document extraction."
allowed-tools:
- Bash
- Read
- Write
---
# PDF Processing
## Quick start
Extract text:
```bash
python scripts/extract_text.py input.pdf > output.txt
Workflow
Copy this checklist:
Progress:
- [ ] Step 1: Analyze PDF structure
- [ ] Step 2: Extract content
- [ ] Step 3: Validate output
Step 1: Analyze PDF
python scripts/analyze.py input.pdf
Output shows page count, form fields, and structure.
Step 2: Extract content
python scripts/extract_text.py input.pdf > output.txt
Step 3: Validate
python scripts/validate.py output.txt
Fix any issues before proceeding.
Scripts reference
| Script | Purpose | |--------|---------| | analyze.py | PDF 구조 분석 | | extract_text.py | 텍스트 추출 | | fill_form.py | 폼 필드 채우기 | | validate.py | 결과 검증 |
For detailed API: See reference.md
Dependencies
pip install pypdf pdfplumber
---
## scripts/analyze.py 예시
```python
#!/usr/bin/env python3
"""
analyze.py - PDF 구조 분석
Usage:
python analyze.py input.pdf
Output:
- Page count
- Form fields
- Text/image ratio
"""
import sys
import json
from pypdf import PdfReader
def main():
if len(sys.argv) != 2:
print("Usage: python analyze.py input.pdf", file=sys.stderr)
sys.exit(1)
pdf_path = sys.argv[1]
try:
reader = PdfReader(pdf_path)
except Exception as e:
print(f"Error reading PDF: {e}", file=sys.stderr)
sys.exit(1)
result = {
"page_count": len(reader.pages),
"form_fields": [],
"has_text": False
}
# Form fields
if reader.get_form_text_fields():
result["form_fields"] = list(reader.get_form_text_fields().keys())
# Check for text
for page in reader.pages:
if page.extract_text().strip():
result["has_text"] = True
break
print(json.dumps(result, indent=2))
if __name__ == "__main__":
main()
핵심 포인트
- 워크플로우 체크리스트: 진행 추적
- 피드백 루프: 검증 → 수정 → 재검증
- 스크립트 문서화: Usage, Output 명시
- 에러 직접 처리: Claude에 떠넘기지 않기
- 의존성 명시: pip install 명령 포함
Prompt Engineering
Data & AI
Prompt engineering best practices and templates to maximize AI outputs.
Data Visualization
Data & AI
Generates data visualizations and charts tailored to your data.
RAG Architecture Setup
Data & AI
Setup guide for RAG (Retrieval-Augmented Generation) architectures.