Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

To Md

ASecurity

Use when the user needs to convert files (PDF, DOCX, PPTX, XLSX, HTML, images, audio, ZIP) to structured Markdown via MarkItDown. Suitable for text extraction, RAG ingestion, or format normalization. NOT for document editing — use docx or pptx skills instead.

10 stars
0 votes
0 copies
0 views
Added 9/28/2026
ai-agentspythongoshellbashapi

Works with

cliapi

Security Analysis

A96/100
mediumInstalls packages at runtime which could introduce malicious dependencies

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add fritzprix/libr-agent --skill to-md --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of To Md?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for To Md
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fritzprix-to-md/badge)](https://www.skillsdirectory.com/skills/fritzprix-to-md)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: to-md
description: "Use when the user needs to convert files (PDF, DOCX, PPTX, XLSX, HTML, images, audio, ZIP) to structured Markdown via MarkItDown. Suitable for text extraction, RAG ingestion, or format normalization. NOT for document editing — use docx or pptx skills instead."
---

# To Markdown

This skill defines the unified policy for converting files to structured Markdown without summarizing or altering the original content. Prefer Microsoft's **MarkItDown** Python package when a Python interpreter is available.

## Skill routing

| Task | Use this skill | NOT |
|------|----------------|-----|
| Single-file text extraction | **to-md** | docx, pptx, workspace-indexer |
| Workspace batch conversion + index.md | **workspace-indexer** | to-md directly |
| DOCX tracked-changes review | **docx** (pandoc) | to-md |
| DOCX/PPTX creation or editing | **docx** / **pptx** | to-md |

## Supported formats

- **Documents**: PDF (.pdf), Word (.docx), PowerPoint (.pptx), Excel (.xlsx)
- **Data & Web**: HTML, CSV, JSON, XML
- **Media**: Images (EXIF metadata and OCR), Audio (speech transcription)
- **Archives**: ZIP files

## Dependency check

Run these checks **in order**. Do not start a long package-install loop before confirming an interpreter exists.

### 1. Locate a Python interpreter

```bash
command -v python3 || command -v python
```

PowerShell: `Get-Command python3, python -ErrorAction SilentlyContinue`

If neither exists, go to **step 4** (system extractors) or install a Python runtime with the environment’s package manager (`apt`, `brew`, etc.) **only when that is clearly allowed and quick**. Prefer `python3` once available.

### 2. Confirm MarkItDown (or install it)

Use the interpreter and matching pip module — do not assume bare `pip`/`pip3` are on `PATH`:

```bash
PY="$(command -v python3 || command -v python)"
"$PY" -c "import markitdown" 2>/dev/null || "$PY" -m pip install "markitdown[all]"
```

PowerShell:

```powershell
$py = Get-Command python3 -ErrorAction SilentlyContinue
if (-not $py) { $py = Get-Command python -ErrorAction SilentlyContinue }
if (-not $py) { throw "No Python interpreter on PATH" }
& $py.Source -c "import markitdown" 2>$null
if ($LASTEXITCODE -ne 0) { & $py.Source -m pip install "markitdown[all]" }
```

If pip install fails (no network, managed environment, missing pip), go to **step 4**. Do not invent file contents.

### 3. Convert with MarkItDown

When import succeeds, use the MarkItDown CLI or Python API for all supported formats. See [references/conversion_guide.md](references/conversion_guide.md).

### 4. Fallback when MarkItDown cannot run

If there is no usable Python/MarkItDown path, extract text with **already-installed** system CLIs only — do not invent bytes, and do not spend the session installing large OCR/Python stacks unless the user explicitly needs MarkItDown features:

| Format | Prefer (if present) |
|--------|---------------------|
| PDF (text layer) | `pdftotext` |
| Images / scanned PDF | `tesseract` |
| HTML | read the file directly or a simple HTML-to-text filter already on the system |
| DOCX/PPTX/XLSX | report that MarkItDown is required, or follow the specialized **docx** / **pptx** skill when applicable |

After extraction, write Markdown that preserves the extracted text; do not summarize or hallucinate missing content.

## Conversion workflow

Prefer MarkItDown when step 2 succeeds. Otherwise use step 4 and state which extractor produced the text.

## Core execution principles

1. **Prefer MarkItDown** for file-to-Markdown when Python is available. Do not parse Office/PDF binaries with ad-hoc Python libraries (PyMuPDF, python-docx, python-pptx, openpyxl) or legacy Pandoc for plain reading unless a specialized skill requires it (e.g. DOCX tracked changes in **docx**).
2. **Preserve original text**: Do not hallucinate, summarize, or alter extracted text. Rely strictly on parser/OCR output.
3. **Structure & readability**: Prefer MarkItDown’s structure (headings, tables, lists) when available; fallback output may be flatter plain text wrapped as Markdown.
4. **Fail fast on environment gaps**: Missing `python`/`pip` is not a signal to retry the same install recipe. Preflight, then fallback or install the interpreter once.

Attribution

fritzprixfritzprix
View sourceMore from fritzprix →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

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 (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

695601 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →