laozhuang-b06

Converts user-provided documents (docx, pptx, xlsx, pdf, html, csv, rtf, odt, epub, txt) into Markdown or extracts the main text. Images and scanned PDF pages can be converted to Markdown after OCR recognition.

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 "laozhuang-b06" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-25d879d5013eaf408ad66db737eb38455703f0ee767c446dadc26252dc3d278d. Verify the upstream source and version against https://skillhub.cn/skills/user_75a20f40/laozhuang-b06 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

Converts user-provided documents (docx, pptx, xlsx, pdf, html, csv, rtf, odt, epub, txt) into Markdown or extracts the main text. Images and scanned PDF pages can be converted to Markdown after OCR recognition.

0 Downloads

Introduction source: third_party · user_75a20f40 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: file-to-markdown
description: '将用户提供的各类文档文件转换为 Markdown 格式。当用户给出 docx、pptx、xlsx、pdf、html、csv、rtf、odt、epub、txt 等文件并要求转成 Markdown、提取正文、或"把我这个文件变成 md",即触发本技能。图片与扫描件 PDF 通过 OCR 技能识别后包装为 Markdown。'
agent_created: true

File To Markdown

Overview

把用户随手丢过来的各种文档(Word、PPT、Excel、PDF、网页、表格、RTF、ODT、EPUB、 纯文本)转换成干净、可读的 Markdown 文本。核心转换器是 scripts/convert_to_md.py,按文件扩展名自动路由到对应解析器,无需用户指定格式。

图片(png/jpg/...)与扫描件 PDF 没有可直接抽取的文字层,需先经 tencentcloud-ocr 技能做 OCR,再把识别结果整理为 Markdown(见下文「图片与扫描件」)。

环境依赖

转换器依赖若干 Python 第三方库,已安装在隔离 venv 中:

C:\Users\Administrator\.workbuddy\binaries\python\envs\default\Scripts\python.exe

所需库:python-docx、python-pptx、openpyxl、xlrd、pdfplumber、html2text、 striprtf、odfpy、ebooklib。若某格式报错提示 ModuleNotFoundError,在该 venv 内 pip install 库名 即可,不影响其它格式。

Quick Start

单文件转换(默认在同目录生成 原名.md):

"C:\Users\Administrator\.workbuddy\binaries\python\envs\default\Scripts\python.exe" \
  "C:\Users\Administrator\.workbuddy\skills\file-to-markdown\scripts\convert_to_md.py" \
  "用户给的文件路径.docx"

指定输出路径:附加 -o 输出.md。

批量转换整个目录(每个文件生成同名 .md;加 --recursive 递归子目录):

"...\python.exe" "...\file-to-markdown\scripts\convert_to_md.py" "目录路径" --recursive

路径含空格时必须用双引号包裹。Windows 上建议全程使用正斜杠或双反斜杠。

支持的格式与处理方式

输入扩展名 处理方式 说明
.docx python-docx 标题按样式映射为 #~######;粗体/斜体/下划线保留;列表与表格转为 Markdown
.pptx python-pptx 每页 ## Slide N 起头,含文本框、表格与备注
.xlsx openpyxl 每个工作表 ## 表名 + Markdown 表格
.xls xlrd 同上(旧版二进制格式)
.pdf pdfplumber(退回 pypdf) 文本型 PDF 按页抽取;扫描件报错并提示走 OCR
.html/.htm html2text 还原标题/列表/链接/表格;图片以链接占位
.csv/.tsv csv 模块 自动嗅探分隔符,输出 Markdown 表格
.rtf striprtf 抽取纯文本
.odt odfpy 抽取标题与段落
.epub ebooklib + html2text 各章节内容合并为 Markdown
.txt/.md 直接读取 视为已合法 Markdown,原样输出

图片与扫描件(OCR 路线)

convert_to_md.py 遇到图片或扫描件 PDF 会主动跳过并打印提示。此时改用 tencentcloud-ocr 技能:

  1. 调用 tencentcloud-ocr 技能对图片/扫描件做高精度文字识别,取得正文文本。
  2. 将识别结果整理为 Markdown:加一级标题(原文件名),按自然段落换行, 保留原有的标题层级与列表(若 OCR 返回了结构信息)。
  3. 写出 原名.md,并向用户说明该文件经由 OCR 生成、可能存在个别识别误差。

注意事项

  • 输出 Markdown 默认与源文件同目录、同名(扩展名改为 .md)。若目标文件已存在, 会被覆盖——转换前确认无需保留旧版。
  • PDF 字体/版式复杂时,抽取文字可能出现错行;这是 PDF 文本层限制,必要时提示用户 改用 OCR 路线获得更准结果。
  • 超大表格(数万行)会生成很长 Markdown,转换前可先与用户确认是否需要截断或仅取摘要。
  • 转换完成后,主动用一两句话汇报:成功几个、产物路径、有无跳过/失败项。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 覆盖docx/pptx/xlsx/pdf/html/csv/rtf/odt/epub/txt等多种主流文档格式
  • 针对图片和扫描件PDF提供OCR集成方案,形成完整处理闭环
  • 解决用户日常高频的文档格式转换刚需
Trigger Precision88/100

Highlights

  • 触发词覆盖全面,包含多种文件格式和常见转换请求表述
  • 明确区分了直接转换和OCR路线的适用场景
Structure and Standards85/100

Highlights

  • 文档结构完整,包含Overview/Quick Start/支持格式/OCR路线/注意事项
  • 提供了详细的命令行使用示例和参数说明
  • frontmatter信息完整规范
Execution Reliability87/100

Highlights

  • Python解释器和脚本路径明确指定
  • 依赖库列表完整,包含各格式对应的解析器
  • 对OCR集成、文件覆盖、PDF错行等异常情况有明确处理说明
Evidence Verifiability (mean of the first four)88/100

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 notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.