/ Directory / Playground / document-format-skills
● Community KaguraNanaga ⚡ Instant

document-format-skills

by KaguraNanaga · KaguraNanaga/document-format-skills

Formats Chinese .docx files to Chinese government / academic / legal standards — fixes indentation, punctuation, fonts, numbering with python-docx.

A focused Claude Code skill for Chinese Word document formatting. Detects mixed Chinese/English punctuation, inconsistent fonts, and spacing issues, then applies one of three style presets: GB/T 9704-2012 official documents, academic papers, or legal documents. Python-based, depends on python-docx.

Why use it

Key features

Live Demo

What it looks like in practice

document-format-skill.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "document-format-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/KaguraNanaga/document-format-skills",
        "~/.claude/skills/document-format-skills"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "document-format-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/KaguraNanaga/document-format-skills",
        "~/.claude/skills/document-format-skills"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "document-format-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/KaguraNanaga/document-format-skills",
        "~/.claude/skills/document-format-skills"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "document-format-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/KaguraNanaga/document-format-skills",
        "~/.claude/skills/document-format-skills"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "document-format-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/KaguraNanaga/document-format-skills",
        "~/.claude/skills/document-format-skills"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "document-format-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/KaguraNanaga/document-format-skills",
          "~/.claude/skills/document-format-skills"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add document-format-skill -- git clone https://github.com/KaguraNanaga/document-format-skills ~/.claude/skills/document-format-skills

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use document-format-skills

Format a government report to GB/T 9704-2012 standard

👤 Chinese government / SOE staff, secretaries ⏱ ~15 min beginner

When to use: You received a draft 公文 and need it to pass 公文处理 review.

Prerequisites
  • Python 3 + python-docx installed — pip install python-docx
  • Skill cloned — git clone https://github.com/KaguraNanaga/document-format-skills ~/.claude/skills/document-format-skills
Flow
  1. Analyze first
    分析 report.docx 的格式问题,按 GB/T 9704-2012 标准列出所有偏差。✓ Copied
    → A list of deviations grouped by category
  2. Apply preset
    按公文标准自动修复,保留原内容。输出到 report-fixed.docx。✓ Copied
    → New file generated, diff summary printed

Outcome: A report that passes internal formatting review without manual reformatting.

Pitfalls
  • Complex tables get re-rendered incorrectly — Review tables manually — the skill is conservative there
Combine with: filesystem

Clean punctuation and formatting in a Chinese academic paper

👤 Chinese-language graduate students and researchers ⏱ ~20 min beginner

When to use: Before submitting to a Chinese journal that enforces strict punctuation standards.

Flow
  1. Punctuation pass
    修正 paper.docx 中所有中英文标点混用问题,统一为中文全角标点。✓ Copied
    → Every ( and , normalized
  2. Apply academic preset
    按学术论文标准应用格式预设。✓ Copied
    → Consistent heading, indent, spacing

Outcome: A submission-ready paper.

Pitfalls
  • Code blocks or English quotations get over-converted — Ask the skill to preserve English-only paragraphs — specify section ranges to exclude

Combinations

Pair with other MCPs for X10 leverage

document-format-skill + filesystem

Batch-format every .docx in a folder

遍历 reports/ 下所有 .docx,全部按公文标准格式化,输出到 reports-fixed/。✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
analyze_format path to .docx Before applying any changes 0 — local
fix_punctuation path, target (cn|mixed) Chinese/English punctuation unification 0
apply_preset path, preset (gov|academic|legal) After analysis, main transform 0

Cost & Limits

What this costs to run

API quota
None
Tokens per call
Minimal — the skill mostly drives a Python script
Monetary
Free
Tip
Run analyze_format once, then apply_preset — don't ask Claude to do the formatting by hand in tokens

Security

Permissions, secrets, blast radius

Credential storage: None
Data egress: None — fully local via python-docx

Troubleshooting

Common errors and fixes

ModuleNotFoundError: python-docx

pip install python-docx

Verify: python -c 'import docx'
Tables misrender after formatting

Revert and run preset with tables excluded

Fonts missing on the final machine

Preset uses 宋体/仿宋/黑体 — install Chinese fonts on the system that opens the file

Verify: fc-list :lang=zh

Alternatives

document-format-skills vs others

AlternativeWhen to use it insteadTradeoff
Manual Word stylesOne-off doc, you already know Word wellNo batch, easy to be inconsistent

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills