aladin-word-forge

Aladin Word Forge: parses DOCX without local dependencies (extracting outline/tables/word count) and generates Markdown drafts; produces standardized Word documents from Markdown (including table of contents, headers/footers, and themes); supports batch merging, reflow/repagination, conversion back to Markdown, and template placeholder filling.

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 "aladin-word-forge" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ba1be835290946f180392cf3cb513bb0537ce250401ee406c141dc141f9535f4. Verify the upstream source and version against https://skillhub.cn/skills/user_d18c97ea/aladin-word-forge 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

Aladin Word Forge: parses DOCX without local dependencies (extracting outline/tables/word count) and generates Markdown drafts; produces standardized Word documents from Markdown (including table of contents, headers/footers, and themes); supports batch merging, reflow/repagination, conversion back to Markdown, and template placeholder filling.

0 Downloads

Introduction source: third_party · user_d18c97ea · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: aladin-word-forge
slug: aladin-word-forge
version: 1.0.0
displayName: 阿拉丁·Word智能文档工坊|零依赖docx解析·Markdown转Word·批量排版·文档合并·模板填充
description: Word文档处理/排版/解析一站式本地工坊【阿拉丁出品】。纯 Python 标准库零依赖(无需安装 Word/WPS/Office),直接解析 docx 提取大纲/目录/表格/字数,从 Markdown 草稿一键生成规范 docx(自动目录·页眉页脚页码·多主题),批量合并多份文档、批量重排版去杂乱格式、批量 docx 转 Markdown 入库,模板 {{占位符}} 一键填充批量出正式文档。当用户说"Word排版、docx解析、把Markdown转成Word、Word转Markdown、合并Word文档、批量排版、生成报告/简历/合同模板、word formatting、docx to markdown、markdown to docx、batch word"时触发。与依赖 Office 的排版工具和纯提示词公文模板不同:本工坊直接读文件、确定性可复算、支持批量与模板填充,全程本地零上传。
summary: 零依赖本地解析 docx(大纲/表格/字数)→ Markdown 草稿生成规范 Word(目录/页眉页脚/主题)→ 批量合并/重排版/转MD → 模板占位符填充
category: office
company: 阿拉丁
agent_created: true
license: MIT
platforms:
  - win32
  - darwin
  - linux
tags:
  - Word文档处理
  - docx解析
  - docx转Markdown
  - Markdown转Word
  - Word排版
  - 批量排版
  - 文档合并
  - 文档批量处理
  - 模板填充
  - 报告生成
  - 简历模板
  - 合同模板
  - 公文排版
  - 自动目录
  - 页眉页脚
  - 零依赖
  - 无需Office
  - 无需WPS
  - word-formatting
  - docx-to-markdown
  - markdown-to-docx
  - batch-word
  - document-merge
  - 阿拉丁
homepage: https://github.com/aladin-ai/word-forge
changelog: |
  1.0.0 (2026-07-23) 首发:零依赖 docx 解析(大纲/表格/字数/图片)、Markdown→规范 Word(自动目录/页眉页脚页码/三主题)、批量合并/重排版/转 Markdown、模板 {{占位符}} 批量填充;纯标准库、跨平台、本地零上传

阿拉丁·Word智能文档工坊(aladin-word-forge)

【阿拉丁出品】把"Word 文档处理"从"装 Office + 手动排版"升级为可批量的本地流水线:文件直读 → 结构化解析 → Markdown 草稿生成规范文档 → 批量合并/重排版/转 MD → 模板填充。纯 Python 标准库,零 pip 依赖、零上传,敏感文档不出本机。

何时触发

  • "帮我把这份 Word 排版一下 / 统一格式 / 去掉杂乱样式"
  • "解析这个 docx,提取大纲、目录、表格和字数"
  • "把这份 Markdown 草稿生成一份正式的 Word 文档"
  • "把这 5 份 Word 合并成一份 / 批量转成 Markdown"
  • "用模板批量生成合同 / 通知书 / 简历 / 周报"
  • "Word 转 Markdown 用于知识库 / 检索入库"
  • "word formatting / docx to markdown / markdown to docx / merge word / batch word"

何时不触发

  • 图片版 / 扫描件 Word(需 OCR,建议先转文字版)
  • 需要协同编辑 / 在线评论(本工坊做本地批处理,不做云端协作)
  • 复杂域(题注/交叉引用/脚注尾注)——会保留文本,但高级域可能不还原
  • 想直接写全新长文档正文(可由 Hy3 撰写草稿,本工坊负责"渲染成 Word")

能力总览

能力 子命令 说明
解析 docx word_parse.py 提取标题层级/目录、表格、图片数、字数;导出 Markdown/JSON/大纲
生成 docx word_build.py Markdown 草稿 → 规范 docx(标题样式·自动目录·页眉页脚·主题)
批量合并 word_batch.py merge 多份 docx 合并为一份,统一主题与页码
批量重排版 word_batch.py format 给现有 docx 重新套用主题,规范化去杂乱格式
批量转 MD word_batch.py tomd 批量 docx → Markdown(知识库/检索入库)
模板填充 word_fill.py {{占位符}} 用数据替换,批量出正式文档

参考资源(渐进式披露)

资源 何时加载 内容
references/usage-examples.md 用户要实战命令 / 场景示例 / 模板批量填充 / FAQ 时 ≥3 真实场景可复制命令 + 最佳实践 + 常见问题
references/usage.md 用户要命令速查 / 参数说明 时 四个子命令的完整参数表与示例

简单任务直接看上方「快速开始」;复杂场景(批量模板、知识库入库、合并重排)再展开对应 reference。

快速开始

# 0) 进入技能脚本目录
cd <skill_dir>/scripts

