SkillsGrove
SkillsGrove/Bürodokumente/kanlac/agent-steroids/extract-to-md

extract-to-md

Installation

$npx skills add https://github.com/kanlac/agent-steroids --skill extract-to-md
$git clone --depth 1 https://github.com/kanlac/agent-steroids.git /tmp/agent-steroids && mkdir -p ~/.claude/skills && cp -r /tmp/agent-steroids/plugins/steroids/skills/extract-to-md ~/.claude/skills/extract-to-md
Bitte installiere diesen Agent Skill für mich: https://github.com/kanlac/agent-steroids/tree/5b003aa09ddf68be56be405f49e8ed0bda5f2120/plugins/steroids/skills/extract-to-md – lies zuerst seine SKILL.md und seine Skripte und installiere ihn erst dann in meinen Skills-Ordner, wenn du bestätigt hast, dass er sicher ist.

Zusammenfassung

Originalbeschreibung · MIT将网页导出内容或 PDF 报告重构为可编辑 Markdown。适用于「先改 Markdown 再出 PDF」、修复错误断行、恢复段落结构、补齐图片并按原文位置插入、处理摘要编号与标点风格一致化等任务。
Die folgende SKILL.md ist aus kanlac/agent-steroids (Commit 5b003aa) unter der Lizenz MIT wiedergegeben. Der Text ist unverändert; lediglich die Metadaten im Dateikopf sind weggelassen, Bilder werden als Links angezeigt und sehr lange Dateien werden gekürzt. Copyright 2026 Kan. Lizenz: LICENSE. Es wird nur die Anleitungsdatei angezeigt; etwaige Skripte finden Sie im Original-Repository.

提取为 Markdown

适用场景

  • 用户要求将网页或 PDF 内容整理成 Markdown 草稿。
  • 文档存在错行、断段、乱码符号或摘要序号混乱。
  • 需要先完成 Markdown 校对,再二次导出 PDF。
  • 需要尽量贴近原 PDF 的图片位置与章节结构。

工作流程

1. 输入与提取

  • 识别来源类型:网页导出 PDF、原生 PDF、复制文本。
  • 提取正文文本、页面顺序、图片资源与坐标信息(若可用)。
  • 记录源页码,供后续定位与核对。

2. 先清洗噪声

  • 在做标点转换前,先去掉页面噪声,包括页眉页脚、时间戳、导航栏文本、孤立 URL、页码计数(如 x/y)。
  • 这样可避免 URL 被误改或正文被误判。

3. 恢复段落

  • 以版面间距为主依据,合并同段内错误换行。
  • 段落之间通常保留空行,避免把相邻段误并成一段。
  • 跨页首行若明显是续句则合并;若是标题样式则保持分段。

4. 构建 Markdown 结构

  • 统一输出结构:报告标题页信息、摘要、正文。
  • 摘要条目必须使用 1.、2.、3. 的编号形式。
  • 同一条摘要的换行内容应合并为一条,避免拆成两点。

5. 图片处理

  • 将图片导出到独立目录(例如 xxx-assets/)。
  • 图片按源文档页序与阅读顺序插入到 Markdown 对应位置。

6. 表格处理策略

  • 表格结构清晰时,优先转为 Markdown 表格。
  • 表格识别不稳时,改为「关键数据列表 + 原图」方案。
  • 保留单位、数值与来源位置,确保可复核。

7. 套用风格偏好

  • 结构修复后再处理标点和样式。
  • 与风格相关的具体规则,按 references/style-profile-zh.md 执行。
  • 注意 URL、邮箱、代码片段中的半角符号不要被误替换。

8. 交付前检查

  • 摘要条目数与原文一致,且无误拆分。
  • 小数点、编号句点与中英文混排格式正确。
  • 加粗范围符合用户要求,不多加、不漏加。
  • 图片链接可用,关键图表无缺失。
  • 最终交付为一个可编辑 .md 文件和一个图片目录。

交付规范

  • 生成的脚本、临时中间文件、调试产物统一放在一个临时目录下(例如 tmp/)。
  • 临时目录应与最终交付物分离,便于工作完成后整体清理删除。
Vollständigen Lizenztext ansehen (MIT)
MIT License

Copyright (c) 2026 Kan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.