mcpField
C
convert-to-markdown

convert-to-markdown

github.com/varlabzDocuments051 installsUpdated 2w ago
Repository

About convert-to-markdown

convert-to-markdown is a skill for turning files and URLs into Markdown, suited to workflows that collect document, web, and media content. It selects MarkItDown or a dedicated script by input type, including paths for YouTube transcripts, MHTML, and web pages.

Key features

  1. 01Converts many document and data formats
  2. 02Extracts YouTube transcripts and video details
  3. 03Converts MHTML to Markdown
  4. 04Converts web pages through Crawl4AI
  5. 05Supports image OCR and audio transcription

Use cases

  1. 01Turn PDFs or Office files into Markdown
  2. 02Extract subtitles from YouTube videos
  3. 03Convert MHTML files or URLs
  4. 04Fetch web pages and produce Markdown

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/varlabz/skills --skill convert-to-markdown

After installing, type/convert-to-markdownin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
evals.json
evals/files/
page.mhtml
proposal.docx
proposal.md
scripts/
mhtml-to-md
web-to-md
youtube-transcript

Details

From the project README

Convert Files and URLs to Markdown

All scripts live in scripts/. Run them "as is".

Tool Selection

Input typeCommandScript location
.pdf, .docx, .pptx, .xlsx, .xls, .csv, .json, .xml, .epub, images (.jpg/.png/etc.), audio (.mp3/.wav/etc.), .html, .txt, .mduvx markitdown <path>built-in CLI
YouTube URL or video ID./scripts/youtube-transcript <url_or_id>scripts/youtube-transcript
Regular web URL (Crawl4AI server running)./scripts/web-to-md <url>scripts/web-to-md
.mhtml file or MHTML URL./scripts/mhtml-to-md <source>scripts/mhtml-to-md

YouTube Transcript

./scripts/youtube-transcript <url_or_video_id> [--info] [--lang <code>] [--raw] [--cookies-from-browser <browser[:profile_dir]>]
  • --info: Include video metadata (title, channel, duration) before transcript.
  • --lang <code>: Subtitle language (e.g. en, de). Default: auto-detect source language.
  • --raw: Output raw VTT instead of cleaned text.
  • --cookies-from-browser <browser[:profile_dir]>: Load cookies from a browser, optionally specifying its profile (e.g. firefox or firefox:/path/to/profile). Falls back to the YOUTUBE_TRANSCRIPT_COOKIES environment variable when omitted.

MHTML to Markdown

./scripts/mhtml-to-md <path_or_url>

Accepts local .mhtml files or remote URLs serving MHTML content.

Web Page to Markdown (via Crawl4AI)

./scripts/web-to-md <url> [-o output.md] [-s server_url]

Requires a Crawl4AI server running on http://localhost:11235 (or set $CRAWL4AI_URL). The server fetches the full page HTML; this script converts it to Markdown.

No Crawl4AI? Fall back:

curl -o page.html <url> && uvx markitdown page.html

MarkItDown (General File Conversion)

All other formats use uvx markitdown:

uvx markitdown <path> [-o output.md]

Supports: PDF, DOCX, PPTX, XLSX/XLS, images (EXIF + OCR), audio (transcription), EPUB, CSV, JSON, XML, HTML, TXT, ZIP.

When Things Go Wrong

IssueWhat to do
Scanned PDF yields no textTry uvx markitdown <path> treating it as an image — markitdown runs OCR on images
Password-protected fileRemove password first; markitdown can't decrypt
Large ZIP archiveExtract specific files first, then convert individually
YouTube age-restricted videoTry --cookies-from-browser with a browser profile signed in to an account that can access the video; access is not guaranteed.
Audio transcription poor qualityDepends on audio clarity; nothing we can do from here
Excel has many sheetsAll sheets included as separate tables in output

Comments

Markdown supported