document-format-skills

作者 KaguraNanaga已验证

Professional Word document formatting toolkit for Chinese documents

165
Stars
15
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/KaguraNanaga/document-format-skills

快速入门

使用 document-format-skills 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

📄 document-format-skills 公文格式助手

中文版本 README / Chinese Version

看不懂英文也没关系,请点击上面的链接查看中文版说明。

💡 想要无需联网、一键运行修复格式的桌面应用版本?

现已推出 Document Format GUI 公文格式助手 —— 无需联网、一键修复公文格式的桌面应用,小白也能轻松上手!

A Word document formatting toolkit for Chinese official documents for the government, CCP (China Communist Party), and the state-owned enterprises. Diagnose formatting issues, fix punctuation, and apply standardized styles with one command. Available for Claude Code, Codex, and OpenCode.

公文格式助手是一个面向中文公文排版的 Skill 工具包,用于诊断 Word 文档格式问题、修复中英文标点和空格混用、统一公文/论文/法律文书格式、处理页码和表格,并支持从纯文本或 Markdown 生成规范 DOCX。

Features

  • 中文用户如果不熟悉命令行,可以优先使用 Document Format GUI 公文格式助手:无需联网、一键修复公文格式。
  • Smart one-shot processing: punctuation/spacing cleanup plus formatting.
  • Format diagnosis for punctuation, numbering, paragraph, and font issues.
  • Official, academic, legal, and custom presets.
  • GB/T 9704-2012 style page margins, fonts, line spacing, headings, signatures, dates, and page numbers.
  • Safer page-number handling with styles, positions, offsets, replacement control, and non-page footer protection.
  • Table normalization with optional smart alignment.
  • Custom settings compatible with the desktop app schema v2 and exported preset JSON.
  • Word revision marks for supported formatting changes.
  • macOS font fallback for common Chinese official-document fonts.
  • .doc / .wps conversion on Windows when WPS Office or Microsoft Word is installed.
  • Plain text or Markdown to formatted DOCX.

Requirements

  • Python 3.8+
  • python-docx
  • pywin32 only for .doc/.wps conversion on Windows

Use uv for ad-hoc runs:

uv run --with python-docx python scripts/process.py --help

For Windows .doc/.wps conversion:

uv run --with python-docx --with pywin32 python scripts/process.py --help

Quick Start

Smart cleanup:

uv run --with python-docx python scripts/process.py smart input.docx output.docx --preset official

Analyze only:

uv run --with python-docx python scripts/process.py analyze input.docx
uv run --with python-docx python scripts/process.py analyze input.docx --json

Punctuation and spacing only:

uv run --with python-docx python scripts/process.py punctuation input.docx output.docx --space-mode keep_en_boundary

Formatting only:

uv run --with python-docx python scripts/process.py format input.docx output.docx --preset official

Create a formatted DOCX from Markdown or text:

uv run --with python-docx python scripts/from_text.py input.md output.docx --title "Work Plan"

Useful Options

--preset official|academic|legal|custom
--custom-settings path.json
--revision
--deep-clean
--smart-table-align
--no-page-number
--page-number-style dash|plain|page_text|page_total
--page-number-position outside|left|center|right
--space-mode remove_all|keep_en_boundary|keep_all

--custom-settings accepts desktop schema v2 config files, exported preset files like {"preset": {...}}, or plain preset/override JSON.

Scripts

ScriptPurpose
scripts/process.pyMain CLI pipeline: smart, analyze, punctuation, format.
scripts/formatter.pyFormatting engine and preset handling.
scripts/punctuation.pyPunctuation and spacing fixer.
scripts/from_text.pyText/Markdown to DOCX generator.
scripts/analyzer.pyDiagnostic helpers.
scripts/converter.pyWindows .doc/.wps conversion helpers.

Notes

  • .docx is the most reliable format.
  • .doc/.wps requires Windows plus WPS Office or Microsoft Word.
  • Keep a backup of important documents before running automated formatting.

License

MIT

常见问题

What is document-format-skills?

document-format-skills is an open-source documentation skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by KaguraNanaga. Professional Word document formatting toolkit for Chinese documents. It has 165 GitHub stars.

Is document-format-skills safe to use?

Yes. document-format-skills passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install document-format-skills?

Clone the repository with "git clone https://github.com/KaguraNanaga/document-format-skills" and add it to your Claude Code skills directory (see the Installation section above). document-format-skills ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is document-format-skills written in?

document-format-skills is primarily written in Python. It is open-source under KaguraNanaga on GitHub, so you can review or fork the full source.

Are there alternatives to document-format-skills?

Yes. SkillsLLM lists many other Documentation skills you can browse and compare side by side. Open the Documentation category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh document-format-skills against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情