
Pdf Extractor
- 6 installs
- 146 repo stars
- Updated January 23, 2026
- maxvaega/skillkit
Helps with ai & agent building tasks.
About
pdf-extractor is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- pdf-extractor
- AI & Agent Building
- AI-coding skill
Pdf Extractor by the numbers
- 6 all-time installs (skills.sh)
- Ranked #12,825 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/maxvaega/skillkit --skill pdf-extractorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 6 |
|---|---|
| repo stars | ★ 146 |
| Last updated | January 23, 2026 |
| Repository | maxvaega/skillkit ↗ |
What it does
Helps with ai & agent building tasks.
Files
PDF Extractor Skill
This skill provides tools for extracting text and metadata from PDF documents and converting them to different formats.
Available Scripts
extract.py
Extracts text and metadata from PDF files.
Input:
{
"file_path": "/path/to/document.pdf",
"pages": "all" | [1, 2, 3]
}Output:
{
"text": "Extracted text content...",
"metadata": {
"title": "Document Title",
"author": "Author Name",
"pages": 10
}
}convert.sh
Converts PDF files to different formats (text, markdown, etc.).
Input:
{
"input_file": "/path/to/input.pdf",
"output_format": "txt" | "md" | "html"
}parse.py
Parses structured data from PDF forms and tables.
Input:
{
"file_path": "/path/to/form.pdf",
"extract_tables": true,
"extract_forms": true
}Usage Example
from skillkit import SkillManager
manager = SkillManager()
result = manager.execute_skill_script(
skill_name="pdf-extractor",
script_name="extract",
arguments={"file_path": "document.pdf", "pages": "all"}
)
if result.success:
print(result.stdout)#!/bin/bash
# Convert PDF files to different formats
#
# This script demonstrates shell script support in skillkit.
# It reads JSON from stdin and performs format conversion.
#
# Environment variables available:
# - SKILL_NAME
# - SKILL_BASE_DIR
# - SKILL_VERSION
# - SKILLKIT_VERSION
# Read JSON input from stdin
read -r json_input
# Parse JSON using Python (for simplicity)
input_file=$(echo "$json_input" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data.get('input_file', ''))")
output_format=$(echo "$json_input" | python3 -c "import sys, json; data=json.load(sys.stdin); print(data.get('output_format', 'txt'))")
# Validate input
if [ -z "$input_file" ]; then
echo '{"error": "Missing required argument: input_file"}' >&2
exit 1
fi
# Mock conversion (in real implementation, would use tools like pdftotext, pandoc, etc.)
output_file="${input_file%.pdf}.${output_format}"
# Output result
cat <<EOF
{
"status": "success",
"input_file": "$input_file",
"output_file": "$output_file",
"output_format": "$output_format",
"message": "Converted $input_file to $output_format format",
"environment": {
"skill_name": "$SKILL_NAME",
"skill_base_dir": "$SKILL_BASE_DIR",
"skill_version": "$SKILL_VERSION",
"skillkit_version": "$SKILLKIT_VERSION"
}
}
EOF
exit 0
#!/usr/bin/env python3
"""Extract text and metadata from PDF files.
This script demonstrates reading JSON arguments from stdin,
processing them, and outputting results in JSON format.
Environment Variables:
- SKILL_NAME: Name of the parent skill
- SKILL_BASE_DIR: Base directory of the skill
- SKILL_VERSION: Version of the skill
- SKILLKIT_VERSION: Version of skillkit
"""
import sys
import json
import os
def extract_pdf(file_path: str, pages: str | list):
"""
Extract text from PDF file (mock implementation).
In a real implementation, this would use a library like PyPDF2 or pdfplumber.
Args:
file_path: Path to the PDF file
pages: "all" or list of page numbers
Returns:
dict with extracted text and metadata
"""
# Mock implementation for demonstration
return {
"text": f"Extracted text from {file_path}",
"metadata": {
"title": "Sample Document",
"author": "skillkit",
"pages": 10,
"file_path": file_path,
"requested_pages": pages
},
"environment": {
"skill_name": os.getenv("SKILL_NAME"),
"skill_base_dir": os.getenv("SKILL_BASE_DIR"),
"skill_version": os.getenv("SKILL_VERSION"),
"skillkit_version": os.getenv("SKILLKIT_VERSION")
}
}
def main():
"""Main entry point for the PDF extraction script."""
try:
# Read JSON arguments from stdin
args = json.load(sys.stdin)
# Validate required arguments
if "file_path" not in args:
raise ValueError("Missing required argument: file_path")
# Extract optional arguments
file_path = args["file_path"]
pages = args.get("pages", "all")
# Perform extraction
result = extract_pdf(file_path, pages)
# Output result as JSON
print(json.dumps(result, indent=2))
sys.exit(0)
except json.JSONDecodeError as e:
error = {
"error": "Invalid JSON input",
"details": str(e)
}
print(json.dumps(error), file=sys.stderr)
sys.exit(1)
except ValueError as e:
error = {
"error": "Invalid arguments",
"details": str(e)
}
print(json.dumps(error), file=sys.stderr)
sys.exit(1)
except Exception as e:
error = {
"error": "Unexpected error",
"details": str(e)
}
print(json.dumps(error), file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":
main()
#!/usr/bin/env python3
"""Parse structured data from PDF forms and tables.
This script demonstrates advanced PDF processing capabilities.
"""
import sys
import json
import os
def parse_pdf(file_path: str, extract_tables: bool, extract_forms: bool):
"""
Parse structured data from PDF (mock implementation).
In a real implementation, this would use libraries like:
- tabula-py or camelot for table extraction
- PyPDF2 or pdfplumber for form field extraction
Args:
file_path: Path to the PDF file
extract_tables: Whether to extract tables
extract_forms: Whether to extract form fields
Returns:
dict with parsed data
"""
result = {
"file_path": file_path,
"extracted_data": {}
}
if extract_tables:
result["extracted_data"]["tables"] = [
{
"page": 1,
"rows": 5,
"columns": 3,
"data": [
["Header1", "Header2", "Header3"],
["Row1Col1", "Row1Col2", "Row1Col3"],
["Row2Col1", "Row2Col2", "Row2Col3"]
]
}
]
if extract_forms:
result["extracted_data"]["forms"] = {
"name": "John Doe",
"email": "john@example.com",
"checkbox_agree": True
}
return result
def main():
"""Main entry point for PDF parsing script."""
try:
# Read JSON arguments from stdin
args = json.load(sys.stdin)
# Validate and extract arguments
file_path = args.get("file_path")
if not file_path:
raise ValueError("Missing required argument: file_path")
extract_tables = args.get("extract_tables", False)
extract_forms = args.get("extract_forms", False)
# Perform parsing
result = parse_pdf(file_path, extract_tables, extract_forms)
# Output result as JSON
print(json.dumps(result, indent=2))
sys.exit(0)
except json.JSONDecodeError as e:
error = {"error": "Invalid JSON input", "details": str(e)}
print(json.dumps(error), file=sys.stderr)
sys.exit(1)
except ValueError as e:
error = {"error": "Invalid arguments", "details": str(e)}
print(json.dumps(error), file=sys.stderr)
sys.exit(1)
except Exception as e:
error = {"error": "Unexpected error", "details": str(e)}
print(json.dumps(error), file=sys.stderr)
sys.exit(1)
if __name__ == "__main__":
main()
Related skills
AI & Agent Buildingagents