.claude/skills/ts-doc-parser/SKILL.md
Parse complex documents with IBM docling. Use when a user asks to parse a document with tables, extract figures from a document, handle multi-column layouts, convert a complex PDF to structured data, extract content from academic papers, or process documents with mixed layouts. Handles tables, figures, headers, footers, and multi-column text.
npx skillsauth add eliferjunior/Claude doc-parserInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Parse complex documents containing tables, figures, multi-column layouts, headers, and mixed content using IBM's docling library. This skill goes beyond simple text extraction by understanding document structure, detecting layout regions, and preserving the logical reading order across complex formatting.
When a user asks to parse a complex document or extract structured content from a document with tables, figures, or multi-column layouts, follow these steps:
pip install docling
Use docling's DocumentConverter to parse the document:
from docling.document_converter import DocumentConverter
def parse_document(file_path):
converter = DocumentConverter()
result = converter.convert(file_path)
return result
Supported input formats: PDF, DOCX, PPTX, HTML, images (PNG, JPG).
Export as Markdown (preserves headings, tables, lists):
def to_markdown(result):
return result.document.export_to_markdown()
Export as structured JSON (full document tree):
import json
def to_json(result):
doc_dict = result.document.export_to_dict()
return json.dumps(doc_dict, indent=2)
Extract only tables:
def extract_tables(result):
tables = []
for table in result.document.tables:
df = table.export_to_dataframe()
tables.append(df)
return tables
For tables: Export each table as a pandas DataFrame or CSV:
import pandas as pd
def save_tables(result, output_dir="."):
for i, table in enumerate(result.document.tables):
df = table.export_to_dataframe()
output_path = f"{output_dir}/table_{i+1}.csv"
df.to_csv(output_path, index=False)
return f"Saved {len(result.document.tables)} tables"
For figures: Extract figure metadata and captions:
def extract_figures(result):
figures = []
for item in result.document.items:
if hasattr(item, 'image') and item.image:
figures.append({
"caption": getattr(item, 'caption', 'No caption'),
"page": getattr(item, 'page_no', None)
})
return figures
Format output based on user needs:
User request: "Parse this research paper and extract all the tables: paper.pdf"
Actions taken:
Output:
Parsed paper.pdf (12 pages)
Document structure:
- Title: "Machine Learning Approaches for Climate Prediction"
- Sections: Abstract, Introduction, Methods, Results, Discussion, References
- Tables found: 4
- Figures found: 6
Tables extracted:
1. table_1.csv - "Dataset Characteristics" (5 cols, 8 rows) - Page 4
2. table_2.csv - "Model Hyperparameters" (4 cols, 12 rows) - Page 6
3. table_3.csv - "Performance Comparison" (6 cols, 5 rows) - Page 8
4. table_4.csv - "Ablation Study Results" (5 cols, 7 rows) - Page 9
All tables saved to current directory.
User request: "Convert this quarterly report to Markdown so I can edit it: Q3-report.pdf"
Actions taken:
Output:
Converted Q3-report.pdf to Markdown
Document details:
- Pages: 24
- Layout: Multi-column (2-column on pages 3-20)
- Tables: 8 (all converted to Markdown tables)
- Figures: 5 (referenced with captions)
- Sections: 12 headings detected
Output saved to: Q3-report.md (14,200 words)
The multi-column layout has been linearized into single-column reading order.
All tables are preserved as Markdown tables.
User request: "Parse this invoice and give me the line items as JSON"
Actions taken:
Output:
{
"invoice_number": "INV-2024-0847",
"date": "2024-11-15",
"vendor": "Acme Supplies Inc.",
"line_items": [
{"item": "Office Chairs", "qty": 10, "unit_price": 299.99, "total": 2999.90},
{"item": "Standing Desks", "qty": 5, "unit_price": 549.00, "total": 2745.00},
{"item": "Monitor Arms", "qty": 15, "unit_price": 89.50, "total": 1342.50}
],
"subtotal": 7087.40,
"tax": 637.87,
"total": 7725.27
}
development
Expert guidance for Fireworks AI, the platform for running open-source LLMs (Llama, Mixtral, Qwen, etc.) with enterprise-grade speed and reliability. Helps developers integrate Fireworks' inference API, fine-tune models, and deploy custom model endpoints with function calling and structured output support.
development
Convert any website into clean, structured data with Firecrawl — API-first web scraping service. Use when someone asks to "turn a website into markdown", "scrape website for LLM", "Firecrawl", "extract website content as clean text", "crawl and convert to structured data", or "scrape website for RAG". Covers single-page scraping, full-site crawling, structured extraction, and LLM-ready output.
tools
Expert guidance for Firebase, Google's platform for building and scaling web and mobile applications. Helps developers set up authentication, Firestore/Realtime Database, Cloud Functions, hosting, storage, and analytics using Firebase's SDK and CLI.
development
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files." Handles upload endpoints, file validation (type, size, magic bytes), cloud storage integration, and upload status tracking. For image/video processing after upload, see media-transcoder.