Skip to content
Back to skills

Forma Cn

ASecurity

Chinese legal document formatter. Formats .docx contracts, agreements, and official documents per GB/T 9704—2012 (Chinese government document standard). Use this skill whenever the user asks to format, typeset, or standardize Chinese Word documents (.docx) — contracts, privacy policies, service agreements, EULAs, attachments, or any legal/official doc — especially when they mention 公文格式, 排版, 标准格式, or GB/T 9704. Also use when the user has raw .docx legal files that look unstyled or inconsisten...

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 8, 2026
ai-agentspythongobashgitapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned June 8, 2026

npx -y skills add ThomasMoreAI/legal-skills-open --skill forma-cn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Forma Cn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Forma Cn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thomasmoreai-forma-cn/badge)](https://www.skillsdirectory.com/skills/thomasmoreai-forma-cn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: forma-cn
title: FormaCN — 中文公文格式化工貝
description: Chinese legal document formatter. Formats .docx contracts, agreements, and official documents per GB/T 9704—2012 (Chinese government document standard). Use this skill whenever the user asks to format, typeset, or standardize Chinese Word documents (.docx) — contracts, privacy policies, service agreements, EULAs, attachments, or any legal/official doc — especially when they mention 公文格式, 排版, 标准格式, or GB/T 9704. Also use when the user has raw .docx legal files that look unstyled or inconsistently formatted and need a professional, standardized layout.
author: ethanl-dev
author_url: https://github.com/ethanl-dev/forma-cn
license: MIT
version: 0.1.0
execution_mode: open
jurisdiction: general
practice: general
language: zh
---

# FormaCN — 中文公文格式化工貝

Applies GB/T 9704—2012 formatting to `.docx` files. Preserves all tracked
changes (修订), comments (批注), and text content — only the visual formatting
changes.

## Quick start

```bash
cd ~/.claude/skills/forma-cn
pip install python-docx
python -m forma_cn.cli 文件1.docx 文件2.docx
```

Or as a Python API:

```python
from forma_cn.formatter import FormatEngine

engine = FormatEngine("文件.docx")
engine.run()
engine.save("文件_格式化.docx")
```

## Formatting applied

| Element | Standard |
|---------|----------|
| Paper | A4 (210×297 mm) |
| Margins | Top 3.7 / Bottom 3.5 / Left 2.8 / Right 2.6 cm |
| Title | 方正小标宋简体 22pt (二号), centered |
| Section headings | 黑体 16pt (三号), bold, left-aligned |
| Body text | 仿宋 16pt (三号), first-line indent 2 chars |
| Line spacing | Fixed 28pt |
| Bullet items | Hanging indent (no first-line indent) |
| Latin text | Times New Roman |

## Bundled resources

- `forma_cn/` — Python package (pure, no deps beyond `python-docx`)

## Notes

- Input files must be `.docx` (Word OpenXML format).
- Output is saved as `{原名}_格式化.docx` alongside the original.
- The script modifies formatting at both the paragraph level (indent, spacing,
  alignment) and run level (font face, size). It works at the lxml layer so
  tracked changes and comments are never touched.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…