Skip to content
Back to skills

Document Converter Suite

ASecurity

Convert between 8 formats (PDF, DOCX, PPTX, XLSX, TXT, CSV, MD, HTML). Best-effort text extraction, batch processing, and document format transformation.

  • 99 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 7, 2026
data-aipythongobashrailsdocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add dkyazzentwatwa/chatgpt-skills --skill document-converter-suite --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Document Converter Suite?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Document Converter Suite
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dkyazzentwatwa-document-converter-suite/badge)](https://www.skillsdirectory.com/skills/dkyazzentwatwa-document-converter-suite)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: document-converter-suite
description: Convert between 8 formats (PDF, DOCX, PPTX, XLSX, TXT, CSV, MD, HTML). Best-effort text extraction, batch processing, and document format transformation.
---

# Document Converter Suite

## Overview

Provide a best-effort conversion workflow between **8 document formats**:

**Office Formats**: PDF, Word (DOCX), PowerPoint (PPTX), Excel (XLSX)
**Text Formats**: Plain Text (TXT), CSV, Markdown (MD), HTML

Uses `pypdf`, `python-docx`, `python-pptx`, `openpyxl`, `reportlab`, `mistune`, `beautifulsoup4`, and `Pillow`.

Prefer **reliable extraction + rebuild** (text, headings, bullets, basic tables) over pixel-perfect layout.

## When to use

Use when the request involves:

- Converting a file between **.pdf / .docx / .pptx / .xlsx / .txt / .csv / .md / .html**
- Making a document **more editable** by moving its content into Office or text formats
- Exporting slide text or spreadsheet cell grids to a different format
- Converting Markdown/HTML documentation to Office formats or vice versa
- Extracting tables from Office documents to CSV/XLSX
- Batch-converting a folder of mixed documents

**Supported conversion paths**: 64 total (8×8 matrix) - see `references/conversion_matrix.md`

Avoid promising visual fidelity. Emphasize that output is **clean and structured**, not identical.

## Workflow decision tree

1. **Identify input and desired output** (extensions matter).
2. **Classify the user's goal**:
   - **Editable content** → proceed with this suite.
   - **Visually identical rendering** → explain limitations; suggest external rendering tools.
3. **Pick conversion mode**:
   - Single file → run `scripts/convert.py`.
   - Folder/batch → run `scripts/batch_convert.py`.
4. **Tune safety caps** if needed:
   - PDF: `--max-pages`, `--max-chars`
   - XLSX: `--max-rows`, `--max-cols`
5. **Run conversion**, then sanity-check output size and structure.
6. **Iterate** (e.g., increase max rows/cols, split large docs, or choose a different target format).

## Quick start

### Single-file conversion

Run:

```bash
python scripts/convert.py <input-file> --to <pdf|docx|pptx|xlsx|txt|csv|md|html>
```

Examples:

```bash
# Office format conversions
python scripts/convert.py report.pdf --to docx
python scripts/convert.py deck.pptx --to pdf --out deck_export.pdf
python scripts/convert.py data.xlsx --to pptx --max-rows 40 --max-cols 12

# Text format conversions
python scripts/convert.py documentation.md --to docx
python scripts/convert.py data.csv --to xlsx
python scripts/convert.py report.docx --to html
python scripts/convert.py notes.txt --to md
```

### Batch conversion

Run:

```bash
python scripts/batch_convert.py <input-dir> --to <pdf|docx|pptx|xlsx|txt|csv|md|html>
```

Examples:

```bash
python scripts/batch_convert.py ./inbox --to docx --recursive
python scripts/batch_convert.py ./inbox --to pdf --outdir ./out --recursive --overwrite
python scripts/batch_convert.py ./markdown-docs --to html --pattern "*.md"
python scripts/batch_convert.py ./data --to xlsx --pattern "*.csv"
```

## Conversion behavior

Follow these defaults (and say them out loud if the user might be expecting magic):

### Office Format Conversions

- **PDF → (DOCX/PPTX/XLSX/TXT/MD/HTML)**: extract text with `pypdf`; no OCR; each page becomes a section/slide block.
- **DOCX → (PDF/PPTX/XLSX/TXT/CSV/MD/HTML)**: export paragraphs, headings (with improved detection), and tables.
  - **Improved heading detection**: now uses font size + bold + ALL CAPS heuristics, not just style names.
- **PPTX → (DOCX/PDF/XLSX/TXT/CSV/MD/HTML)**: export slide titles + text frames; export tables.
  - **Multi-table support**: PPTX now creates one slide per table when multiple tables exist.
- **XLSX → (DOCX/PPTX/PDF/TXT/CSV/MD/HTML)**: export bounded value grid per sheet (defaults: 200×50).
  - **Truncation warnings**: printed to stderr when data exceeds limits (e.g., "Sheet 'Data': Truncated 500 rows → 200 rows").

### Text Format Conversions

- **TXT → (DOCX/PPTX/XLSX/PDF/CSV/MD/HTML)**: lines become paragraphs/bullets; simple structure preservation.
- **CSV → (XLSX/DOCX/PPTX/HTML)**: headers + rows mapped to tables/sheets; auto-delimiter detection.
- **MD → (DOCX/PPTX/XLSX/PDF/TXT/CSV/HTML)**: parsed with `mistune`; headings, lists, tables, code blocks preserved.
  - **High fidelity**: Markdown ↔ HTML and Markdown ↔ DOCX maintain structure well.
- **HTML → (DOCX/PPTX/XLSX/PDF/TXT/CSV/MD)**: parsed with `beautifulsoup4`; semantic structure extracted.
  - **High fidelity**: HTML ↔ Markdown and HTML ↔ DOCX maintain structure well.

### Quality Improvements

- **Multi-table PPTX**: Creates one slide per table (instead of dropping extra tables)
- **Smart heading detection**: DOCX headings detected by style, font size+bold, or ALL CAPS+bold
- **Data truncation warnings**: XLSX conversions warn when data is truncated
- **Image extraction foundation**: `image_handler.py` provides hash-based deduplication for future image support

Load extra detail from:

- `references/conversion_matrix.md` - Full 8×8 conversion matrix
- `references/limitations.md` - Format-specific limitations and edge cases

## Guardrails and honesty rules

- State "best-effort" explicitly for any conversion request.
- Do not claim formatting fidelity (fonts, spacing, images, charts, animations).
- Call out scanned PDFs as a likely failure mode (no OCR).
- For giant spreadsheets, prefer increasing caps gradually and/or limiting to specific sheets (if user provides intent).

## Bundled scripts

- `scripts/convert.py`: single-file CLI converter
- `scripts/batch_convert.py`: batch converter for directories
- `scripts/lib/*`: internal readers/writers and conversion orchestration

Files in this skill

  • SKILL.md5.6 KB
  • references/conversion_matrix.md6 KB
  • references/limitations.md6 KB
  • scripts/batch_convert.py4.7 KB
  • scripts/convert.py3.9 KB
  • scripts/lib/__init__.py60 B
  • scripts/lib/__pycache__/__init__.cpython-314.pyc261 B
  • scripts/lib/__pycache__/conversion.cpython-314.pyc67.3 KB
  • scripts/lib/__pycache__/csv_reader.cpython-314.pyc2.9 KB
  • scripts/lib/__pycache__/csv_writer.cpython-314.pyc1.4 KB
  • scripts/lib/__pycache__/docx_reader.cpython-314.pyc5.2 KB
  • scripts/lib/__pycache__/html_reader.cpython-314.pyc5.9 KB
  • scripts/lib/__pycache__/html_writer.cpython-314.pyc7.1 KB
  • scripts/lib/__pycache__/image_handler.cpython-314.pyc4 KB
  • scripts/lib/__pycache__/md_reader.cpython-314.pyc7.9 KB
  • scripts/lib/__pycache__/md_writer.cpython-314.pyc4 KB
  • scripts/lib/__pycache__/pptx_writer.cpython-314.pyc5.1 KB
  • scripts/lib/__pycache__/txt_reader.cpython-314.pyc1.8 KB
  • scripts/lib/__pycache__/txt_writer.cpython-314.pyc1.1 KB
  • scripts/lib/__pycache__/xlsx_reader.cpython-314.pyc2.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.