Agent skill

Document Format Skills

by KaguraNanaga in KaguraNanaga/document-format-skills

Chinese Word document formatting toolkit for .docx/.doc/.wps workflows.

MITAuto-check passedDocuments & Office

Install Document Format Skills

skills CLI
$ npx skills add KaguraNanaga/document-format-skills --skill document-format-skills -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install KaguraNanaga/document-format-skills document-format-skills --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
document-format-skills
GitHub stars
234
Token cost
~1.1k tokens
SKILL.md length
377 words
Files
19 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Chinese Word document formatting toolkit for .docx/.doc/.wps workflows.

  • Codex needs to diagnose document formatting
  • SKILL.md covers Quick Workflow, Scripts, Formatting Options and Punctuation And Spacing, plus 2 more sections
  • Runs Python scripts from its folder; calls uv
  • Fix mixed Chinese/English punctuation and spacing

What it does

Document Format Skills is an agent skill from KaguraNanaga/document-format-skills. Chinese Word document formatting toolkit for .docx/.doc/.wps workflows. Use when Codex needs to diagnose document formatting, fix mixed Chinese/English punctuation and spacing, apply official/academic/legal/custom presets, normalize tables and page numbers, preserve or output Word revision marks, convert plain text or Markdown into formatted DOCX, or batch/script document cleanup for Chinese official documents.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files, including scripts (for example `README.md`, `README_CN.md` and `scripts/__init__.py`).

It sits in Documents & Office, covering Word documents. It works with Microsoft Word. The repository describes itself as: 公文格式处理Skill: Professional Word document formatting toolkit for Chinese official documents. The licence is MIT.

When your agent uses it

  • Codex needs to diagnose document formatting
  • Fix mixed Chinese/English punctuation and spacing
  • Apply official/academic/legal/custom presets
  • Normalize tables and page numbers

Example prompts

  • “/document-format-skills”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit a1005d1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 9 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Document Format Skills loads about 1.1k tokens when it runs. Until then it costs about 109 tokens; SKILL.md has 377 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from KaguraNanaga/document-format-skills at commit a1005d1, republished under its MIT licence (© KaguraNanaga). 377 words, ~1,138 tokens.

Download SKILL.mdSave it as .claude/skills/document-format-skills/SKILL.md (or your agent's skills folder). This skill also uses 18 other files; get the full folder from GitHub.
name
document-format-skills
description
Chinese Word document formatting toolkit for .docx/.doc/.wps workflows. Use when Codex needs to diagnose document formatting, fix mixed Chinese/English punctuation and spacing, apply official/academic/legal/custom presets, normalize tables and page numbers, preserve or output Word revision marks, convert plain text or Markdown into formatted DOCX, or batch/script document cleanup for Chinese official documents.

Document Format Skills

Use these scripts to clean and format Chinese Word documents from the command line. Prefer scripts/process.py for normal work because it mirrors the desktop app's core pipeline without the GUI.

Quick Workflow

Run one smart pass when the user wants the document cleaned end to end:

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

Run diagnostics only:

bash
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

Run only punctuation/spacing cleanup:

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

Run only formatting:

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

On Windows, .doc and .wps input/output are supported through WPS or Microsoft Word COM automation:

bash
uv run --with python-docx --with pywin32 python scripts/process.py smart input.wps output.wps

Scripts

ScriptUse
scripts/process.pyOne-shot CLI for smart, analyze, punctuation, and format; handles .doc/.wps conversion on Windows.
scripts/formatter.pyApply formatting presets, custom JSON settings, page numbers, table cleanup, revision marks, macOS font fallback.
scripts/punctuation.pyFix punctuation while preserving run formatting; supports spacing strategies.
scripts/from_text.pyCreate a DOCX from .txt or Markdown, then optionally run smart formatting.
scripts/analyzer.pyLower-level diagnostic script.
scripts/converter.pyWindows-only .doc/.wps conversion helpers.

Formatting Options

Built-in presets:

  • official: GB/T 9704-2012 style official document formatting.
  • academic: academic paper formatting.
  • legal: legal document formatting.
  • custom: read the active desktop custom preset when available.

Useful flags:

bash
--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
--page-number-offset-mm 7
--no-bold-serial

--custom-settings accepts desktop schema v2 config files, exported preset files shaped as {"preset": {...}}, or plain preset/override JSON. For non-custom presets, the JSON is merged over the selected preset.

Show full SKILL.md (180 more words)Show less

Punctuation And Spacing

Punctuation cleanup protects URLs, email addresses, Windows paths, time values like 9:30, and standards like ISO 9001:2015. It fixes brackets, colons, semicolons, question/exclamation marks, Chinese comma/period contexts, ellipses, dashes, and paired quotes.

Spacing modes:

  • remove_all: delete half-width and full-width spaces.
  • keep_en_boundary: remove Chinese-to-Chinese spaces but keep exactly one space between Chinese and English/digits.
  • keep_all: leave spaces unchanged.

Text Or Markdown To DOCX

Generate and format a document from text:

bash
uv run --with python-docx python scripts/from_text.py input.md output.docx --title "工作方案"

Markdown mode detects headings, bold spans, ordered/unordered lists, quotes, and fenced code blocks. # becomes the main title, ## becomes 一、, ### becomes (一), and deeper headings become numbered lower-level headings.

Use --no-process to only create the raw DOCX.

Implementation Notes

  • .docx processing needs only python-docx.
  • .doc/.wps conversion needs Windows plus WPS Office or Microsoft Word and pywin32.
  • Page number handling avoids overwriting non-page footer content and can replace existing page-number footers when requested.
  • Default table formatting preserves original alignment; use --smart-table-align for numeric/right and short-text/center alignment.
  • macOS font handling keeps installed official fonts when present and falls back to compatible system fonts only when detection confirms the original is missing.

© KaguraNanaga, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 18 other files (scripts) in the repository root of KaguraNanaga/document-format-skills.

  • SKILL.md
  • .gitignore
  • LICENSE
  • README.md
  • README_CN.md
  • pytest.ini
  • requirements-dev.txt
  • requirements.txt
  • scripts/__init__.py
  • scripts/analyzer.py
  • scripts/converter.py
  • scripts/fix_spacing.py
  • scripts/fix_spacing_simple.py
  • scripts/formatter.py
  • scripts/from_text.py
  • scripts/process.py
  • scripts/punctuation.py
  • tests/test_formatter_regression.py
  • tests/test_punctuation_and_text.py

Open the folder on GitHubat commit a1005d1

Compare with similar skills

Document Format Skills next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Document Format Skills compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Document Format Skills this skillKaguraNanaga/document-format-skills234—~1.1kAutomated safety check: PassMIT
Journal Copyeditor DOCXmikemikeqqq/copyeditor-skill292—~3.9kAutomated safety check: PassMIT
Suikonwiizo/suiko114—~1.8kAutomated safety check: PassMIT
Latex To Word Workflowhajimi-kun/latex-to-word-workflow128—~2.3kAutomated safety check: PassMIT
Review RevisionM1n-n9/paper-lifecycle692—~2.3kAutomated safety check: PassNone
Review Papermaxwell2732/my-submission-formatting-agent111—~1.2kAutomated safety check: PassNone

Similar skills

  • Journal Copyeditor DOCX

    mikemikeqqq/copyeditor-skill

    Comprehensive academic journal copyediting and manuscript review for Microsoft Word (.docx) files across disciplines and target journals.

    292 GitHub stars~3.9k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Suiko

    nwiizo/suiko

    日本語文書のAI由来の均一さ、翻訳調、不自然さ、論旨、読解負荷を、決定的なRust CLIと目視で診断し、依頼に応じて書く・直す。日本語の学術論文・研究報告では、中心命題、用語、論証、DOCX/PDF納品を監査契約で確認する。Use when the user explicitly mentions suiko, asks whether Japanese text looks…

    114 GitHub stars~1.8k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Latex To Word Workflow

    hajimi-kun/latex-to-word-workflow

    Load when the user asks to convert an academic LaTeX manuscript, thesis, or report into an editable Word DOCX, adapt it to a Word template, preserve citations or cross-references, or diagnose a…

    128 GitHub stars~2.3k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Review Revision

    M1n-n9/paper-lifecycle

    Review and revise academic papers with a senior-reviewer workflow.

    692 GitHub stars~2.3k tokensUpdated 3 mo ago
    Documents & OfficeAuto-check passed
  • Review Paper

    maxwell2732/my-submission-formatting-agent

    Comprehensive manuscript review covering argument structure, methodology, citation completeness, writing quality, and potential referee objections.

    111 GitHub stars~1.2k tokensUpdated 6 mo ago
    Documents & OfficeAuto-check passed
  • Cell Review

    yrui-cmd/Cell

    撰写或更新参考所属领域顶级期刊标准的完整文献综述。执行问题界定、期刊与同类综述对标、可追溯检索筛选、原始证据核查、矛盾分析、主题综合和引用核验。适用于“写综述”“文献综述”“literature review”“按顶刊标准综述”等任务。最终只交付完整 Word(.docx)综述,正文实际引用至少 30…

    106 GitHub stars~2.5k tokensUpdated yesterday
    Documents & OfficeAuto-check passed

Works with

Questions about Document Format Skills

What does Document Format Skills do?

Chinese Word document formatting toolkit for .docx/.doc/.wps workflows. Document Format Skills is an agent skill from KaguraNanaga/document-format-skills.wps workflows.

When should I use Document Format Skills?

Document Format Skills fits situations like: Codex needs to diagnose document formatting; fix mixed Chinese/English punctuation and spacing; apply official/academic/legal/custom presets; normalize tables and page numbers.

How do I install Document Format Skills in Claude Code?

Run `npx skills add KaguraNanaga/document-format-skills --skill document-format-skills -a claude-code`. Or copy the skill folder (the KaguraNanaga/document-format-skills repository) into .claude/skills/document-format-skills in your project. Claude Code loads it when a task matches its description.

How do I install Document Format Skills in Codex?

Run `npx skills add KaguraNanaga/document-format-skills --skill document-format-skills -a codex`. Or copy the skill folder (the KaguraNanaga/document-format-skills repository) into .agents/skills/document-format-skills in your project. Codex loads it when a task matches its description.

Can I use Document Format Skills in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KaguraNanaga/document-format-skills --skill document-format-skills -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/document-format-skills, .gemini/skills/document-format-skills, .github/skills/document-format-skills and .opencode/skills/document-format-skills in your project.

What does Document Format Skills need to run?

Going by SKILL.md and its folder, Document Format Skills needs Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3.

Does Document Format Skills access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Document Format Skills safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Document Format Skills use?

Document Format Skills is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Document Format Skills use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Document Format Skills?

Skills that share tags, products or a category with Document Format Skills: Journal Copyeditor DOCX (mikemikeqqq/copyeditor-skill, 292 stars), Suiko (nwiizo/suiko, 114 stars), Latex To Word Workflow (hajimi-kun/latex-to-word-workflow, 128 stars) and Review Revision (M1n-n9/paper-lifecycle, 692 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Document Format Skills?

KaguraNanaga (a GitHub user) maintains it in KaguraNanaga/document-format-skills, which has 234 GitHub stars. The repository was last updated on August 26, 2026.

Source: KaguraNanaga/document-format-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.