본문으로 건너뛰기
cccskills
무료GitHub에 공개

doc-parser

Parse complex documents with IBM's open-source Docling library, which turns PDFs and Office files into structured Markdown or JSON. 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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md8.9 KB
  • _scores.json2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Document Parser

Overview

Parse complex documents containing tables, figures, multi-column layouts, headers, and mixed content using the Docling library (originally from IBM Research, now an open-source LF AI & Data project). This skill goes beyond simple text extraction by understanding document structure, detecting layout regions, and preserving the logical reading order across complex formatting.

Instructions

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:

Step 1: Install docling

python -m venv .venv && .venv/bin/pip install docling

Docling needs Python 3.10+ and depends on PyTorch. On a Linux machine without a GPU, pip install docling --extra-index-url https://download.pytorch.org/whl/cpu avoids the large CUDA wheels. The first conversion downloads the layout and table models from Hugging Face, so allow time and network access once.

For a quick one-off, the CLI writes Markdown to the output folder (add --to json or --to html for other formats):

.venv/bin/docling Q3-report.pdf --output converted/

Step 2: Load and convert the document

Use DocumentConverter to parse the document. Reuse one converter for many files; creating it is the expensive part.

from docling.document_converter import DocumentConverter

converter = DocumentConverter()
result = converter.convert("paper.pdf")        # a local path or an http(s) URL
doc = result.document                          # a DoclingDocument

Supported inputs include PDF, DOCX, XLSX, PPTX, HTML, Markdown, CSV, EPUB, images (PNG, JPEG, TIFF, BMP, WEBP), and more; the current list is in the "Supported formats" page of the docling documentation. Legacy .doc/.xls/.ppt and RTF need LibreOffice installed. To limit work on a long PDF, pass page_range=(1, 20) to convert().

Step 3: Export to the desired format

Markdown (headings, tables, lists):

markdown = doc.export_to_markdown()

Lossless JSON (the full document tree, reloadable later):

import json
with open("paper.json", "w") as fp:
    json.dump(doc.export_to_dict(), fp, indent=2)

doc.save_as_markdown("paper.md"), doc.save_as_json("paper.json") and doc.save_as_html("paper.html") write files directly.

Step 4: Handle specific content types

Tables: pass the document to export_to_dataframe (the argument is required in current versions) and write CSV:

from pathlib import Path

def save_tables(doc, output_dir="tables"):
    Path(output_dir).mkdir(exist_ok=True)
    for i, table in enumerate(doc.tables, start=1):
        df = table.export_to_dataframe(doc=doc)
        df.to_csv(f"{output_dir}/table_{i}.csv", index=False)
    return len(doc.tables)

Figures: pictures are in doc.pictures. To save the image files, ask the PDF pipeline to keep them:

from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import PdfPipelineOptions
from docling.document_converter import DocumentConverter, PdfFormatOption

options = PdfPipelineOptions()
options.images_scale = 2.0               # about 144 DPI
options.generate_picture_images = True
converter = DocumentConverter(format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=options)})
doc = converter.convert("paper.pdf").document

for n, picture in enumerate(doc.pictures, start=1):
    page = picture.prov[0].page_no if picture.prov else None
    print(n, page, picture.caption_text(doc) or "no caption")
    picture.get_image(doc).save(f"figure_{n}.png")

Reading order and sections: for item, level in doc.iterate_items(): walks headings, paragraphs, tables and pictures in reading order.

Scanned pages and images: OCR runs automatically on bitmap content. Pick the language and engine with --ocr-lang / --ocr-engine on the CLI, or PdfPipelineOptions.ocr_options. Use --no-ocr to skip it for born-digital PDFs.

Step 5: Present the results

Format output based on user needs:

  • Full document: Markdown export with all content preserved
  • Tables only: CSV files or formatted markdown tables
  • Summary: Document structure outline with section headings and content types found
  • Specific sections: Extract targeted parts by heading or page range

Examples

Example 1: Parse an academic paper

User request: "Parse this research paper and extract all the tables: paper.pdf"

Actions taken:

  1. Convert paper.pdf using docling
  2. Identify 4 tables across 12 pages
  3. Export each table as CSV

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.

Example 2: Convert a financial report to Markdown

User request: "Convert this quarterly report to Markdown so I can edit it: Q3-report.pdf"

Actions taken:

  1. Parse Q3-report.pdf with docling (handles multi-column layout)
  2. Export as clean Markdown preserving structure

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.

Example 3: Pull the line items out of an invoice

User request: "Parse this invoice and give me the line items as JSON"

Actions taken:

  1. Convert invoice.pdf and take the first table (doc.tables[0]), which holds the line items
  2. Export it with export_to_dataframe(doc=doc) and write df.to_json(orient="records", indent=2)
  3. Read invoice number, date and totals from the Markdown text, since docling returns layout, not named fields