# 1) 解析:docx -> 大纲 + Markdown + JSON
python word_parse.py 报告.docx --md 报告.md --json 报告.json --outline 大纲.txt

# 2) 生成:Markdown 草稿 -> 规范 Word(现代主题 + 自动目录 + 页眉)
python word_build.py --in 草稿.md --out 报告.docx --theme modern --toc --header "阿拉丁"

# 3) 批量合并 2 份文档
python word_batch.py merge A.docx B.docx --out 合集.docx --theme academic --toc

# 4) 批量重排版(去杂乱格式、统一主题)
python word_batch.py format 旧.docx --out 新.docx --theme default

# 5) 批量转 Markdown
python word_batch.py tomd "docs/*.docx" --outdir md/

# 6) 模板填充:把 {{client_name}} 等占位符换成数据
python word_fill.py 模板.docx --data 数据.json --out 正式.docx

支持的 Markdown 语法(生成用)

  • #~### 标题(自动映射 Heading1~3 样式)
  • 普通段落(合并连续行)
  • - / * 无序列表(自动编号符号)
  • | 列 | 列 | 表格(首行为表头,自动加边框)
  • --- 分页符
  • 行内 **加粗**、*斜体*、`代码`

模板填充数据格式

--data 支持两种:

  • JSON:{"client_name": "张三", "sign_date": "2026-07-23"}
  • key=value 文本(支持 # 注释):
    client_name = 张三
    sign_date = 2026-07-23

技能已内置示例:assets/sample_template.md(含 {{client_name}} 等占位符,可经 python word_build.py --in assets/sample_template.md --out 模板.docx 生成模板)、 assets/sample_draft.md(草稿样例)。

与其他阿拉丁工坊协作

  • aladin-pdf-forge:PDF 提取文本 → 进本工坊渲染成 Word
  • aladin-excel-forge:Excel 数据 → 进本工坊生成带表格的 Word 报告
  • aladin-contract-forge:合同审查报告 → 进本工坊排版成正式审查意见书

形成"PDF 提取 / Excel 数据 / Word 撰写 / 合同审查"的完整文档闭环。

安全与依赖

  • 零第三方依赖:仅用 Python 标准库(zipfile + xml.etree),无需 pip install
  • 本地优先:所有解析/生成/填充均在本地完成,文档不上传任何服务器
  • 不破坏原文件:生成/填充均输出到新文件,原 docx 保持不变

能力边界

能做(→ Effectiveness / Adaptability)

  • 解析 docx 提取大纲、表格、字数、图片数(零依赖,无需 Office)
  • 从 Markdown 草稿生成规范 docx(标题样式/目录/页眉页脚/主题)
  • 批量合并、批量重排版、批量转 Markdown
  • 模板 {{占位符}} 填充(JSON / key=value 数据)
  • 跨平台运行(win32 / darwin / linux,纯标准库 Python)

不能做(→ Reliability 边界透明)

  • 解析图片版 / 扫描件 Word(需先 OCR 转文字)
  • 还原复杂域:题注、交叉引用、脚注尾注(保留文本但不还原域)
  • 在线协同编辑 / 评论(本工坊只做本地批处理)
  • 保证 docx 与 Word 100% 像素级一致(样式按 OOXML 标准实现,兼容性高但非商业级渲染)
  • 替你撰写全新长文档正文(应由 Hy3 产出草稿,本工坊负责渲染成 Word)

输入输出规范(→ Convention)

输入

  • 解析:word_parse.py <input.docx>(任意合法 .docx)
  • 生成:word_build.py --in <draft.md>(Markdown / 纯文本,UTF-8)
  • 模板:word_fill.py <template.docx> --data <data.json|data.txt>

输出

  • 解析:--md(Markdown) / --json(结构化 IR) / --outline(标题大纲) 三选多
  • 生成 / 合并 / 重排版:单个 .docx 文件(--out 指定)
  • 填充:单个 .docx,占位符被替换为实际值;--keep 时未命中占位符保留原文

格式约定

  • 占位符统一为 {{变量名}},变量名用字母/数字/下划线/\.(如 {{client.name}})
  • 模板中占位符需落在同一文本片段(run)内,避免被 Word 自动拆分
  • 所有输出均 UTF-8,中文友好;不修改源文件

重要约束(TRACE 映射)

  • 隐私优先:文档全程本地处理、零上传,敏感内容不出本机(→ Trust)
  • 异常反馈:解析失败给出明确原因(缺 document.xml / 非 docx),不静默中断(→ Reliability)
  • 平台中立:纯标准库实现,win32/darwin/linux 行为一致(→ Adaptability)
  • 输入输出规范:严格的文件类型与占位符格式约定,避免误填(→ Convention)
  • 价值可量化:一次命令完成"草稿→规范 Word"或"百份文档批量处理",替代手动排版(→ Effectiveness)

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 Value95/100

Highlights

  • 解决办公场景高频刚需:Word文档解析、排版、批量处理、模板填充
  • 零依赖本地运行,敏感文档不出本机,隐私安全有保障
  • 支持批量操作,显著提升文档处理效率
Trigger Precision90/100

Highlights

  • 触发词覆盖全面,包含中英文多种表达方式
  • 边界清晰,明确区分适用与不适用场景
Structure and Standards90/100

Highlights

  • 结构清晰,分模块介绍各子命令功能
  • 提供完整快速开始示例和参数说明
  • frontmatter完整,包含版本、平台、标签等信息
Execution Reliability85/100

Highlights

  • 纯Python标准库实现,零第三方依赖
  • 明确异常处理机制和输入输出规范
  • 提供模板填充数据格式说明和示例
Evidence Verifiability (mean of the first four)90/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.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 145
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github.com

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.