SGCC DOC Format for Openclaw

Openclaw Skills that automatically reformat Word documents into SGCC-compliant layout and styling.

diamantanee
v1.0.0
Aug 1, 2026
0
387
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install sgcc-doc-format

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install sgcc-doc-format using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is SGCC DOC Format?

This skill takes an uploaded .docx file and rewrites it to match the State Grid Corporation of China’s standardized Word formatting rules, including font families, heading hierarchy, line spacing, page numbering, tables, and Chinese quotation marks.

Openclaw Skills are especially useful here because the workflow is deterministic: the skill identifies document structure, applies the required SGCC formatting rules, generates a new output file, and returns it to the user with a concise recognition report.

SGCC DOC Format Use Cases

  • A user sends a Word document and asks to "format it to standard" or "apply SGCC formatting".
  • A document needs headings normalized to SGCC style rules before submission.
  • A report requires automatic table, title, and正文 typography cleanup.
  • A file contains a TOC that must be rebuilt and refreshed with clickable entries.
  • Page numbering must start in the body section using the -1- style while keeping cover and TOC pages unnumbered.
  • Quotes in content need conversion from English double quotes to Chinese quotes.
  • Existing .docx files need compliance checking without manually editing styles in Word.

How SGCC DOC Format Works

  1. The user provides a .docx document and requests SGCC standard formatting.
  2. The skill saves the input file into the workspace temporary directory for processing.
  3. A formatting script analyzes the document structure, identifies titles, subtitles, catalog sections,正文 blocks, tables, and quotation marks.
  4. The script applies the SGCC rules for fonts, font sizes, bolding, alignment, indentation, and line spacing.
  5. The skill rebuilds or inserts a table of contents if needed, and configures Word to refresh fields on open.
  6. The output document is generated as a new .docx file without overwriting the original.
  7. The skill returns the formatted file to the user and includes a short recognition summary such as title counts, heading levels, and table counts.

SGCC DOC Format Setup

  1. Ensure the input file is a .docx document. If the source is legacy .doc, convert it to .docx first.
  2. Place the file in the workspace path used by Openclaw Skills, for example ~/.openclaw/workspace/tmp/.
  3. Run the formatter script:
python3 ~/.openclaw/workspace/skills/sgcc-doc-format/scripts/format_sgcc.py input.docx output.docx
  1. Optional parameters:
    • output.docx: optional; if omitted, the default output is input_规范格式.docx
    • --no-auto-toc: disables automatic TOC insertion
  2. Open the generated file in Microsoft Word to verify fonts exist on the client system and to refresh fields if needed.
  3. If the TOC does not update automatically, use Word’s full refresh shortcut (F9) after opening the document.

SGCC DOC Format Data Schema & Taxonomy

The skill is document-structure-driven and produces a new .docx output with formatting metadata embedded in Word styles and fields.

Data Element Purpose Notes
Input file Source document to be normalized Must be .docx
Output file Reformatted SGCC-compliant document Saved as a new file, not overwritten
Title blocks Main title, subtitle, and heading groups Detected from styles and paragraph patterns
Heading levels Structured sections in the document Mapped to Heading 1-4 semantics
TOC field Clickable table of contents Uses Word TOC field syntax
Page section metadata Cover, TOC, and body page numbering rules Body pages start from -1- style numbering
Table formatting Header/body table styling Centered tables with SGCC typography rules
Quote normalization English quotes converted to Chinese quotes Paragraph-based replacement logic

SGCC formatting taxonomy

  • Main title: 方正小标宋_GBK, 22 pt, centered, 28磅 spacing
  • Subtitle: 方正楷体_GBK, 16 pt, bold, centered
  • Catalog title: 方正黑体_GBK, 22 pt, centered
  • 一级标题: 方正黑体_GBK, 16 pt, left aligned, numbered 一、
  • 二级标题: 方正楷体_GBK, 16 pt, left aligned, numbered (一)
  • 三级标题: 方正仿宋_GBK, 16 pt, left aligned, numbered 1.
  • 四级标题: 方正仿宋_GBK, 16 pt, left aligned, numbered (1)
  • 正文: 方正仿宋_GBK, 16 pt, left aligned
  • Page numbers: 方正仿宋_GBK, 14 pt, centered, -1- format

SGCC DOC Format Advanced Features

  • Automatic detection of main title, subtitle, catalog title, and正文 start based on paragraph structure.
  • Heading recognition uses Word styles first, then falls back to SGCC numbering patterns.
  • Automatic TOC insertion with clickable Word TOC fields (TOC \o "1-4" \h \z \u).
  • Field update configuration so Word refreshes the TOC when the file opens.
  • Separate section handling for cover/TOC pages versus正文 page numbering.
  • Table-aware formatting that applies different fonts to headers and body cells.
  • Quote normalization with paragraph-level handling to preserve odd counts and avoid data loss.
  • Non-destructive output generation: the original document is preserved, and Openclaw Skills return a new formatted file.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*