PDF Toolkit
A comprehensive PDF manipulation skill for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms.
Evidence shows the skill relies on local scripts and common open-source libraries (pypdf, pdfplumber, etc.), with no malicious behavior or data exfiltration found. However, scripts directly execute system commands (e.g., qpdf, pdftotext) without permission isolation or user confirmation, and handling of sensitive data (PDF content) is not transparent. Dependencies (e.g., pytesseract, pdf2image) are not version-pinned, posing supply-chain risk. Deductions made due to incomplete permissions, confirmation, isolation, and recovery mechanisms.
The skill provides detailed steps and scripts (e.g., check_bounding_boxes.py), but static review cannot verify execution. Scripts lack error handling (e.g., file not found, missing dependencies) and do not provide failure feedback. Test file exists (check_bounding_boxes_test.py) but is not integrated into CI and does not cover all key paths. Hence scored 6 (below static cap of 10) as happy path plausible but edge cases and error handling are thin.
Skill clearly targets PDF processing, covering common scenarios like extraction, merge, split, form filling, but does not declare non-fit boundaries (e.g., complex scanned docs or encrypted PDFs). Trigger conditions are clear (invoke when PDF processing needed), but no real usage evidence. Environment fit: Chinese support not mentioned, and external tools (e.g., poppler-utils) may be hard to reach from mainland China. Thus scored 9 (below 15) as scope clear but boundary and environment fit evidence limited.
Documentation is well-layered: main SKILL.md as overview, forms.md and reference.md for progressive disclosure. Dependency installation is mentioned (e.g., pip install pytesseract) but no version requirements or complete manifest. Parameters and naming are consistent, but no versioning or changelog. License is proprietary (in SKILL.md) conflicting with repo Apache-2.0, and attribution unclear. Hence scored 8 (below 15) as readable but hidden assumptions (e.g., dependencies installed) and governance incomplete.
Skill covers core PDF processing tasks, but static review cannot verify output quality. Form filling steps rely on visual analysis, possibly needing manual rework. Marginal value exists (automates common operations) but no comparative evidence. Scored 5 (below 7 cap) as completes core tasks but direct usability and comparative benefit evidence limited.
Test file exists (check_bounding_boxes_test.py) and CI workflow present, but CI does not include skill tests and tests are not run automatically. README demos and claims lack third-party verification. Thus scored 4 (below 5 cap) as primary material auditable but coverage thin and not independently reproducible.
- The skill depends on system tools (e.g., poppler-utils, qpdf) that may not be directly accessible from mainland-China networks; consider pre-installing or using mirrors.
- Scripts execute external commands without permission isolation; review script contents before running in an agent environment to avoid unintended dangerous commands.
- Dependencies are not version-pinned, posing supply-chain risk; consider locking versions and checking for known vulnerabilities before use.
- No Chinese language support is mentioned; documentation may require translation for Chinese users.
- Form filling relies on visual analysis, which may produce inaccurate results; verify outputs carefully.
What does this skill do, and when should you use it?
PDF Toolkit is a comprehensive multi-language guide for PDF processing, covering Python libraries and command-line tools. It enables extraction of text and tables, creation of new PDFs, merging and splitting documents, form handling, OCR, watermarking, image extraction, and password protection. Suitable for agents needing to programmatically process, generate, or analyze PDF files. The skill includes step-by-step code examples, a quick-reference table, and separate documents for form filling and advanced topics.
This skill provides Python code examples and command-line instructions for various PDF operations: using pypdf for merging, splitting, metadata extraction, page rotation, and password encryption; using pdfplumber to extract text with layout and tables, with optional export to Excel; using reportlab to create single-page or multi-page PDFs; CLI tools like pdftotext, qpdf, and pdftk for text extraction, merging, splitting, and rotating; plus methods for OCR of scanned PDFs (tesseract), adding watermarks (pypdf), and extracting images (pdfimages).
- Data analysts need to batch extract tables from many PDF reports and convert them to Excel for analysis
- Document processors need to merge multiple PDFs into one, or split a long document by pages
- Developers need to programmatically generate PDF reports with charts and paragraphs
- Researchers need OCR to extract text from scanned PDF documents
- Office workers need to add watermarks, rotate pages, or set password protection on PDFs
- Support teams need to fill in PDF forms based on templates
What are this skill's strengths and limitations?
- Comprehensive coverage: from basic extraction to advanced forms, including text, tables, generation, merging, splitting, OCR
- Step-by-step code examples and quick-reference table for immediate use
- Relies on mature libraries (pypdf, pdfplumber, reportlab) and common CLI tools (poppler-utils, qpdf) for stability
- Includes a dedicated forms guide (forms.md) for form-filling tasks
- No test suite provided; actual environment differences may make some commands unavailable (e.g., pdftk not pre-installed)
- OCR depends on tesseract and pdf2image, requiring additional system-level dependencies; may be limited in headless environments
- Table extraction accuracy depends on pdfplumber; complex or irregular tables may require manual verification
- No automated installation or environment setup script; users must prepare dependencies manually
- The skill has a proprietary license (see LICENSE.txt); check compliance before use
How do you install this skill?
The skill provides instructions but no automated install script. Install Python dependencies with pip install pypdf pdfplumber reportlab pandas pytesseract pdf2image; CLI tools are usually installed via system package managers (e.g., apt install poppler-utils qpdf pdftk). Clone the repository: git clone https://github.com/modelscope/ms-agent.git. The skill is located in examples/skills/claude_skills/pdf/.
How do you use this skill?
Place the skill directory (including SKILL.md and forms.md, reference.md) into Claude's skills folder, or load it in a custom agent. Then describe the PDF task in natural language, e.g., "Extract tables from this PDF and export to xlsx using pdfplumber", and the skill will guide generation of local Python code or provide appropriate command-line commands.