From greentrain-files
Batch converts office documents (PDF, PPT, Word, Excel) to Markdown, generates local Ollama summaries, detects duplicates with MD5, and organizes via three-dimensional symlink classifications (theme/use/customer).
npx claudepluginhub crazynomad/skills --plugin greentrain-planningThis skill uses the workspace's default tool permissions.
将散落的办公文档(PDF、PPT、Word、Excel 等)批量转换为 Markdown,通过本地 Ollama 模型生成摘要和三维度分类,用软链接同时呈现多种分类方案,零额外磁盘占用。
Converts PDF, Word, PPTX, PPT, and TXT documents to Markdown, preserving titles, lists, tables, structure, and PPT slide sections. Adds frontmatter, annotates images, suggests output path for archiving or import.
Converts PDF, DOCX, PPTX, XLSX and 10+ formats to token-efficient Markdown/CSV digests with structural compression. Use for feeding documents to Claude without excessive context costs.
Converts PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs to structured Markdown for LLM processing.
Share bugs, ideas, or general feedback.
将散落的办公文档(PDF、PPT、Word、Excel 等)批量转换为 Markdown,通过本地 Ollama 模型生成摘要和三维度分类,用软链接同时呈现多种分类方案,零额外磁盘占用。
Use this skill when users:
触发关键词: 文档整理, 文档分类, 思维导图, mindmap, 文档摘要, PDF 转 Markdown, 批量转换, 文档归档
| 格式 | 扩展名 | 说明 |
|---|---|---|
| PDF 文档 | ||
| 📊 PPT | .pptx | PowerPoint 演示文稿 |
| 📝 Word | .docx | Word 文档 |
| 📈 Excel | .xlsx, .xls | 电子表格 |
| 📈 CSV | .csv | 逗号分隔值 |
| 🌐 HTML | .html, .htm | 网页 |
| 📚 EPUB | .epub | 电子书 |
| 📋 JSON | .json | JSON 数据 |
| 📋 XML | .xml | XML 数据 |
python scripts/doc_converter.py ~/Documents/reports --preview
python scripts/doc_converter.py ~/Documents/reports --convert --confirm
python scripts/doc_converter.py file1.pdf file2.pptx --convert --confirm
python scripts/doc_converter.py ~/Documents/reports --summarize
python scripts/doc_converter.py ~/Documents/reports --summarize --model qwen3:8b
python scripts/doc_converter.py ~/Documents/reports --organize
python scripts/doc_converter.py ~/Documents/reports --organize --rename
python scripts/doc_converter.py ~/Documents/reports --convert --confirm --summarize --organize
# 含优化文件名
python scripts/doc_converter.py ~/Documents/reports --convert --confirm --summarize --organize --rename
python scripts/doc_converter.py ~/Documents --preview --json
| 参数 | 说明 |
|---|---|
paths | 文件或目录路径(支持多个) |
--preview | 预览模式,列出文档 + 重复检测 |
--convert | 执行批量转换(自动跳过重复文件) |
--summarize | 使用 Ollama 本地模型生成摘要(需先 convert) |
--organize | 三维度分类并生成软链接目录(需先 summarize) |
--rename | 软链接使用 AI 建议的优化文件名(配合 --organize) |
--model MODEL | Ollama 模型名称(默认: qwen2.5:3b) |
--confirm | 确认执行(安全机制) |
--json | JSON 格式输出 |
转换输出在源文件夹的 .summaries/ 隐藏目录下:
{source}/
└── .summaries/
├── converted/ # markitdown 转换的 .md 文件
│ ├── report.pdf.md
│ ├── slides.pptx.md
│ └── data.xlsx.md
├── briefs/ # Ollama 生成的摘要
│ ├── report.pdf.brief.md
│ ├── slides.pptx.brief.md
│ └── data.xlsx.brief.md
├── schemes/ # 软链接分类目录
│ ├── by-topic/ # 按主题分类
│ │ ├── AI技术/
│ │ │ └── AI驱动产品管理指南.pptx -> ../../../../slides.pptx # --rename
│ │ └── 数据治理/
│ │ └── C端数据治理规划.pdf -> ../../../../report.pdf # --rename
│ ├── by-usage/ # 按用途分类
│ │ ├── 培训材料/
│ │ └── 客户交付方案/
│ └── by-client/ # 按客户分类
│ ├── 沃尔沃/
│ └── 通用方案/
├── mindmap.md # Claude 生成的思维导图分类
└── index.csv # 转换索引(含 MD5、重复标记)
pip install 'markitdown[all]'brew install ollama + ollama pull qwen2.5:3bpip install requestsClaude 使用此技能时,按以下步骤执行:
运行预览命令,向用户展示文档列表和重复检测结果:
python doc-mindmap/scripts/doc_converter.py <路径> --preview
告知用户找到的文档数量、类型分布、总大小和重复文件情况,等待确认。
用户确认后执行转换(重复文件自动跳过):
python doc-mindmap/scripts/doc_converter.py <路径> --convert --confirm
使用 Ollama 本地模型为每个文档生成摘要,不消耗 Claude 上下文窗口:
python doc-mindmap/scripts/doc_converter.py <路径> --summarize
也可以和 convert 一起执行:
python doc-mindmap/scripts/doc_converter.py <路径> --convert --confirm --summarize
使用 Ollama 对每个文档进行三维度分类(主题/用途/客户),同时为每个文档建议更清晰的文件名:
# 先不带 --rename 运行,展示分类结果和建议文件名
python doc-mindmap/scripts/doc_converter.py <路径> --organize
向用户展示分类结果和 AI 建议的文件名,询问是否使用优化文件名。如果用户同意:
python doc-mindmap/scripts/doc_converter.py <路径> --organize --rename
三套分类方案通过软链接同时存在于 .summaries/schemes/ 下,零额外磁盘占用。--rename 仅影响软链接名称,不修改原始文件。
询问用户是否要在 Finder 中预览分类目录。如果用户同意:
cp -a <.summaries/schemes> ~/Desktop/文档分类-$(date +%Y%m%d)
open ~/Desktop/文档分类-$(date +%Y%m%d)
用户可以在 Finder 中直观浏览三种分类方案,双击软链接即可打开原始文件。
读取 .summaries/briefs/ 下的摘要文件,生成 .summaries/mindmap.md 思维导图分类文件。
向用户展示: