guowang-report-standardizer

One-click formatter for State Grid report documents. Converts user-uploaded Word (.docx / .doc) or pasted Markdown into a .docx that conforms to State Grid report document standards, unifying fonts, sizes, line spacing, first-line indent, heading levels, table/figure captions, standard page numbering (-N-), hierarchical TOC, and standardized sign-offs, and performs format checks. For office automation document formatting scenarios; use when users mention terms like “State Grid formatting,” “standardize report,” or “MD to State Grid Word.”

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "guowang-report-standardizer" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-04a271c66e07c409414a04d1967d8db57338a8ee15f8c9abef41286813ef383e. Verify the upstream source and version against https://skillhub.cn/skills/user_eeffca6a/guowang-report-standardizer before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

One-click formatter for State Grid report documents. Converts user-uploaded Word (.docx / .doc) or pasted Markdown into a .docx that conforms to State Grid report document standards, unifying fonts, sizes, line spacing, first-line indent, heading levels, table/figure captions, standard page numbering (-N-), hierarchical TOC, and standardized sign-offs, and performs format checks. For office automation document formatting scenarios; use when users mention terms like “State Grid formatting,” “standardize report,” or “MD to State Grid Word.”

0 Downloads

Introduction source: third_party · user_eeffca6a · 1.0.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: guowang-report-standardizer
version: 1.1.2
author: "(请替换为你的发布者名称/团队)"
tags: ["文档排版", "公文", "国网", "办公自动化", "Word"]
category: "文档处理"
description: |-
  国网汇报材料一键标准化排版:自动适配国家电网公文(汇报材料)格式,把用户上传的
  Word(.docx / 遗留 .doc)、或粘贴的 Markdown 文本一键转换为符合国网审核标准的
  .docx 文档。统一字体字号、行距、首行缩进、层级标题、表名/图名、标准页码(-N-)、
  层级目录与规范落款,并做格式校验。办公自动化 → 文档排版场景,当用户提到「国网排版」
  「标准化汇报」「MD 转国网 Word」「材料格式修正」「供电公司文档规范」时使用。
agent_created: true

国网汇报材料一键标准化排版

Overview

本技能把杂乱的汇报材料(Word、遗留 .doc、Markdown)一键重排为符合国家电网公文/汇报材料排版规范的 .docx,覆盖页面边距、字体字号、行距、首行缩进、四级标题、表名/图名、标准页码 -N-、可更新目录、规范落款,并附带格式校验报告。文档全程本地处理,不向云端上传任何业务内容。

所有排版规则集中在 scripts/config.json(文字配置,可改不改码),执行引擎为 scripts/standardize.py,规范依据见 references/guobiao_rules.md。

When to use

用户出现以下任一情形时启用:

  • 上传 .docx / .doc 汇报材料,要求按国网规范重新排版;
  • 粘贴或提供 Markdown 文本,要求「转成国网 Word」;
  • 提到关键词:国网排版、标准化汇报、MD 转国网 Word、材料格式修正、供电公司文档规范;
  • 需要给材料加标准页眉、页码、目录、落款。

执行流程

第 1 步:确认输入与运行环境

  1. 确认用户输入类型:
    • 本地 .docx 文件 → type=docx
    • 本地遗留 .doc(WPS/Word 97-2003) → type=doc(引擎用 doc_extract.py 抽文本后按标记识别层级)
    • 用户粘贴的 Markdown 文本(先落盘为 xxx.md) → type=md
  2. 询问用户是否需要添加页眉/落款:
    • 默认不自动添加右上角页眉标识和规范落款;
    • 若用户需要,请确认单位名(如「国网XX供电公司」)、是否需要落款日期、页眉文字;
    • 若不需要,执行时传入 --no-header --no-signature。
  3. 确保 Python 环境含依赖。优先使用受管 venv;若缺失,让脚本自举安装:
    • 依赖:python-docx markdown Pillow olefile
    • 受管 Python 示例路径(如本机存在可直接用): C:/Users/YUAN/.workbuddy/binaries/python/envs/default/Scripts/python.exe
    • 通用做法:用任意 python 执行 scripts/standardize.py,脚本会在缺失依赖时自动 pip install。

