AGENT SKILL

markitdown-converter

Convert documents (PDF, Word, Excel, PowerPoint, HTML, etc.) to markdown using Microsoft's markitdown library, then read the markdown output instead of binary files

License 许可
MIT
最近更新
2026-10-29
Stars
★ 0
Forks
0

01 前言 Front Matter

name
markitdown-converter
license
MIT
version
1.0.0
auto-invoke
[ "\\.pdf$", "\\.docx?$", "\\.xlsx?$", "\\.pptx?$", "\\.html?$" ]
description
Convert documents (PDF, Word, Excel, PowerPoint, HTML, etc.) to markdown using Microsoft's markitdown library, then read the markdown output instead of binary files
allowed-tools
[ "Read", "Write", "Edit", "Bash" ]
compatibility
claude-code codex morphmind opencode

02 资源文件 1

03 SKILL.md 正文

Markitdown Converter Skill

Automatically convert documents to markdown before reading them. Supports PDFs, Word docs, Excel spreadsheets, PowerPoint presentations, HTML, and more.

Setup

Requires Python 3.10+ and the markitdown package.

pip install markitdown

Optional dependencies for specific formats:

  • Audio transcription: pip install "markitdown[audio]" (requires ffmpeg)
  • YouTube transcription: pip install "markitdown[youtube]"
  • Office formats (doc, ppt): LibreOffice (system package)

How It Works

When any tool needs to inspect a binary document format (PDF, DOCX, XLSX, PPTX, HTML):

  1. Instead of reading raw bytes, run markitdown via the conversion script
  2. The script outputs clean markdown to stdout or a cached .md file alongside the original
  3. Read the markdown output using the standard Read tool
  4. Do not commit generated markdown files unless explicitly asked

Conversion Script

Use scripts/convert.py to convert files:

# Convert to stdout
python3 scripts/convert.py path/to/document.pdf

# Convert to file (defaults to <name>.converted.md alongside source)
python3 scripts/convert.py path/to/document.docx -o output.md

# Convert with LLM-enhanced image descriptions (requires OPENAI_API_KEY)
python3 scripts/convert.py path/to/slides.pptx --use-llm

Supported Formats

Extension Format Engine
.pdf PDF documents pdfminer.six
.docx, .doc Word documents python-docx / LibreOffice
.xlsx, .xls Excel spreadsheets openpyxl / xlrd
.pptx, .ppt PowerPoint slides python-pptx / LibreOffice
.html, .htm Web pages BeautifulSoup4
.csv, .tsv Tabular data pandas
.json, .xml Structured data built-in parsers
.zip Archives extracts and converts contents
.mp3, .wav Audio (speech-to-text) speech_recognition

Best Practices

  • Large PDFs: If a PDF is > 50 pages, convert specific page ranges if supported, or grep the converted markdown rather than reading the whole file into context.
  • Spreadsheets: MarkItDown formats sheets as markdown tables. Very wide tables may wrap awkwardly; consider querying specific columns or rows if needed.
  • Images in documents: By default, embedded images produce placeholder text. Pass --use-llm if image contents (diagrams, charts) are essential to the task.

04 同仓库更多 Skills

dkritarth
dkritarth/skills-personal

writing

Track manuscript draft revisions across sessions. Maintains an append-only journal (.writing-journal.md) backed by git history to compare planned edits against actual changes, surface trajectory drift, and keep research drafts aligned.

★ 0
dkritarth
dkritarth/skills-personal

math

Enforces structured mathematical proof formatting (Claim, Assumptions, Proof, Where Used) and runs symbolic and numeric verification on extracted sub-claims using SymPy.

★ 0
dkritarth
dkritarth/skills-personal

latex

Focused LaTeX utility for compile-error log triage, bibliography validation, and venue template setup. Identifies precise error source files and lines from engine logs.

★ 0
dkritarth
dkritarth/skills-personal

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 0
dkritarth
dkritarth/skills-personal

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

★ 0
dkritarth
dkritarth/skills-personal

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

★ 0