Individual skill

doc-format

公文格式排版工具。将 doc/docx/wps/txt/md 文档按照公文排版习惯自动格式化,输出标准 docx。支持智能识别标题层级(一、/(一)/1./(1))、题目/副标题、附件格式化、图表标题识别、页面边距、页码、行距、字体字号、TXT/MD 空行模式、自定义配置和目录批量处理。当用户需要排版公文、格式化文档、统一文档格式、调整字体字号行距边距时使用此技能。关键词:公文排版、文档格式化、字体设置、标题层级、格式统一、排版工具。

skills/doc-format/SKILL.md

Read pinned source

Source commit 42771cae0d928eace30679c61cdf5d57d20d1ea6

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 10, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
918
Repository last updated
Oct 14, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# doc-format — 公文格式排版工具

使用 `scripts/wfp_cli.py` 将文档按公文排版规则格式化为标准 `.docx`。原始文件不原地修改,Word/WPS 类文档会先复制或转换到临时副本,再执行排版。

## 核心能力

- 支持 `.docx`、`.doc`、`.wps`、`.txt`、`.md`。
- 支持单文件、多文件、重复 `-i`、位置参数输入,以及一个或多个目录;目录输入默认递归扫描,输出目录保留原结构。
- 自动识别题目、副标题、四级标题、二级标题段内正文、图/表标题、附件标识。
- 行距支持默认磅值模式和 Word 倍数模式;段落缩进支持厘米和字符两种单位。
- 可选题目/一级标题/二级标题强制加粗、表格内容自动调整、数字和字母单独字体、符号标准化。
- TXT/MD 支持三种空行模式:不改动任何空行;删除单个空行,多个空行保留至 1 个空行;保留单个空行,多个空行保留至 1 个空行。
- TXT/MD 中手写数字编号(如 `1.`、`1.2.3`)按源文档保留,不自动递增重排。
- 支持自动读取当前目录 `wfp_config.json`、指定 JSON 配置文件、内联 JSON、`--set key=value` 和便利开关覆盖配置。
Back to top