Our review
This skill provides a structured workflow for processing PDF files, including text extraction, form filling, and result validation.
Strengths
- Clear workflow with progress checklist
- Modular scripts for analysis, extraction, and validation
- Built-in error handling in scripts
- Detailed dependency installation instructions
Limitations
- Requires a Python environment with pypdf and pdfplumber libraries
- Does not handle scanned PDFs without OCR
- Validation is limited to checking for text presence
When you need to automate data extraction or form filling from PDF documents.
For complex image-based PDFs or when a simple manual approach suffices.
Security analysis
SafeThis is a template skill containing example code and instructions; no harmful commands or security risks are present.
No concerns found
Examples
Extract text from input.pdf and save it to output.txtAnalyze the structure of input.pdf, report page count and form fieldsFill form fields in input.pdf with data from data.json, then validate the outputCode 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.