#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

Compare on GitHub

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.

Compare on GitHub

View on GitHubAdd to my skills

Verified commit 42771cae0d928eace30679c61cdf5d57d20d1ea6

904GitHub stars
19stars in 7 days
1skill in this repository
1commit in 30 days

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

Aug 2, 2026Nov 6, 2026904

Individual skills in this repository

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 tokens

Always available to the agent

SKILL.md

2,163 tokens

When the skill is activated

Reference documents

4,481 tokens

Loaded on request

Token counts are estimates. Scripts run separately; they are not counted as reference context.

The playbook

  1. 核心能力
  2. 使用前检查
  3. 常用命令
  4. 配置处理流程
  5. 输出行为
  6. 完成后必读
  7. Reference Files
  8. Agent 使用准则

Scripts executed separately

  • scripts/wfp_cli.py
  • scripts/wfp_config.py
  • scripts/wfp_core.py
  • scripts/wfp_numbering.py
  • scripts/wfp_numbering_integration_tests.py
  • scripts/wfp_numbering_samples.py
  • scripts/wfp_numbering_tests.py
  • scripts/wfp_tests.py
  • scripts/wfp_version.py

Files

  • SKILL.mdcore8,078 bytes
  • SKILL.mdcore8,078 bytes
  • references/cli-reference.mddoc5,909 bytes
  • references/config-reference.mddoc5,083 bytes
  • references/formatting-rules.mddoc4,455 bytes
  • requirements.txtdoc73 bytes
  • scripts/wfp_cli.pyruns21,566 bytes
  • scripts/wfp_config.pyruns3,222 bytes
  • scripts/wfp_core.pyruns90,034 bytes
  • scripts/wfp_numbering.pyruns37,855 bytes
  • scripts/wfp_numbering_integration_tests.pyruns10,346 bytes
  • scripts/wfp_numbering_samples.pyruns5,722 bytes
  • scripts/wfp_numbering_tests.pyruns41,783 bytes
  • scripts/wfp_tests.pyruns15,212 bytes
  • scripts/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 GitHub

Skills 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

  1. #967 on Nov 2
  2. #969 on Nov 3
  3. #974 on Nov 4
  4. #971 on Nov 5
  5. #968 on Nov 6
  6. #970 since Nov 7
70 earlier periods
  1. #717 on Aug 2
  2. #701 on Aug 7
  3. #699 from Aug 8 to Aug 9
  4. #727 on Aug 10
  5. #730 on Aug 11
  6. #722 on Aug 12
  7. #721 on Aug 13
  8. #714 on Aug 14
  9. #686 on Aug 15
  10. #702 on Aug 16
  11. #711 on Aug 17
  12. #719 on Aug 18
  13. #705 on Aug 19
  14. #699 from Aug 20 to Aug 21
  15. #669 on Aug 22
  16. #697 on Aug 23
  17. #722 on Aug 24
  18. #727 on Aug 25
  19. #712 on Aug 26
  20. #716 on Aug 27
  21. #739 on Aug 28
  22. #681 on Aug 29
  23. #684 on Aug 30
  24. #717 on Aug 31
  25. #733 on Sep 1
  26. #719 on Sep 2
  27. #720 on Sep 3
  28. #696 on Sep 4
  29. #684 on Sep 5
  30. #709 on Sep 6
  31. #719 on Sep 7
  32. #744 on Sep 8
  33. #728 on Sep 9
  34. #736 on Sep 10
  35. #718 on Sep 11
  36. #714 on Sep 13
  37. #739 on Sep 14
  38. #733 on Sep 15
  39. #743 on Sep 16
  40. #745 on Sep 17
  41. #705 on Sep 19
  42. #716 on Sep 20
  43. #759 on Sep 22
  44. #706 on Sep 25
  45. #703 on Sep 26
  46. #732 on Sep 27
  47. #753 on Sep 28
  48. #782 on Sep 29
  49. #716 on Oct 1
  50. #759 on Oct 5
  51. #762 on Oct 6
  52. #819 on Oct 8
  53. #784 on Oct 9
  54. #767 from Oct 10 to Oct 11
  55. #788 on Oct 12
  56. #795 on Oct 13
  57. #807 on Oct 14
  58. #794 on Oct 15
  59. #802 on Oct 16
  60. #777 on Oct 17
  61. #759 on Oct 18
  62. #817 on Oct 20
  63. #827 on Oct 21
  64. #803 on Oct 22
  65. #809 on Oct 23
  66. #772 on Oct 24
  67. #939 on Oct 25
  68. #957 from Oct 28 to Oct 30
  69. #961 on Oct 31
  70. #963 on Nov 1

Before you install

Network or broad shell

Automated 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:1 Analysis incomplete: Referenced executable target unavailable; not analyzed
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

  • Executable scriptline 1
    Executable file
  • Access to secretsline 123
    [Credential-related source omitted]

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

  • Executable scriptline 1
    Executable file
  • Network accessline 49
    def test_markdown_cleaning(self):         raw = "# 标题\n**粗体** 和 [链接](https://example.com)\n![图片](a.png)\n> 引用"
  • Network accessline 50
    raw = "# 标题\n**粗体** 和 [链接](https://example.com)\n![图片](a.png)\n> 引用"

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 compatibility, from the files in this repository
AgentStatusEvidenceInstall to
Claude CodeCompatibleStandard SKILL.md skills/doc-format/SKILL.md.claude/skills/<skill-name>/
CodexCompatibleStandard SKILL.md skills/doc-format/SKILL.md.agents/skills/<skill-name>/
CursorCompatibleStandard SKILL.md skills/doc-format/SKILL.md.cursor/skills/<skill-name>/
Gemini CLICompatibleStandard SKILL.md skills/doc-format/SKILL.md.gemini/skills/<skill-name>/
GitHub CopilotCompatibleStandard SKILL.md skills/doc-format/SKILL.md.github/skills/<skill-name>/
OpenCodeCompatibleStandard 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.

cwyalpha/Word-Formatter-Pro: #970 on hotskills, 904 stars

[![cwyalpha/Word-Formatter-Pro on hotskills](https://hotskills.dev/badge/cwyalpha-word-formatter-pro.svg)](https://hotskills.dev/skill/cwyalpha-word-formatter-pro/)