360 Secure SkillHub
360 安全技能中心

MarkItDown

这是微软开发的本地Python转换工具,核心是将PDF、办公文档、音视频、图片等数十种格式的文件/URL转为Markdown,保留表格、列表等结构化内容。典型场景包括提取文档信息、音视频转录、图片OCR识别等。输入支持本地文件路径或YouTube链接,输出可直接显示或存为.md文件;本地处理为主,部分场景需网络,依赖通过PyPI安装。

jeminay
jeminay
热度 92.13
最近更新 2026-05-11 17:27:50
分类:效率依赖:代码执行 / 读写文件 / 联网浏览搜索应用场景:文件转换

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add markitdown
Metadata
name
markitdown
description
MarkItDown is a Python utility from Microsoft for converting various files (PDF, Word, Excel, PPTX, Images, Audio) to Markdown. Useful for extracting structured text for LLM analysis.
homepage
https://github.com/microsoft/markitdown
repository
https://github.com/microsoft/markitdown
metadata
{"openclaw":{"requires":{"bins":["python3"]},"install":[{"id":"venv","kind":"exec","command":"python3 -m venv .venv && .venv/bin/pip install 'markitdown[all]'","label":"Create virtual environment and install markitdown with all dependencies from PyPI"}]}}

MarkItDown Skill

Description

MarkItDown is a Python utility developed by Microsoft (source: https://github.com/microsoft/markitdown) for converting various files and office documents to Markdown. It allows me to easily extract structured text (including tables, headers, and lists) from complex formats to better understand their content. The conversion happens locally using installed Python libraries.

Safety Note: The installation process downloads the markitdown package and its dependencies from the official Python Package Index (PyPI). Processing certain formats (like YouTube URLs) requires external network access to fetch the content. Processing local files requires access to the directory where the target files are located.

Supported Formats

  • Office Documents: PowerPoint (PPTX), Word (DOCX), Excel (XLSX, XLS).
  • PDF
  • Images: Text extraction (OCR) and metadata (EXIF).
  • Audio/Video: Speech transcription (wav, mp3, Youtube URLs) and EXIF.
  • Web and Text: HTML, CSV, JSON, XML.
  • Archives and Books: ZIP archives, EPub.

Dependencies

The skill installs the utility in a local virtual environment. Most features work out-of-the-box thanks to the markitdown[all] dependencies installed via PyPI. For specific formats (audio/video), system libraries (e.g., ffmpeg) may be required and must be installed on the host.

When to Use

  • When you need to read, analyze, or extract information from PDF, Word, Excel, or PowerPoint files.
  • When document structure is important for the response (e.g., tables or formatted lists).
  • If you need to extract text from audio or video files, or "read" an image.

How to Use

The virtual environment is automatically set up when the skill is installed. You must run the utility from within the skill's folder.

Conversion with Console Output (STDOUT)

Useful for small files to see the result immediately.

./.venv/bin/markitdown /path/to/file.pdf

Conversion with File Output

The best option for large documents. Save the result to a .md file and read it using the read tool.

./.venv/bin/markitdown /path/to/file.pdf -o /path/to/result.md

Example: Excel Conversion

Navigate to the skill folder (e.g., cd ~/skills/markitdown) and execute:

./.venv/bin/markitdown ~/downloads/report.xlsx -o ~/downloads/report.md

After that, you can read the resulting report.md file.