用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/fabioc-aloha/Alex_Plug_In --skill docx-to-md命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | docx-to-md |
| description | Convert Word documents (.docx) to clean Markdown with image extraction and pandoc cleanup |
| tier | extended |
| inheritance | inheritable |
| applyTo | **/*.docx,**/*word*,**/*docx* |
| muscle | .github/muscles/docx-to-md.cjs |
Ingest Word documents into your Markdown workflow — clean, linted, version-control ready
Convert .docx files into clean, linted Markdown with extracted images, normalized headings, and cleaned table formatting. The reverse converter for ingesting external documents into a Markdown-based workflow.
| Content Type | Status | Notes |
|---|---|---|
| Headings | ✅ | Hierarchy normalized to start at H1 |
| Bold/Italic | ✅ | Converted to Markdown syntax |
| Links | ✅ | Preserved as Markdown links |
| Images | ✅ | Extracted to images/ folder |
| Tables | ✅ | Cleaned and aligned |
| Lists | ✅ | Ordered, unordered, nested |
| Code blocks | ⚠️ | Detected if styled as code |
| Footnotes | ✅ | Converted to Markdown footnotes |
| Comments | ⚠️ | Stripped with --strip-comments |
| Track changes | ❌ | Accept/reject before converting |
| Embedded objects | ❌ | Extract manually |
| Feature | Details |
|---|---|
| Image extraction | Embedded images saved to images/ folder with sequential naming |
| Pandoc cleanup | Removes escaped brackets, span classes, trailing backslashes |
| Table normalization | Aligns columns, adds proper separators |
| Heading fix | Normalizes hierarchy to start at H1 |
| Frontmatter | Optional YAML frontmatter with title and date |
| Comment stripping | Removes Word review comments |
# Basic conversion
node .github/muscles/docx-to-md.cjs report.docx
# With frontmatter and heading normalization
node .github/muscles/docx-to-md.cjs spec.docx --add-frontmatter --fix-headings
# Strip review comments
node .github/muscles/docx-to-md.cjs reviewed.docx --strip-comments
# Custom output path
node .github/muscles/docx-to-md.cjs input.docx output/document.md
# Debug mode (keeps raw pandoc output)
node .github/muscles/docx-to-md.cjs input.docx --debug
# Full cleanup pipeline
node .github/muscles/docx-to-md.cjs spec.docx --add-frontmatter --fix-headings --strip-comments --clean-tables
| Option | Default | Description |
|---|---|---|
--extract-images | true | Extract images to images/ folder |
--no-extract-images | - | Keep images as raw base64 in markdown |
--add-frontmatter | off | Generate YAML frontmatter with title/date |
--clean-tables | true | Normalize table column widths |
--no-clean-tables | - | Keep pandoc raw table output |
--fix-headings | off | Normalize heading hierarchy to start at H1 |
--wrap N | 0 | Wrap lines at N characters (0 = no wrap) |
--strip-comments | off | Remove Word comment annotations |
--debug | off | Keep intermediate pandoc output |
The conversion follows a multi-stage cleanup:
.docx → pandoc → raw MD → cleanup → clean MD
↓
1. Escaped brackets removed
2. Trailing backslashes removed
3. Span classes stripped
4. Image attributes cleaned
5. Comments stripped (optional)
6. Headings normalized (optional)
7. Tables reformatted
8. Images extracted
9. Frontmatter added (optional)
| Pandoc Quirk | Before | After |
|---|---|---|
| Escaped brackets | \[text\] | [text] |
| Trailing backslashes | line\ | line |
| Span classes | {.underline} | (removed) |
| Image attributes | {width="5in"} | (removed) |
| Heading anchors | {#section-1} | (removed) |
| Excessive blank lines | \n\n\n\n | \n\n |
Embedded images are extracted to a sibling images/ folder:
input/
├── document.docx
└── document.md (output)
└── images/
├── image1.png
├── image2.png
└── image3.jpg
Image references in markdown are updated automatically:

# Convert with full cleanup
node .github/muscles/docx-to-md.cjs stakeholder-spec.docx \
--add-frontmatter --fix-headings --strip-comments
# Validate output
node .github/muscles/markdown-lint.cjs stakeholder-spec.md
# Review and commit
git add stakeholder-spec.md images/
git commit -m "docs: ingest stakeholder specification"
# Batch convert all Word docs
Get-ChildItem *.docx | ForEach-Object {
node .github/muscles/docx-to-md.cjs $_.FullName --add-frontmatter --fix-headings
}
| Problem | Cause | Solution |
|---|---|---|
| "pandoc not found" | pandoc not installed | winget install pandoc |
| Images missing | Extraction failed | Check images/ folder, re-run |
| Tables misaligned | Complex table structure | Manual cleanup may be needed |
| Headings start at H3 | Original doc structure | Use --fix-headings |
| Comments in output | Track changes not stripped | Use --strip-comments |
| Encoding issues | Non-UTF8 content | Re-save .docx as UTF-8 |
winget install pandoc).github/muscles/docx-to-md.cjs (v1.0.0)
Skill version: 2.0.0 | Last updated: 2026-04-14 | Category: document-conversion
The conversion follows a multi-stage cleanup:
.docx → pandoc → raw MD → cleanup → clean MD
↓
1. Escaped brackets removed
2. Trailing backslashes removed
3. Span classes stripped
4. Image attributes cleaned
5. Comments stripped (optional)
6. Headings normalized (optional)
7. Tables reformatted
8. Images extracted
9. Frontmatter added (optional)
| Pandoc Quirk | Before | After |
|---|---|---|
| Escaped brackets | \[text\] | [text] |
| Trailing backslashes | line\ | line |
| Span classes | {.underline} | (removed) |
| Image attributes | {width="5in"} | (removed) |
| Heading anchors | {#section-1} | (removed) |
| Excessive blank lines | \n\n\n\n | \n\n |
Embedded images are extracted to a sibling images/ folder:
input/
├── document.docx
└── document.md (output)
└── images/
├── image1.png
├── image2.png
└── image3.jpg
Image references in markdown are updated automatically:

# Convert with full cleanup
node .github/muscles/docx-to-md.cjs stakeholder-spec.docx \
--add-frontmatter --fix-headings --strip-comments
# Validate output
node .github/muscles/markdown-lint.cjs stakeholder-spec.md
# Review and commit
git add stakeholder-spec.md images/
git commit -m "docs: ingest stakeholder specification"
# Batch convert all Word docs
Get-ChildItem *.docx | ForEach-Object {
node .github/muscles/docx-to-md.cjs $_.FullName --add-frontmatter --fix-headings
}
| Problem | Cause | Solution |
|---|---|---|
| "pandoc not found" | pandoc not installed | winget install pandoc |
| Images missing | Extraction failed | Check images/ folder, re-run |
| Tables misaligned | Complex table structure | Manual cleanup may be needed |
| Headings start at H3 | Original doc structure | Use --fix-headings |
| Comments in output | Track changes not stripped | Use --strip-comments |
| Encoding issues | Non-UTF8 content | Re-save .docx as UTF-8 |
winget install pandoc).github/muscles/docx-to-md.cjs (v1.0.0)
Skill version: 2.0.0 | Last updated: 2026-04-14 | Category: document-conversion
Create and maintain ASCII visual dashboards for project tracking with parallel lane progress bars
Store and manage voice samples for TTS cloning — portable, version-controlled audio references
Clear documentation through visual excellence