Output:

[
  {"Item": "Office Chairs", "Qty": 10, "Unit Price": "299.99", "Total": "2,999.90"},
  {"Item": "Standing Desks", "Qty": 5, "Unit Price": "549.00", "Total": "2,745.00"},
  {"Item": "Monitor Arms", "Qty": 15, "Unit Price": "89.50", "Total": "1,342.50"}
]

Column names come from the printed header row and cell values are text, so convert amounts to numbers yourself and check the sum against the invoice total.

Guidelines

  • Docling handles complex layouts automatically including multi-column text, nested tables, and mixed content. Let it do the heavy lifting.
  • For very large documents (200+ pages), convert in page ranges (page_range=(1, 50)) to manage memory, and use a GPU (--device cuda) if one is available.
  • --pipeline vlm runs a vision-language model (GraniteDocling) instead of the default layout and table models; slower, but sometimes better on messy scans. Check results either way.
  • When tables have merged cells or irregular structures, validate the DataFrame output and flag any parsing anomalies.
  • Prefer Markdown export for human-readable output and JSON/dict export for programmatic use.
  • If docling fails to install or parse a specific format, fall back to pdfplumber for PDFs or python-docx for DOCX files. Pass untrusted files only inside a sandbox or container, as with any parser.
  • Always report the document structure (sections, tables, figures found) before detailed output so the user knows what is available.
  • For scanned documents without a text layer, docling may use its built-in OCR. If quality is poor, suggest the pdf-ocr skill for better preprocessing.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Scripts and configures production rendering in Autodesk 3ds Max with the V-Ray and Corona renderers: output size and files, render elements, denoising, light mix, batch and command-line rendering, and network rendering. Use when a user asks to set up a production render, render several cameras in one batch, render from the command line or on a render farm, add render passes for compositing, or cut render time for archviz and product shots.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

TerminalSkills/skills1722026년 10월 14일 업데이트

Covers scripting Autodesk 3ds Max, the 3D modeling and rendering application, with MAXScript and Python (pymxs): scene manipulation, object creation, material assignment, camera and light setup, batch operations, and file I/O. Use when tasks involve automating repetitive 3ds Max workflows, batch processing scenes, running scripts headless with 3dsmaxbatch, creating custom tools, or scripting scene setup for archviz, product visualization, or VFX.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

TerminalSkills/skills1722026년 10월 14일 업데이트

3proxy

무료

3proxy is a small open-source proxy server that runs HTTP/HTTPS, SOCKS4/5, SNI and TCP/UDP port-mapping proxies from one config file. Use when a user asks to set up an HTTP or SOCKS5 proxy, add proxy users and passwords, write 3proxy access rules, chain or rotate upstream (parent) proxies, limit bandwidth, connections or monthly traffic per user, run 3proxy in Docker, or fix a 3proxy.cfg that will not start.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

TerminalSkills/skills1722026년 10월 14일 업데이트

Builds Agent2Agent (A2A) servers and clients, the open protocol (originally from Google, now under the Linux Foundation) that lets AI agents from different frameworks call each other. Use when the user wants to create an A2A-compliant agent, build an Agent Card, implement task management, connect agents across frameworks, set up agent discovery, handle streaming responses, implement push notifications, or orchestrate multi-agent workflows. Trigger words: a2a, agent to agent, agent2agent, a2a protocol, a2a server, a2a client, agent card, agent interoperability, agent collaboration, multi-agent, agent discovery, a2a sdk, a2a task.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

TerminalSkills/skills1722026년 10월 14일 업데이트

Plans a controlled experiment (A/B test) so its result can be trusted: writes the hypothesis, picks one primary metric and the guardrails, computes sample size and run time, specifies how visitors are assigned and when exposure is logged, and reads out the result with a confidence interval. Use when someone says "set up an A/B test", "split test this page", "how many visitors do I need", "how long should the experiment run", "is this result significant", "can I stop the test early", or wants to test a headline, price, layout or onboarding change against the current version.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

TerminalSkills/skills1722026년 10월 14일 업데이트

ably

무료

Ably is a hosted realtime messaging service: clients publish and subscribe to named channels over WebSockets, see who is present, replay message history, and resume after a dropped connection. Use when a user asks to "add realtime updates", "push live notifications to the browser", "show who is online", "add a chat room with typing indicators", "publish from a serverless function", or "authenticate Ably clients without exposing the API key". Covers the ably 2.x JavaScript SDK (Realtime and REST), JWT token authentication, presence, history and rewind, batch publishing, and the @ably/chat 1.x SDK.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

TerminalSkills/skills1722026년 10월 14일 업데이트

TerminalSkills의 스킬 모두 보기

이 스킬의 문제 신고