Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

docling-converter文档转换器

Agent Skill

docling-converter 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

685

周安装

28

GitHub Stars

31

下载量

220
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:docling-converter(文档转换器)
来源仓库:https://github.com/ericgandrade/claude-superskills
仓库路径:skills/docling-converter
安装命令:
npx skills add https://github.com/ericgandrade/claude-superskills --skill docling-converter
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ericgandrade/claude-superskills --skill docling-converter

简介

多格式文档智能转换为结构化文本的工具。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 支持 PDF、DOCX、PPTX、HTML 等格式输入。
  • 输出带层级信息的 Markdown 和 JSON 数据。
  • 适用于检索增强生成(RAG)知识库构建。
  • docling-converter 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

📄 Docling Document Converter

Version: 1.0.1 Status: ✨ Production Ready | 🌍 Universal

Convert documents (PDF, DOCX, PPTX, Images, HTML) into structured Markdown and JSON using Docling's intelligent parsing engine.


📋 Overview

Docling Converter is a powerful document processing skill that transforms unstructured files into clean, structured Markdown and JSON. Unlike basic text extractors, it preserves document layout, tables, and hierarchy, making it ideal for RAG (Retrieval-Augmented Generation) pipelines and knowledge base ingestion.

✨ Key Features

  • 📄 Multi-Format Support: PDF, DOCX, PPTX, XLSX, HTML, Images, AsciiDoc.
  • 🧠 Intelligent Parsing: Preserves tables, headers, and document structure.
  • 👁️ OCR Integration: Handles scanned PDFs and images (requires docling[ocr]).
  • 📝 Clean Markdown: Generates LLM-ready Markdown output.
  • ⚡ Batch Processing: Handles single files or entire directories.

🚀 Quick Start

Invoke the Skill

Use any of these trigger phrases:

copilot> convert this pdf to markdown: report.pdf
copilot> extract tables from: data.xlsx
copilot> docling convert: presentation.pptx
copilot> process document: scanned-contract.pdf --ocr
copilot> convert this pptx to markdown: deck.pptx
copilot> pptx to markdown: strategy-2026.pptx
claude> convert this presentation to markdown: roadmap.pptx
claude> pptx to markdown: proposal.pptx

🛠️ Workflow

Step 0: Discovery & Setup

Objective: Verify Docling installation and dependencies.

Actions:

# Check if docling is installed
if python3 -c "import docling" 2>/dev/null; then
    echo "✅ Docling detected"
else
    echo "⚠️  Docling not found"
    echo "🔧 Installing docling..."
    pip install docling --break-system-packages
fi

# Check for OCR support if requested
if [[ "$OCR_REQUESTED" == "true" ]]; then
    if python3 -c "import easyocr" 2>/dev/null; then
        echo "✅ OCR dependencies detected"
    else
        echo "⚠️  OCR dependencies missing"
        echo "🔧 Installing docling[ocr]..."
        pip install "docling[ocr]" --break-system-packages
    fi
fi

Step 1: Create Conversion Script

Objective: Generate a robust Python script to handle the conversion.

Actions:

Create a temporary script .gemini/tmp/docling_convert.py:

import sys
import json
import os
from pathlib import Path
from docling.document_converter import DocumentConverter, PdfFormatOption, WordFormatOption
from docling.datamodel.pipeline_options import PdfPipelineOptions, TableFormerMode

def convert_document(input_path, output_dir, use_ocr=False):
    input_path = Path(input_path)
    output_dir = Path(output_dir)
    output_dir.mkdir(parents=True, exist_ok=True)

    # Configure Pipeline
    pipeline_options = PdfPipelineOptions()
    pipeline_options.do_ocr = use_ocr
    pipeline_options.do_table_structure = True
    pipeline_options.table_structure_options.mode = TableFormerMode.ACCURATE

    converter = DocumentConverter(
        format_options={
            "pdf": PdfFormatOption(pipeline_options=pipeline_options),
            "docx": WordFormatOption(),
            "pptx": WordFormatOption()
        }
    )

    print(f"🔄 Converting: {input_path.name}...")

    try:
        result = converter.convert(input_path)

        # Export Markdown
        md_output = result.document.export_to_markdown()
        md_path = output_dir / f"{input_path.stem}.md"
        with open(md_path, "w", encoding="utf-8") as f:
            f.write(md_output)

        # Export JSON (structure)
        json_output = result.document.export_to_dict()
        json_path = output_dir / f"{input_path.stem}.json"
        with open(json_path, "w", encoding="utf-8") as f:
            json.dump(json_output, f, ensure_ascii=False, indent=2)

        print(f"✅ Success! Saved to: {md_path}")
        return True

    except Exception as e:
        print(f"❌ Error converting {input_path.name}: {str(e)}")
        return False

if __name__ == "__main__":
    if len(sys.argv) < 3:
        print("Usage: python docling_convert.py <input_file> <output_dir> [ocr]")
        sys.exit(1)

    input_file = sys.argv[1]
    output_directory = sys.argv[2]
    ocr_enabled = len(sys.argv) > 3 and sys.argv[3] == "--ocr"

    success = convert_document(input_file, output_directory, ocr_enabled)
    sys.exit(0 if success else 1)

Batch Mode — Parallel Document Processing

When the user provides a directory or multiple files, launch one DoclingConverter agent per file simultaneously in a single block.

Each DoclingConverter agent prompt begins with:

# DoclingConverter — Document Processing Agent
Role: Convert a single document to Markdown and JSON using Docling. Run the conversion script, validate that output files were created, return status and output paths.
Input: File path: {PATH} | Output format: {FORMAT}

Wait for all DoclingConverter agents to complete. Merge all Markdown outputs. Report summary: files processed, conversion time, any failures.

Step 2: Execute Conversion

Objective: Run the conversion script on the user's file.

Actions:

# Define paths
INPUT_FILE="$USER_INPUT_FILE"
OUTPUT_DIR="./converted_docs"

# Execute script
python3 .gemini/tmp/docling_convert.py "$INPUT_FILE" "$OUTPUT_DIR" $OCR_FLAG

Step 3: Result & Validation

Objective: meaningful output to the user.

Actions:

if [ $? -eq 0 ]; then
    echo ""
    echo "🎉 Conversion Complete!"
    echo "📂 Output Directory: $OUTPUT_DIR"
    ls -lh "$OUTPUT_DIR"
else
    echo "❌ Conversion Failed. Please check the error logs above."
fi

Error Handling

ErrorLikely CauseAction
Docling not installeddocling Python package missingOffer to install with pip install docling; show manual instructions
Unsupported file formatFile type not in supported listInform user of supported formats (PDF, DOCX, PPTX, XLSX, HTML, images); suggest CloudConvert for other formats
File not found or access deniedPath incorrect or insufficient permissionsShow exact error; ask user to verify path and file permissions
OCR required but unavailableScanned PDF with no text layer; docling[ocr] not installedOffer to install OCR extras with pip install "docling[ocr]"; explain what OCR does
Conversion output emptyFile has no extractable text (image-only PDF without OCR)Suggest enabling OCR option; explain cause
Memory error on large fileFile too large for available RAMSuggest processing in smaller chunks; warn about file size
Corrupted fileInput file is damaged or incompleteInform user the file may be corrupted; ask for a valid copy

📄 Version

v1.0.1 | Agentic Workflow | Auto-Install

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.42%
按下载量换算74

Claude

31.28%
按下载量换算69

Cursor

21.05%
按下载量换算46

Gemini CLI

10.63%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills