#970 by GitHub stars
cwyalpha/Word-Formatter-Pro
公文格式排版工具。将 doc/docx/wps/txt/md 文档按照公文排版习惯自动格式化,输出标准 docx。支持智能识别标题层级(一、/(一)/1./(1))、题目/副标题、附件格式化、图表标题识别、页面边距、页码、行距、字体字号、TXT/MD 空行模式、自定义配置和目录批量处理。当用户需要排版公文、格式化文档、统一文档格式、调整字体字号行距边距时使用此技能。关键词:公文排版、文档格式化、字体设置、标题层级、格式统一、排版工具。
History
Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.
View weekly changes
skills/doc-format/SKILL.md
Week of Nov 2, 2026 · +0 / −0 lines
Before Network or broad shell → After Network or broad shell
42771cae0d92 → 42771cae0d92
Week of Oct 26, 2026 · Line counts unavailable
Before Not checked yet → After Network or broad shell
First observation → 42771cae0d92
No earlier version was observed for comparison.
Heat
6.5- Star growth, last 7 daysAhead of 91% of tracked repositories
- Star growth, last 24 hoursAhead of 94% of tracked repositories
- Rank movement, last 7 daysAhead of 35% of tracked repositories
- Commits, last 30 daysAhead of 54% of tracked repositories
- Accounts asking about it through MCP, last 7 daysNot available
- Hot votes this weekAhead of 0% of tracked repositories
Heat never changes the order by stars, and sponsorship never touches it. How heat works
Stars over time
Individual skills in this repository
- doc-format
skills/doc-format
How it works
doc-format
When your agent uses it
公文格式排版工具。将 doc/docx/wps/txt/md 文档按照公文排版习惯自动格式化,输出标准 docx。支持智能识别标题层级(一、/(一)/1./(1))、题目/副标题、附件格式化、图表标题识别、页面边距、页码、行距、字体字号、TXT/MD 空行模式、自定义配置和目录批量处理。当用户需要排版公文、格式化文档、统一文档格式、调整字体字号行距边距时使用此技能。关键词:公文排版、文档格式化、字体设置、标题层级、格式统一、排版工具。
What it loads into context
Frontmatter
160 tokensAlways available to the agent
SKILL.md
2,163 tokensWhen the skill is activated
Reference documents
4,481 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- 核心能力
- 使用前检查
- 常用命令
- 配置处理流程
- 输出行为
- 完成后必读
- Reference Files
- Agent 使用准则
Scripts executed separately
scripts/wfp_cli.pyscripts/wfp_config.pyscripts/wfp_core.pyscripts/wfp_numbering.pyscripts/wfp_numbering_integration_tests.pyscripts/wfp_numbering_samples.pyscripts/wfp_numbering_tests.pyscripts/wfp_tests.pyscripts/wfp_version.py
Files
SKILL.mdcore8,078 bytesSKILL.mdcore8,078 bytesreferences/cli-reference.mddoc5,909 bytesreferences/config-reference.mddoc5,083 bytesreferences/formatting-rules.mddoc4,455 bytesrequirements.txtdoc73 bytesscripts/wfp_cli.pyruns21,566 bytesscripts/wfp_config.pyruns3,222 bytesscripts/wfp_core.pyruns90,034 bytesscripts/wfp_numbering.pyruns37,855 bytesscripts/wfp_numbering_integration_tests.pyruns10,346 bytesscripts/wfp_numbering_samples.pyruns5,722 bytesscripts/wfp_numbering_tests.pyruns41,783 bytesscripts/wfp_tests.pyruns15,212 bytesscripts/wfp_version.pyruns239 bytes
Read SKILL.md
# 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` 和便利开关覆盖配置。View the complete source on GitHubSkills included
- doc-format
Repository facts
- License
- MIT
- Created
- Oct 22, 2025
- Last pushed
- Oct 14, 2026
- Forks
- 93
- Open issues
- 5
- Project activity
- Active
Rank over the last 12 weeks
Now #970 · best #669 · down 151 in 30 days
- #967 on Nov 2
- #969 on Nov 3
- #974 on Nov 4
- #971 on Nov 5
- #968 on Nov 6
- #970 since Nov 7
70 earlier periods
- #717 on Aug 2
- #701 on Aug 7
- #699 from Aug 8 to Aug 9
- #727 on Aug 10
- #730 on Aug 11
- #722 on Aug 12
- #721 on Aug 13
- #714 on Aug 14
- #686 on Aug 15
- #702 on Aug 16
- #711 on Aug 17
- #719 on Aug 18
- #705 on Aug 19
- #699 from Aug 20 to Aug 21
- #669 on Aug 22
- #697 on Aug 23
- #722 on Aug 24
- #727 on Aug 25
- #712 on Aug 26
- #716 on Aug 27
- #739 on Aug 28
- #681 on Aug 29
- #684 on Aug 30
- #717 on Aug 31
- #733 on Sep 1
- #719 on Sep 2
- #720 on Sep 3
- #696 on Sep 4
- #684 on Sep 5
- #709 on Sep 6
- #719 on Sep 7
- #744 on Sep 8
- #728 on Sep 9
- #736 on Sep 10
- #718 on Sep 11
- #714 on Sep 13
- #739 on Sep 14
- #733 on Sep 15
- #743 on Sep 16
- #745 on Sep 17
- #705 on Sep 19
- #716 on Sep 20
- #759 on Sep 22
- #706 on Sep 25
- #703 on Sep 26
- #732 on Sep 27
- #753 on Sep 28
- #782 on Sep 29
- #716 on Oct 1
- #759 on Oct 5
- #762 on Oct 6
- #819 on Oct 8
- #784 on Oct 9
- #767 from Oct 10 to Oct 11
- #788 on Oct 12
- #795 on Oct 13
- #807 on Oct 14
- #794 on Oct 15
- #802 on Oct 16
- #777 on Oct 17
- #759 on Oct 18
- #817 on Oct 20
- #827 on Oct 21
- #803 on Oct 22
- #809 on Oct 23
- #772 on Oct 24
- #939 on Oct 25
- #957 from Oct 28 to Oct 30
- #961 on Oct 31
- #963 on Nov 1
Before you install
Network or broad shellAutomated signals, not a guarantee
Checked Nov 4, 2026
Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.
Show 1 note
skills/doc-format/SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzed
- No broad tool permissions
- 6 dangerous shell commandsin 1 file: doc-format/scripts/wfp_cli.py:34
- 13 network referencesin 3 files: doc-format/scripts/wfp_numbering.py:23 doc-format/scripts/wfp_numbering_tests.py:18 doc-format/scripts/wfp_tests.py:49
- 1 obfuscation signalin 1 file: doc-format/scripts/wfp_numbering_tests.py:449
- No instruction overrides
- 9 executable scriptsin 9 files: doc-format/scripts/wfp_cli.py:1 doc-format/scripts/wfp_config.py:1 doc-format/scripts/wfp_core.py:1 and 6 more
- 1 reference to secretsin 1 file: doc-format/scripts/wfp_core.py:123
- No requests to vote in Hot
Show all 30 signals by file
skills/doc-format/scripts/wfp_cli.py
- Executable scriptline 1
Executable file - Dangerous shell operationline 34
sudo apt-get update - Dangerous shell operationline 35
sudo apt-get install libreoffice - Dangerous shell operationline 38
sudo apt-get update - Dangerous shell operationline 39
sudo apt-get install libreoffice libreoffice-writer - Dangerous shell operationline 42
sudo dnf install libreoffice - Dangerous shell operationline 45
sudo pacman -S libreoffice-fresh
skills/doc-format/scripts/wfp_config.py
- Executable scriptline 1
Executable file
skills/doc-format/scripts/wfp_core.py
skills/doc-format/scripts/wfp_numbering.py
- Executable scriptline 1
Executable file - Network accessline 23
W = "http://schemas.openxmlformats.org/wordprocessingml/2006/main" - Network accessline 24
W15 = "http://schemas.microsoft.com/office/word/2012/wordml" - Network accessline 25
MC = "http://schemas.openxmlformats.org/markup-compatibility/2006" - Network accessline 26
XML_SPACE = "{http://www.w3.org/XML/1998/namespace}space" - Network accessline 674
root = _read_xml(archive, main) ns = etree.QName(root).namespace if ns not in (W, "http://purl.oclc.org/ooxml/wordprocessingml/main"): - Network accessline 675
ns = etree.QName(root).namespace if ns not in (W, "http://purl.oclc.org/ooxml/wordprocessingml/main"): raise NumberingConversionError("主文档使用了未知的 WordprocessingML 命名空间") - Network accessline 676
if ns not in (W, "http://purl.oclc.org/ooxml/wordprocessingml/main"):
skills/doc-format/scripts/wfp_numbering_integration_tests.py
- Executable scriptline 1
Executable file
skills/doc-format/scripts/wfp_numbering_samples.py
- Executable scriptline 1
Executable file
skills/doc-format/scripts/wfp_numbering_tests.py
- Executable scriptline 1
Executable file - Network accessline 18
NS = {'w': W} CT = 'http://schemas.openxmlformats.org/package/2006/content-types' - Network accessline 19
CT = 'http://schemas.openxmlformats.org/package/2006/content-types' - Network accessline 20
REL = 'http://schemas.openxmlformats.org/package/2006/relationships' - Network accessline 21
OFFICE_REL = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/' - Possible obfuscationline 449
png = base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+aD1sAAAAASUVORK5CYII=')
skills/doc-format/scripts/wfp_tests.py
skills/doc-format/scripts/wfp_version.py
- Executable scriptline 1
Executable file
How the signals fit together
Facts from a static read of the files at the pinned commit. They describe what the code does, not why.
Some files could not be read; the facts below still hold.
No combined signals at this commit.
Works with
| Agent | Status | Evidence | Install to |
|---|---|---|---|
| Claude Code | Compatible | Standard SKILL.md skills/doc-format/SKILL.md | .claude/skills/<skill-name>/ |
| Codex | Compatible | Standard SKILL.md skills/doc-format/SKILL.md | .agents/skills/<skill-name>/ |
| Cursor | Compatible | Standard SKILL.md skills/doc-format/SKILL.md | .cursor/skills/<skill-name>/ |
| Gemini CLI | Compatible | Standard SKILL.md skills/doc-format/SKILL.md | .gemini/skills/<skill-name>/ |
| GitHub Copilot | Compatible | Standard SKILL.md skills/doc-format/SKILL.md | .github/skills/<skill-name>/ |
| OpenCode | Compatible | Standard SKILL.md skills/doc-format/SKILL.md | .opencode/skills/<skill-name>/ |
- Native The repository ships a manifest, folder or frontmatter field for this agent.
- Compatible A standard SKILL.md that this agent can read.
- Unknown No evidence either way.
Derived automatically from paths, manifests and frontmatter. Not tested on each agent.
Explore alternatives and comparisons
Add this badge to your README
It updates every night and links to this page.
[](https://hotskills.dev/skill/cwyalpha-word-formatter-pro/)