---
name: Document Processor
slug: document-processor
category: Automation
description: Document Processor guides extraction, parsing, and format conversion for PDFs, Word files, spreadsheets, HTML, and text. Use it when you need to pull structured content from documents or transform it into JSON, CSV, Markdown, or HTML.
github: "https://github.com/vixues/LeAgent/tree/main/backend/leagent/skills/builtin/document-processor"
language: Python
stars: 218
forks: 40
install: "npx degit https://github.com/vixues/LeAgent/tree/main/backend/leagent/skills/builtin/document-processor ~/.claude/skills/document-processor"
installs_to: ~/.claude/skills/document-processor
source_path: backend/leagent/skills/builtin/document-processor/SKILL.md
collection_size: 7
category_size: 1860
collection_url: "https://dirskills.com/collections/vixues/LeAgent"
added: 2026-09-04T05:25:21.594Z
last_synced: 2026-09-04T05:25:21.594Z
canonical_url: "https://dirskills.com/skills/document-processor"
---

# Document Processor

Document Processor guides extraction, parsing, and format conversion for PDFs, Word files, spreadsheets, HTML, and text. Use it when you need to pull structured content from documents or transform it into JSON, CSV, Markdown, or HTML.

**Install:**

```bash
npx degit https://github.com/vixues/LeAgent/tree/main/backend/leagent/skills/builtin/document-processor ~/.claude/skills/document-processor
```

## README

# Document Processing

You are assisting with document processing tasks. Follow these guidelines.

## Document Analysis Workflow

1. **Identify** the document type: PDF, DOCX, XLSX, TXT, Markdown, HTML.
2. **Assess** document structure: headers, sections, tables, images, metadata.
3. **Extract** relevant content based on the user's request.
4. **Transform** extracted content to the requested format.
5. **Validate** accuracy, structure, and completeness.

## Common Operations

### Text Extraction

- Preserve document structure (headers, paragraphs, lists).
- Keep formatting where semantically meaningful (bold terms, emphasis).
- Extract metadata (author, creation date, document properties) when relevant.

### Table Extraction

- Identify table boundaries and column headers.
- Preserve row/column relationships when exporting to CSV or JSON.
- Handle merged cells, nested tables, and multi-page tables carefully.

### Information Extraction

- Extract specific fields (names, dates, amounts, addresses) with high precision.
- Use structured output (JSON, YAML) when returning multiple fields.
- Report confidence when extraction is ambiguous.

### Format Conversion

- PDF ↔ Text/Markdown
- DOCX ↔ Markdown/HTML
- XLSX ↔ CSV/JSON
- HTML ↔ Markdown

## Quality Guidelines

- Verify that extracted content matches the source.
- Preserve line breaks and paragraph structure unless asked to flatten.
- Flag OCR artifacts or illegible sections explicitly.
- For multi-page documents, maintain page references where useful.

## Error Handling

- Document any parts that could not be processed (e.g., encrypted pages, images).
- Provide clear error messages for unsupported formats.
- Suggest alternative approaches when the primary method fails.