第 2 步:运行标准化引擎

在技能目录下执行(路径按实际调整):

python scripts/standardize.py \
  --input "用户输入文件或生成的md" \
  --type auto \
  --output "输出路径.docx" \
  --title "材料标题(可选,省略则自动识别首段)" \
  --org "国网XX供电公司(仅在用户确认需要落款/页眉时使用)" \
  --header "页眉文字(可选,省略用 org)" \
  --date "2026-03-15(落款日期,可选,省略用当天)"

常用开关:--toc always(强制生成目录,默认 auto:原文无目录则不生成)、--no-toc(不要目录)、--no-signature(不要落款)、--no-header(不要页眉)、--no-validate(跳过校验)、--config scripts/config.json(自定义规则)。

脚本会:

  1. 解析输入为统一内容块(标题 / 一级~四级标题 / 正文 / 表格 / 图片 / 图名表名),自动剔除 ○●• 等装饰性项目符号;
  2. 按 config.json 套用国网字体、字号、行距(正文固定 28.95 磅)、首行缩进 2 字符(用 firstLineChars=200 精确实现);
  3. 生成居中的 -N- 页码域;目录默认只在原文已含目录或用户显式要求时生成;页眉、落款仅在用户确认后添加;
  4. 表格自动加四号宋体加粗表名、表头加粗、跨页重复标题行、限宽,并应用国网标准三线表边框(顶线、表头底线、底线,无竖线);图片加四号宋体加粗图名、限宽居中;
  5. 输出 .docx 并打印格式校验报告。

第 3 步:交付与提醒

  • 把生成的 .docx 用 present_files 交付给用户预览/下载。
  • 提醒用户:在 Word / WPS 打开后右键「更新域」以刷新目录页码(域字段在打开时需手动刷新一次,属正常行为)。
  • 若用户机器未安装「方正小标宋_GBK / 仿宋_GB2312 / 楷体_GB2312」等字体,文档会按字体名请求,打开时由本机字体回退显示——结构、字号、缩进均合规,仅字形随本机字体变化。

规则微调(文字配置,无需改码)

编辑 scripts/config.json:

  • page.margins_cm 改边距;fonts.* 改字体/字号/加粗/对齐;
  • heading_markers 调整层级识别正则;structure.header_text / signature_org 改单位名;
  • image.max_width_cm / table.max_width_cm 改图片表格限宽;page_number.format 改页码样式。

参考资料

  • references/guobiao_rules.md:完整规范依据(页面、字体字号、层级标记、附件、页码、图表)。
  • scripts/config.json:当前生效的全部排版参数。
  • scripts/doc_extract.py:遗留 .doc 文本抽取(OLE2 字段表解析,兼容 WPS)。

隐私承诺

文档仅在本地解析与生成,云端不存储任何涉密业务内容。

Current listing version

1.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 解决国家电网公文标准化这一明确刚需,具备高频办公自动化价值
  • 支持多格式输入(.docx/.doc/Markdown)并输出合规 .docx,功能闭环完整
Trigger Precision92/100

Highlights

  • 触发词覆盖全面且边界清晰,包含「国网排版」「标准化汇报」「MD 转国网 Word」等核心关键词
Structure and Standards95/100

Areas to improve

  • description 内容重复 Reported severity: Minor

    顶层 frontmatter 与 skill_body 内部均包含完整 description,存在冗余

    Recommendation: 建议保留一处即可,避免维护不一致风险

Highlights

  • 执行流程分步清晰,含具体命令行示例与参数说明
  • frontmatter 完整,文档结构规范
Execution Reliability90/100

Highlights

  • 依赖管理健壮(支持自举 pip install),覆盖字体缺失等常见异常场景
  • 提供格式校验报告,增强输出可信度
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 47

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.