markitdown-converter-zh
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "markitdown-converter-zh" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b3aabb3c5d5bd85b6b73b26bb80976e68198f008c9f90726263f1d4b4ab20a16. Verify the upstream source and version against https://skillhub.cn/skills/user_00c9b356/chenlin-markitdown-converter-zh before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Core converter from arbitrary content to clean Markdown (markitdown philosophy as a pure skill): converts docx/xlsx/html/csv/json/pdf and other text content into LLM-friendly Markdown, preserving headings, lists, tables, links and structural elements while discarding layout and style noise. Designed as a zero-parser, pure model conversion core.
Introduction source: third_party · user_00c9b356 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: markitdown-converter-zh
displayName: 任意内容转干净 Markdown(markitdown 哲学)
description: 任意内容→干净 Markdown 转换内核(markitdown 哲学纯 skill 化)。把 docx/xlsx/html/csv/json/pdf 文本等转换为 LLM 友好的 Markdown——保留标题/列表/表格/链接结构,丢弃排版与样式噪音。零解析器,纯模型转换。
slug: chenlin-markitdown-converter-zh
version: 1.0.0
summary: 格式感知转换:任意内容→干净 Markdown(markitdown 哲学,纯模型,零 parser)
license: MITmarkitdown-converter-zh
把「任意带结构的内容」转换成干净、LLM 友好的 Markdown——只保留语义结构(标题、列表、表格、链接、代码块),丢弃排版与样式噪音(颜色、字体、对齐、分页符)。这是微软 markitdown(~126K–145K star)的转换哲学纯 skill 化:不抄它的解析器编排,只做它最值钱的那层——「文本进、Markdown 出」。
边界前置:本 skill 是纯模型转换,不做二进制解析。你喂给它已经提取出的文本/源码(docx 正文、xlsx 单元格、HTML 源码、csv、json、pdf 文本层),它输出 Markdown。真正的「pdf→文本」靠 parser,不属于本 skill 范围(见 FAQ Q4 与边界声明)。
12 条硬规则(必须严格遵守)
- 只输出 Markdown:不写「以下是转换结果」之类前言/后语,直接给 Markdown。
- 保留层级:
#–######标题、-/1.列表、>引用、```代码块,层级与原文一致。 - 丢弃排版噪音:颜色、字号、字体、居中/对齐、分页符、装饰线、多余空行——一律不输出。
- 链接不丢 URL:统一
[文字](url);无文字链接用[url](url)。 - 表格标准化:转成 Markdown 表格,必须含表头分隔行
|---|---|,列数首尾一致。 - 图片/图表占位:纯文本输入无法还原二进制图。标注
并加一行「原图见源文件第 X 页/节」,绝不臆造图内容。 - 数值逐字保真(去幻觉 → 对接
credible-writer):所有数字、百分比、p 值、单位、公式符号原样,不「修正」不「补充」。 - 代码块围栏:用
```包裹,保留语言标记(python /sql),不翻译代码内容。 - 中文自然流畅(去 AI 味 → 对接
humanizer-zh):正文译/写为自然学术中文,去除机器腔套话(「值得注意的是」「综上所述」式废话不强行加)。 - 大文件分块:单批 ≤ 一章/一节(建议 ≤ 800 行原文),每块附 ±3 行上下文,避免跨块结构断裂。
- 不臆造:源没有的内容不补、不「润色」成新信息、不替用户总结。
- 输出前结构校验:代码块成对闭合、表格列数一致、列表缩进连续;异常块标注「⚠ 待核」。
核心:LLM-friendly Markdown 哲学(来自 markitdown)
markitdown 的设计信条只有一条——为 LLM 上下文优化,不为人眼排版优化。落实为三条:
- 结构优先于样式:标题层级、列表、表格、链接这些「语义锚点」必须保住;加粗/斜体/颜色这类「表现层」可丢(除非承载语义,如
*强调*表强调则保留)。 - 扁平优于嵌套装饰:能用
#标题表达的,不用「空格缩进假标题」;能用标准表格的,不用 ASCII 艺术框。 - 可机读优于可观赏:输出要能被下游再解析(RAG 切片、二次处理),所以链接留 URL、表格严格对齐、代码带语言标记。
格式映射规则(详见 references/format-mapping-rules.md)
| 输入格式 | 关键映射 |
|---|---|
| docx | 标题→#层级;正文→段落;项目符号→-;编号→1.;表格→MD 表;脚注→[^1] 尾注 |
| xlsx | 每 sheet 一个 ##;区域→MD 表;空单元格保留为 ` ` 而非删列 |
| html | 剥 <script>/<style>/<nav>/<footer>;<h1-6>→#;<ul/ol>→列表;<table>→MD 表;<a>→[文字](href);<code>→围栏 |
| csv | 首行表头 + |---|;引号内逗号不拆列;编码声明 UTF-8 |
| json | 默认转嵌套列表/表格;大数组给「前 N 条 + 结构说明」;保留 key 原样 |
| pdf 文本层 | 按版心重建标题层级;跨页段落合并;页眉页脚丢弃;公式/编号保留 |
长文本分块策略(防结构丢失)
- 切分点:优先在「章节标题」「分页」「空行分隔」处切,不在句子中间切。
- 上下文携带:每块附带「本文档术语/结构速记」+ 前块末 3 行,保证跨块列表/表格连续。
- 重组:输出按原顺序拼接,不重排;若某块异常,标注「⚠ 第 X 块待核」继续,不中断整批。
稳定性与重试(纯模型场景兜底,subtitle 实证)
- 超大输入切片:单次输入 > 800 行强制分块,避免截断导致结构断裂。
- 显式超时上限:单块处理 ≤ 60s,单文档 ≤ 300s;超时隔离该块标注「⚠ 待核」。
- 最大重试 3 次:某块质量差(结构校验失败)重试该块,超限隔离标注继续,绝不无限重试。
- 断点续译:记录已处理块区间,中断可续,不重跑全篇。
- 多文档独立:多文件逐个处理,不并行、不混上下文。
边界声明(学术/生产伦理)
- 不处理二进制解析:pdf 图文提取、docx 解包等靠外部 parser,本 skill 只接「已提取文本」。
- 不替用户决策:只转换,不总结、不改写观点、不「优化」原文逻辑。
- 敏感数据:转换含 PII/机密的内容前提醒用户确认脱敏;本 skill 不存储输入。
- 责任归属:转换结果需人工核对(尤其表格列对齐、公式符号),本 skill 不对下游误用负责。
唤起方式
用户说「转成 markdown」「整理成 md」「把这段 html 净化」「xlsx 转表格 md」「给 LLM 喂之前先清洗格式」等,即触发本 skill。
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决用户高频刚需:为 RAG 和大模型上下文准备干净结构化文本
- 功能深度强:12 条硬规则 + 格式映射 + 分块策略 + 稳定性兜底
- 受众广泛:研究人员、开发者、内容运营等均可受益
Highlights
- description 明确描述功能与边界
- 唤起方式列举多种自然语言触发变体,覆盖合理
- 边界清晰,不易误触或漏触
Highlights
- Phase/步骤清晰:12 条硬规则、核心哲学、格式映射、分块策略、稳定性、边界声明
- frontmatter 完整,单文件未超 500 行
- 含端到端示例(格式映射表)和出口条件(输出前结构校验)
Highlights
- 工具来源明确:纯模型转换,不依赖外部 parser
- 覆盖主要异常:大文件分块、超时上限、最大重试 3 次、断点续译、多文档独立
- 不可逆操作有确认机制:敏感数据提醒用户确认脱敏
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.