Communitygithub.com

94youshin/word-formatting-skill

word文档排版Skill,该 Skill 遵循 Agent Skills 开放规范,并分别以 GB/T 8567-2006《软件文档编制规范》和 GB/T 9704-2012《党政机关公文格式》为排版依据。

Qu'est-ce que word-formatting-skill ?

word-formatting-skill is a Claude Code agent skill that word文档排版Skill,该 Skill 遵循 Agent Skills 开放规范,并分别以 GB/T 8567-2006《软件文档编制规范》和 GB/T 9704-2012《党政机关公文格式》为排版依据。.

Compatible avec~Claude Code~Codex CLI~Cursor
npx skills add 94youshin/word-formatting-skill

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Word Formatting

Handle two modes and keep their rules separate:

Always read references/common-workflow.md. Read references/style-pack-schema.md only when changing style packs or the formatter.

Workflow

  1. Preserve the source DOCX and work on a new output path.

  2. Resolve mode, document subtype, user instructions, and any organization template. Apply priorities in this order: explicit user instruction, approved organization template, applicable national-standard requirement, project default.

  3. Inspect before modifying:

    python scripts/docx_tools.py inspect INPUT.docx --mode MODE --report inspection.json

    For an interface supplement:

    python scripts/docx_tools.py inspect INPUT.docx --mode software-document --document-type IDD --profile interface-change-note --report inspection.json

  4. Review reported risks. Do not infer or rewrite headings, identifiers, dates, addressees, signatures, seals, confidentiality markings, or document content without evidence or user direction.

  5. Apply the selected pack:

    python scripts/docx_tools.py format INPUT.docx OUTPUT.docx --mode MODE --report formatting.json

    Add --infer-headings only when numbered heading candidates have been reviewed.

  6. To create an ordinary official document from reviewed Markdown or TXT instead of reformatting an existing DOCX:

    python scripts/docx_tools.py compose-official INPUT.md OUTPUT.docx --title "标题" --recipient "主送机关" --issuer "发文机关" --issue-date "成文日期"

    Add --note once per reviewed annotation. DOCX input is deliberately blocked unless --extract-text-from-docx is supplied, because extraction discards tables, images, fields, and source styles. This composition command does not create red headers, document numbers, seals, page numbers, or edition records.

  7. Verify the output:

    python scripts/docx_tools.py verify OUTPUT.docx --mode MODE --report verification.json

  8. Render the output to PDF and page images with the available Word/document workflow. Inspect every page for overflow, bad pagination, table breaks, blank pages, clipped content, heading placement, and visual balance. Iterate until no critical issue remains or report the unresolved blocker.

Invariants

  • Never overwrite the source file.
  • Preserve text, images, fields, links, comments, tracked changes, section breaks, and numbering unless the user explicitly authorizes changes. The formatter changes styles and page geometry; unsupported constructs must be reported, not silently normalized.
  • A passing automated report means only that implemented checks passed. It is not legal, archival, printing, or standards certification.
  • For GB/T 8567-2006, do not invent missing technical content. Report missing or uncertain sections against the selected document type.
  • For interface supplements, distinguish baseline-document control, change completeness, protocol completeness, and layout risks. Do not silently promote numbered procedures or list items to headings.
  • For GB/T 9704-2012, do not fabricate a red header, document number, signer, seal, issuing authority, copy recipients, or issue date.
  • Center standalone image paragraphs and tables by default and clear inherited body indentation from image paragraphs. Preserve mixed text-and-image paragraphs for manual review rather than moving content automatically.
  • If required fonts are unavailable, use no silent substitution: keep the requested font name in the DOCX and report that visual verification on the target machine is required.

Skills associés