/ Каталог / Песочница / document-format-skills
● Сообщество KaguraNanaga ⚡ Сразу

document-format-skills

автор 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.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

document-format-skill.replay ▶ готово
0/0

Установка

Выберите клиент

~/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
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.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 использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

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
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "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
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.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 использует массив объектов серверов, а не 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"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

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

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: document-format-skills

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

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

Когда использовать: You received a draft 公文 and need it to pass 公文处理 review.

Предварительные требования
  • 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
Поток
  1. Analyze first
    分析 report.docx 的格式问题,按 GB/T 9704-2012 标准列出所有偏差。✓ Скопировано
    → A list of deviations grouped by category
  2. Apply preset
    按公文标准自动修复,保留原内容。输出到 report-fixed.docx。✓ Скопировано
    → New file generated, diff summary printed

Итог: A report that passes internal formatting review without manual reformatting.

Подводные камни
  • Complex tables get re-rendered incorrectly — Review tables manually — the skill is conservative there
Сочетать с: filesystem

Clean punctuation and formatting in a Chinese academic paper

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

Когда использовать: Before submitting to a Chinese journal that enforces strict punctuation standards.

Поток
  1. Punctuation pass
    修正 paper.docx 中所有中英文标点混用问题,统一为中文全角标点。✓ Скопировано
    → Every ( and , normalized
  2. Apply academic preset
    按学术论文标准应用格式预设。✓ Скопировано
    → Consistent heading, indent, spacing

Итог: A submission-ready paper.

Подводные камни
  • Code blocks or English quotations get over-converted — Ask the skill to preserve English-only paragraphs — specify section ranges to exclude

Комбинации

Сочетайте с другими MCP — эффект x10

document-format-skill + filesystem

Batch-format every .docx in a folder

遍历 reports/ 下所有 .docx,全部按公文标准格式化,输出到 reports-fixed/。✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
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

Стоимость и лимиты

Во что обходится

Квота API
None
Токенов на вызов
Minimal — the skill mostly drives a Python script
Деньги
Free
Совет
Run analyze_format once, then apply_preset — don't ask Claude to do the formatting by hand in tokens

Безопасность

Права, секреты, радиус поражения

Хранение учётных данных: None
Исходящий трафик: None — fully local via python-docx

Устранение неполадок

Частые ошибки и исправления

ModuleNotFoundError: python-docx

pip install python-docx

Проверить: 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

Проверить: fc-list :lang=zh

Альтернативы

document-format-skills в сравнении

АльтернативаКогда использоватьКомпромисс
Manual Word stylesOne-off doc, you already know Word wellNo batch, easy to be inconsistent

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills