{"id":"12602d75-4524-4d50-9ff5-8943b3531ccb","entityType":"agent","slug":"clawhub-a-lhliang-gov-doc-writing","name":"国央企word文档","canonicalUrl":"https://www.xpersona.co/agent/clawhub-a-lhliang-gov-doc-writing","canonicalPath":"/agent/clawhub-a-lhliang-gov-doc-writing","generatedAt":"2026-10-10T10:56:23.457Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T06:22:50.394Z","emptyReason":null},"description":"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。 Skill: 国央企word文档 Owner: a-lhliang Summary: 此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。 Tags: latest:1.12.4 Version history: v1.12.4 | 2026-08-10T09:36:28.444Z | user - 修订了落款间隔3行。 v1.12.2 | 2026-07-28T09:44:18.167Z | user 1、新增附件列表（正文空一行）及附件分页； 2、新增首页标题下空一行； 3、优化了文档结构。 v1.10.0 | 2026-06-04T06:14:10.507Z | user “落款-部门”“落款-日期”两类落款样式，及右下对齐规范。 v1.7.1 | 2026-05-26T01:51","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s176g3m7mbt4d359wwkdaq0g1585j937:gov-doc-writing","sourceUrl":"https://clawhub.ai/a-lhliang/gov-doc-writing","homepage":"https://clawhub.ai/a-lhliang/skills/gov-doc-writing","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/a-lhliang/gov-doc-writing","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/a-lhliang/skills/gov-doc-writing","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。 Skill: 国央企word文档 Owner: a-lhliang Summary: 此技能用于创建符合中国政府及央企规范"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:22:50.394Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:22:50.394Z","emptyReason":null},"stars":null,"forks":null,"downloads":1623,"packageName":null,"latestVersion":"1.12.4","tractionLabel":"1.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:22:50.393Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T06:22:50.394Z","lastCrawledAt":"2026-10-10T06:22:50.393Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T06:22:50.393Z","lastVerifiedAt":null,"highlights":[{"version":"1.12.4","createdAt":"2026-08-10T09:36:28.444Z","changelog":"- 修订了落款间隔3行。","fileCount":388,"zipByteSize":2002449},{"version":"1.12.2","createdAt":"2026-07-28T09:44:18.167Z","changelog":"1、新增附件列表（正文空一行）及附件分页； 2、新增首页标题下空一行； 3、优化了文档结构。","fileCount":8,"zipByteSize":24614},{"version":"1.10.0","createdAt":"2026-06-04T06:14:10.507Z","changelog":"“落款-部门”“落款-日期”两类落款样式，及右下对齐规范。","fileCount":363,"zipByteSize":1945742},{"version":"1.7.1","createdAt":"2026-05-26T01:51:02.740Z","changelog":"## [1.7.1] - 2026-05-26 ### 修复 - **Bug 7：Word 样式窗格中「正文」（Normal）样式的行距不是28磅固定** - 问题：`docDefaults` 中仅设置了 `<w:rPrDefault>`（字体默认值），`<w:pPrDefault/>` 为空，导致 Normal（正文）样式缺少段落的行距定义，Word 样式窗格中显示为默认单倍行距而非固定28磅。 - 修复：在 `createDocument` 的 `styles.default.document` 中增加 `paragraph` 键，设置 `spacing: { before: 0, after: 0, line: 560, lineRule: \"exact\" }`。这会填充 `<w:pPrDefault>`，使 Normal 样式自动继承28磅固定行距。 - 影响函数：`createDocument` ## [1.7.0] - 2026-05-26 ### 修复 - **Bug 6：正文及标题中西文字体不稳定，西文未显示 Times New Roman** - 问题根因一：`createTextRunsFromSegments` 中 `useDirectFormatting = false` 时，所有 `TextRun` 只写 `text` 字段，不包含任何 `<w:rPr>`，依赖段落样式 `run` 字段的字体继承。Word 对无 rPr 的 TextRun 在中西文混排时字体应用不稳定，导致西文片段（NETCONF、BIN 等）实际使用方正仿宋而非 Times New Roman。 - 问题根因二：`createDocument` 的 `styles.default.document.run.font` 传入了字符串（`FZFangSong-Z02S`），导致 `docDefaults` 中 `w:ascii` 和 `w:hAnsi` 也被设置为方正仿宋，而非 Times New Roman，进一步加剧了西文字体错误。 - 修复一：`createTextRunsFromSegments` 改为**始终为每个 TextRun 明确写入字体**：西文片段写 `ascii/hAnsi/cs = Times New Roman`，中文片段写 `eastAsia = 对应中文字体` + `ascii/hAnsi/cs = Times New Roman`。行距、缩进等段落属性仍由段落样式控制。 - 修复二：`createDocument` 的 `styles.default.document.run.font` 改为对象格式：`{ eastAsia: FZFangSong, ascii: Times New Roman, hAnsi: Times New Roman, cs: Times New Roman }`，修正 `docDefaults` 中西文字体。 - 废弃 `useDirectFormatting` 参数（保留签名兼容性，不再区分两种模式）。 - 影响函数：`createTextRunsFromSegments`、`createDocument`","fileCount":7,"zipByteSize":16933},{"version":"1.6.0","createdAt":"2026-04-26T05:35:57.675Z","changelog":"- Added detailed documentation for creating Word documents aligned with Chinese government and central enterprise standards, including full style, margin, font, and formatting specifications. - Provided example usage via JavaScript API and CLI, with step-by-step code samples. - Documented table and image formatting rules in detail, specifying style names, color schema, vertical/horizontal alignment, and line spacing. - Clarified document property requirements (e.g., removing author metadata, page numbering, no cover page). - Included tips on font size conversions, text normalization, and style application for compliant output. - Listed core script location and modular functions for integrating skill in automation workflows.","fileCount":7,"zipByteSize":17310}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s176g3m7mbt4d359wwkdaq0g1585j937:gov-doc-writing","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T10:56:23.454Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-a-lhliang-gov-doc-writing/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T06:22:50.394Z","emptyReason":null},"readme":"Skill: 国央企word文档\n\nOwner: a-lhliang\n\nSummary: 此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。\n\nTags: latest:1.12.4\n\nVersion history:\n\nv1.12.4 | 2026-08-10T09:36:28.444Z | user\n\n- 修订了落款间隔3行。\n\nv1.12.2 | 2026-07-28T09:44:18.167Z | user\n\n1、新增附件列表（正文空一行）及附件分页；\n2、新增首页标题下空一行；\n3、优化了文档结构。\n\nv1.10.0 | 2026-06-04T06:14:10.507Z | user\n\n“落款-部门”“落款-日期”两类落款样式，及右下对齐规范。\n\nv1.7.1 | 2026-05-26T01:51:02.740Z | user\n\n## [1.7.1] - 2026-05-26\n\n### 修复\n\n- **Bug 7：Word 样式窗格中「正文」（Normal）样式的行距不是28磅固定**\n  - 问题：`docDefaults` 中仅设置了 `<w:rPrDefault>`（字体默认值），`<w:pPrDefault/>` 为空，导致 Normal（正文）样式缺少段落的行距定义，Word 样式窗格中显示为默认单倍行距而非固定28磅。\n  - 修复：在 `createDocument` 的 `styles.default.document` 中增加 `paragraph` 键，设置 `spacing: { before: 0, after: 0, line: 560, lineRule: \"exact\" }`。这会填充 `<w:pPrDefault>`，使 Normal 样式自动继承28磅固定行距。\n  - 影响函数：`createDocument`\n\n## [1.7.0] - 2026-05-26\n\n### 修复\n\n- **Bug 6：正文及标题中西文字体不稳定，西文未显示 Times New Roman**\n  - 问题根因一：`createTextRunsFromSegments` 中 `useDirectFormatting = false` 时，所有 `TextRun` 只写 `text` 字段，不包含任何 `<w:rPr>`，依赖段落样式 `run` 字段的字体继承。Word 对无 rPr 的 TextRun 在中西文混排时字体应用不稳定，导致西文片段（NETCONF、BIN 等）实际使用方正仿宋而非 Times New Roman。\n  - 问题根因二：`createDocument` 的 `styles.default.document.run.font` 传入了字符串（`FZFangSong-Z02S`），导致 `docDefaults` 中 `w:ascii` 和 `w:hAnsi` 也被设置为方正仿宋，而非 Times New Roman，进一步加剧了西文字体错误。\n  - 修复一：`createTextRunsFromSegments` 改为**始终为每个 TextRun 明确写入字体**：西文片段写 `ascii/hAnsi/cs = Times New Roman`，中文片段写 `eastAsia = 对应中文字体` + `ascii/hAnsi/cs = Times New Roman`。行距、缩进等段落属性仍由段落样式控制。\n  - 修复二：`createDocument` 的 `styles.default.document.run.font` 改为对象格式：`{ eastAsia: FZFangSong, ascii: Times New Roman, hAnsi: Times New Roman, cs: Times New Roman }`，修正 `docDefaults` 中西文字体。\n  - 废弃 `useDirectFormatting` 参数（保留签名兼容性，不再区分两种模式）。\n  - 影响函数：`createTextRunsFromSegments`、`createDocument`\n\nv1.6.0 | 2026-04-26T05:35:57.675Z | user\n\n- Added detailed documentation for creating Word documents aligned with Chinese government and central enterprise standards, including full style, margin, font, and formatting specifications.\n- Provided example usage via JavaScript API and CLI, with step-by-step code samples.\n- Documented table and image formatting rules in detail, specifying style names, color schema, vertical/horizontal alignment, and line spacing.\n- Clarified document property requirements (e.g., removing author metadata, page numbering, no cover page).\n- Included tips on font size conversions, text normalization, and style application for compliant output.\n- Listed core script location and modular functions for integrating skill in automation workflows.\n\nArchive index:\n\nArchive v1.12.4: 388 files, 2002449 bytes\n\nFiles: _skillhub_meta.json (89b), CHANGELOG.md (10636b), node_modules/.bin/nanoid (1508b), node_modules/.bin/xml-js (5360b), node_modules/.package-lock.json (7865b), node_modules/@types/node/assert.d.ts (40091b), node_modules/@types/node/assert/strict.d.ts (2828b), node_modules/@types/node/async_hooks.d.ts (26213b), node_modules/@types/node/buffer.buffer.d.ts (22610b), node_modules/@types/node/buffer.d.ts (82641b), node_modules/@types/node/child_process.d.ts (63684b), node_modules/@types/node/cluster.d.ts (21212b), node_modules/@types/node/compatibility/iterators.d.ts (1303b), node_modules/@types/node/console.d.ts (6758b), node_modules/@types/node/constants.d.ts (820b), node_modules/@types/node/crypto.d.ts (172141b), node_modules/@types/node/dgram.d.ts (25654b), node_modules/@types/node/diagnostics_channel.d.ts (25053b), node_modules/@types/node/dns.d.ts (36127b), node_modules/@types/node/dns/promises.d.ts (21112b), node_modules/@types/node/domain.d.ts (7510b), node_modules/@types/node/events.d.ts (48918b), node_modules/@types/node/fs.d.ts (197562b), node_modules/@types/node/fs/promises.d.ts (57210b), node_modules/@types/node/globals.d.ts (5132b), node_modules/@types/node/globals.typedarray.d.ts (4864b), node_modules/@types/node/http.d.ts (97345b), node_modules/@types/node/http2.d.ts (118435b), node_modules/@types/node/https.d.ts (16993b), node_modules/@types/node/index.d.ts (5031b), node_modules/@types/node/inspector.d.ts (12372b), node_modules/@types/node/inspector.generated.d.ts (228065b), node_modules/@types/node/inspector/promises.d.ts (1681b), node_modules/@types/node/LICENSE (1141b), node_modules/@types/node/module.d.ts (34455b), node_modules/@types/node/net.d.ts (42409b), node_modules/@types/node/os.d.ts (19438b), node_modules/@types/node/package.json (4509b), node_modules/@types/node/path.d.ts (7888b), node_modules/@types/node/path/posix.d.ts (194b), node_modules/@types/node/path/win32.d.ts (194b), node_modules/@types/node/perf_hooks.d.ts (24609b), node_modules/@types/node/process.d.ts (109502b), node_modules/@types/node/punycode.d.ts (5458b), node_modules/@types/node/querystring.d.ts (7130b), node_modules/@types/node/quic.d.ts (29946b), node_modules/@types/node/readline.d.ts (22372b), node_modules/@types/node/readline/promises.d.ts (6444b), node_modules/@types/node/README.md (1582b), node_modules/@types/node/repl.d.ts (18464b), node_modules/@types/node/sea.d.ts (6638b), node_modules/@types/node/sqlite.d.ts (51465b), node_modules/@types/node/stream.d.ts (89875b), node_modules/@types/node/stream/consumers.d.ts (1572b), node_modules/@types/node/stream/promises.d.ts (7347b), node_modules/@types/node/stream/web.d.ts (11988b), node_modules/@types/node/string_decoder.d.ts (2814b), node_modules/@types/node/test.d.ts (104429b), node_modules/@types/node/test/reporters.d.ts (4046b), node_modules/@types/node/timers.d.ts (7948b), node_modules/@types/node/timers/promises.d.ts (3785b), node_modules/@types/node/tls.d.ts (58343b), node_modules/@types/node/trace_events.d.ts (8931b), node_modules/@types/node/ts5.6/buffer.buffer.d.ts (21861b), node_modules/@types/node/ts5.6/compatibility/float16array.d.ts (3811b), node_modules/@types/node/ts5.6/globals.typedarray.d.ts (1238b), node_modules/@types/node/ts5.6/index.d.ts (5362b), node_modules/@types/node/ts5.7/compatibility/float16array.d.ts (3872b), node_modules/@types/node/ts5.7/index.d.ts (5349b), node_modules/@types/node/tty.d.ts (12238b), node_modules/@types/node/url.d.ts (24768b), node_modules/@types/node/util.d.ts (66168b), node_modules/@types/node/util/types.d.ts (23832b), node_modules/@types/node/v8.d.ts (40754b), node_modules/@types/node/vm.d.ts (55418b), node_modules/@types/node/wasi.d.ts (9125b), node_modules/@types/node/web-globals/abortcontroller.d.ts (1989b), node_modules/@types/node/web-globals/blob.d.ts (902b), node_modules/@types/node/web-globals/console.d.ts (149b), node_modules/@types/node/web-globals/crypto.d.ts (1449b)\n\nFile v1.12.4:SKILL.md\n\n---\nname: \"国央企word文档\"\ndescription: \"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。\"\nauthor: \"刘洪亮\"\nversion: \"1.12.4\"\n---\n\n# 国央企Work文档创建技能\n\n本技能用于创建符合中国政府及央企规范的Word文档(.docx)，使用Microsoft Word最新格式。\n\n## 文档格式规范\n\n### 页面设置\n\n| 属性 | 值 |\n|------|-----|\n| 纸张 | A4 |\n| 上边距 | 3.7厘米 |\n| 下边距 | 3.5厘米 |\n| 左边距 | 2.8厘米 |\n| 右边距 | 2.6厘米 |\n| 页码 | 居中显示，宋体四号 |\n\n### 字体规范\n\n| 样式 | 中文字体 | 西文字体 | 字号 |\n|------|----------|----------|------|\n| 首页大标题 | 方正小标宋简体 (FZXiaoBiaoSong-B05S) | Times New Roman | 小二号 (18pt) |\n| 正文 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 正文无缩进 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 一级标题 | 黑体 | Times New Roman | 小三号 (15pt) |\n| 二级标题 | 楷体 | Times New Roman | 小三号 (15pt) |\n| 三级标题 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) 加粗 |\n| 落款-部门 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 落款-日期 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 页码 | 宋体 | - | 四号 (14pt) |\n| 表格 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小五号 (9pt) |\n\n### 行间距\n\n| 样式 | 行间距 |\n|------|--------|\n| 首页大标题 | 固定28磅 |\n| 正文 | 固定28磅 |\n| 正文无缩进 | 固定28磅 |\n| 一级标题 | 固定28磅 |\n| 二级标题 | 固定28磅 |\n| 三级标题 | 固定28磅 |\n| 落款-部门 | 固定28磅 |\n| 落款-日期 | 固定28磅 |\n| 图片 | 单倍行距 |\n| 表格 | 单倍行距 |\n\n### 段落格式\n\n| 样式 | 序号格式 | 首行缩进 | 大纲级别 |\n|------|----------|----------|----------|\n| 正文有缩进 | 无 | 2字符 | - |\n| 正文无缩进 | 无 | 0 | 1级 |\n| 一级的标题 | 一、二、三、 | 2字符 | 1级 |\n| 二级的标题 | （一）（二）（三） | 2字符 | 2级 |\n| 三级的标题 | 1.2.3. | 2字符 | 3级 |\n| 落款-部门 | 无 | 无 | - |\n| 落款-日期 | 无 | 无 | - |\n\n## 样式名称\n\n创建文档时，必须使用以下样式名称：\n\n- `首页大标题` - 首页大标题\n- `正文有缩进` - 正文段落\n- `正文无缩进` - 无缩进正文段落（大纲级别一级，用于附件分页标题等需要出现在导航窗格的段落）\n- `一级的标题` - 一级标题\n- `二级的标题` - 二级标题\n- `三级的标题` - 三级标题\n- `图片样式` - 图片\n- `表格样式` - 表格\n- `落款-部门` - 部门落款（右下对齐）\n- `落款-日期` - 日期落款（右下对齐，自动与部门左对齐）\n- `页码样式` - 页脚页码\n\n## 使用方法\n\n### 方式一：使用JavaScript脚本创建文档\n\n```javascript\nconst {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  createAttachmentBlock,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('/Users/lhliang/.workbuddy/skills/workbuddy-skill-1777171174172/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1.第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2.第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths: [2000, 2000, 2000] }\n    ),\n  ]\n});\n\n// 生成文件\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('output.docx', buffer);\n});\n```\n\n### 方式二：使用CLI命令\n\n```bash\nnode scripts/create_gov_doc.js output.docx '{\n  \"title\": \"文档标题\",\n  \"body\": [\n    {\"type\": \"heading1\", \"text\": \"第一章\", \"number\": 0},\n    {\"type\": \"paragraph\", \"text\": \"正文内容\"},\n    {\"type\": \"table\", \"rows\": [...], \"columnWidths\": [2000, 2000, 2000]}\n  ]\n}'\n```\n\n## 表格规范\n\n- 表格宽度自动适应窗口（百分比100%），无需手动计算列宽\n- 列宽比例通过 `columnWidths` 参数控制（DXA 相对值，实际宽度自动缩放）\n- 表头：灰色底 (#D9D9D9)、加粗、居中\n- 内容：白色底、居中、小五号 (9pt) 字体\n- 边框：单线黑色\n\n```javascript\n// 表格示例\nconst border = { style: BorderStyle.SINGLE, size: 1, color: \"000000\" };\nconst borders = { top: border, bottom: border, left: border, right: border };\n\n// 表头行\nnew TableRow({\n  tableHeader: true,\n  children: [\n    new TableCell({\n      borders,\n      shading: { fill: \"D9D9D9\", type: ShadingType.CLEAR },\n      children: [new Paragraph({ children: [new TextRun({ text: \"表头\", bold: true })] })]\n    })\n  ]\n});\n```\n\n## 落款规范\n\n- 落款（部门名称 + 日期）放文档右下角，与上方正文间隔三行空行\n- 两行均右顶格对齐，不加缩进；日期自然向左延伸\n- 部门名称使用 `落款-部门` 样式，日期使用 `落款-日期` 样式，均为方正仿宋小三号\n- 使用 `createSignatureBlock()` 一键生成\n\n```javascript\nconst { createSignatureBlock } = require('...');\n\n// 一键创建落款块（含三行空行 + 部门名称 + 日期）\nsections.push(...createSignatureBlock('科技创新部', '2026年6月'));\n```\n\n## 附件规范\n\n- **是否添加附件**：落款上方的段落是否包含\"附件\"列表，应根据文档需求和内容判断\n  - 文档正文引用了具体材料、表格、说明、名单等独立内容时，应添加附件列表\n  - 文档内容自包含、不引用其他材料时，不必添加附件\n- **位置与样式**：附件位于正文之后、落款之前，全部使用 `正文有缩进` 样式（方正仿宋小三号、固定28磅行距）\n- **附件名称后不加任何标点符号**（不加句号、顿号、逗号等）\n- **格式约定**：\n  - 第一个附件写在\"附件：\"段内：\"附件：1.附件名称\"（冒号后直接跟序号，不加空格），使用正文默认首行缩进 2 字符\n  - 只有 1 个附件时，段落保持正文默认首行缩进 2 字符\n  - 从附件 2 开始，覆盖首行缩进为 5 字符，使序号 \"2.\" 与第一段 \"1.\" 纵向对齐\n- 使用 `createAttachmentBlock()` 一键生成\n\n### 单附件示例\n\n```\n附件：1.科技创新工作周报表\n```\n\n### 多附件示例\n\n```\n附件：1.科技创新工作周报表\n      2.项目实施情况明细表\n      3.下一步工作计划\n```\n\n```javascript\nconst { createAttachmentBlock } = require('...');\n\n// 单附件\nsections.push(...createAttachmentBlock(['科技创新工作周报表']));\n\n// 多附件\nsections.push(...createAttachmentBlock([\n  '科技创新工作周报表',\n  '项目实施情况明细表',\n  '下一步工作计划',\n]));\n```\n\n### 在 createGovDocument 中使用\n\n```javascript\nconst sections = [\n  // ... 正文段落 ...\n  // ... 落款 ...\n];\n\n// 在正文和落款之间插入附件\nsections.push({ type: 'attachment', attachments: ['附件标题一', '附件标题二'] });\n```\n\n### 附件独立分页\n\n每个附件可在文档最后（落款之后）独占一页，用于手动插入图片或表格等实际内容，每页标题为\"附件1\"\"附件2\"……依次排列。使用 `createAttachmentPages()` 一键生成。\n\n```javascript\nconst { createAttachmentPages } = require('...');\n\n// 在落款之后插入附件独立分页\nsections.push(...createAttachmentPages(['附件A标题', '附件B标题']));\n```\n\n**格式**：分页符 → \"附件1\"（`正文无缩进` 样式、加粗、大纲一级，出现在 Word 导航窗格）→ `正文有缩进` 空行供插入内容。\n\n在 `createGovDocument` 中使用：\n\n```javascript\nsections.push({ type: 'attachment_pages', attachments: ['附件标题一', '附件标题二'] });\n```\n\n## 图片规范\n\n- 行间距：单倍行距\n- 对齐：居中\n- 样式名称：`图片样式`\n\n## 文档属性\n\n- 删除文档作者（`dc:creator` 和 `lastModifiedBy` 留空或不写入）\n- 在创建文档时不要设置 `creator` 属性，或设置为空字符串\n\n## 完整示例\n\n```javascript\nconst fs = require('fs');\nconst {\n  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,\n  Footer, BorderStyle, WidthType, ShadingType, VerticalAlign,\n  PageNumber, ImageRun, AlignmentType, HeadingLevel, LevelFormat,\n  createTitleParagraph, createBodyParagraph, createLevel1Heading,\n  createLevel2Heading, createLevel3Heading, createTable,\n  createImageParagraph, createSignatureBlock, createAttachmentBlock,\n  createAttachmentPages,\n  createDocument, CHINESE_FONTS, FONT_SIZES,\n  CONTENT_WIDTH, PAGE_MARGINS, LINE_SPACING_EXACT_28\n} = require('/Users/lhliang/.workbuddy/skills/workbuddy-skill-1777171174172/scripts/create_gov_doc.js');\n\n// 内容构建\nconst sections = [\n  createTitleParagraph('关于XXX工作的报告'),\n\n  createLevel1Heading('一、基本情况', 0),\n  createBodyParagraph('这里是正文内容，详细描述基本情况。'),\n  createBodyParagraph('继续描述相关内容和细节。'),\n\n  createLevel1Heading('二、主要做法', 1),\n  createLevel2Heading('（一）加强组织领导', 0),\n  createBodyParagraph('具体做法描述...'),\n  createLevel2Heading('（二）完善制度建设', 1),\n  createBodyParagraph('制度建设内容...'),\n\n  createLevel1Heading('三、存在问题', 2),\n  createBodyParagraph('当前存在以下问题：'),\n  createLevel3Heading('问题一', 0),\n  createBodyParagraph('问题一的具体描述。'),\n  createLevel3Heading('问题二', 1),\n  createBodyParagraph('问题二的具体描述。'),\n\n  createLevel1Heading('四、下一步计划', 3),\n  createBodyParagraph('针对以上问题，计划采取以下措施...'),\n\n  // 附件列表（位置：正文与落款之间；按需添加）\n  ...createAttachmentBlock([\n    '科技创新工作周报表',\n    '项目实施情况明细表',\n    '下一步工作计划',\n  ]),\n\n  // 落款（右下对齐，与正文间隔三行空行）\n  ...createSignatureBlock('科技创新部', '2026年6月'),\n\n  // 附件独立分页（每个附件独占一页，供插入图片/表格）\n  ...createAttachmentPages([\n    '科技创新工作周报表',\n    '项目实施情况明细表',\n    '下一步工作计划',\n  ]),\n];\n\n// 创建文档（不设置作者）\nconst doc = createDocument({\n  title: '关于XXX工作的报告',\n  sections\n});\n\n// 生成并保存\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('report.docx', buffer);\n  console.log('文档已生成: report.docx');\n});\n```\n\n## 注意事项\n\n1. **字号转换**：Word中的\"号\"转换为半磅值（如小三号=30，小二号=36，四号=28，小五号=18）\n2. **行间距固定28磅**：line值设置为560（28 × 20），lineRule设置为\"exact\"\n3. **首行缩进**：使用 `indent: { firstLine: charWidth * 2 }`，字符宽度约等于字号的一半\n4. **页码**：仅在页脚居中显示，使用宋体四号\n5. **不要封面**：文档从首页大标题开始，不创建封面页\n6. **文档作者**：不设置或留空\n7. **双引号自动规范化**：所有文本内容中的 ASCII 双引号 `\"` 会自动替换为配对的中文双引号 `\"\"`（`\\u201c`/`\\u201d`），无需手动转换\n8. **中西文字体分段写入**：`createTextRunsFromSegments` 对每个 TextRun 均明确写入字体（西文：Times New Roman；中文：对应中文字体 + Times New Roman）。**不要**使用 `useDirectFormatting: false` 模式（已废弃），始终明确写字体以保证 Word 渲染稳定。\n9. **docDefaults 字体**：`createDocument` 的 `styles.default.document.run.font` 必须使用对象格式（`{ eastAsia, ascii, hAnsi, cs }`），不能传字符串，否则 `docDefaults` 中 ascii/hAnsi 会被设为中文字体导致西文渲染错误。\n10. **pPrDefault 行距**：`createDocument` 的 `styles.default.document.paragraph` 必须设置 `spacing: { before: 0, after: 0, line: 560, lineRule: \"exact\" }`，确保 `pPrDefault` 不为空。这使 Normal（正文）样式在 Word 样式窗格中显示正确的28磅固定行距。无需额外定义 Normal 样式，各自定义样式通过 `basedOn: \"Normal\"` 继承后自行覆盖 spacing。\n\n## 相关文件\n\n- `scripts/create_gov_doc.js` - 核心创建函数库\n\nFile v1.12.4:node_modules/@types/node/README.md\n\n# Installation\r\n> `npm install --save @types/node`\r\n\r\n# Summary\r\nThis package contains type definitions for node (https://nodejs.org/).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.\r\n\r\n### Additional Details\r\n * Last updated: Fri, 03 Apr 2026 11:14:41 GMT\r\n * Dependencies: [undici-types](https://npmjs.com/package/undici-types)\r\n\r\n# Credits\r\nThese definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig).\n\nFile v1.12.4:node_modules/core-util-is/README.md\n\n# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n\nFile v1.12.4:node_modules/docx/README.md\n\n<p align=\"center\">\n    <img src=\"./logo/logo-animate.svg\" width=\"100%\" height=\"300\" alt=\"clippy the assistant\">\n</p>\n\n<p align=\"center\">\n    Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.\n</p>\n\n---\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads per month][downloads-image]][downloads-url]\n[![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url]\n[![Known Vulnerabilities][snky-image]][snky-url]\n[![PRs Welcome][pr-image]][pr-url]\n[![codecov][codecov-image]][codecov-url]\n[![Docx.js Editor][docxjs-editor-image]][docxjs-editor-url]\n\n<p align=\"center\">\n    <img src=\"https://i.imgur.com/QeL1HuU.png\" alt=\"drawing\"/>\n</p>\n\n# Demo\n\n## Browser\n\nHere are examples of `docx` being used with basic `HTML/JS` in a browser environment:\n\n-   https://codepen.io/dolanmiu/pen/RwNeObg\n-   https://jsfiddle.net/dolanmiu/onadx1gu/\n\nHere are examples of `docx` working in `Angular`:\n\n-   https://stackblitz.com/edit/angular-docx\n-   https://stackblitz.com/edit/angular-wmd6k3\n\nHere are examples of `docx` working in `React`:\n\n-   https://stackblitz.com/edit/react-docx\n-   https://stackblitz.com/edit/react-docx-images (adding images to Word Document)\n\nHere is an example of `docx` working in `Vue.js`:\n\n-   https://stackblitz.com/edit/vuejs-docx\n\n## Node\n\nPress `endpoint` on the `RunKit` website:\n\n![RunKit Instructions](https://user-images.githubusercontent.com/2917613/38582539-f84311b6-3d07-11e8-90db-5885ae02c3c4.png)\n\n-   https://runkit.com/dolanmiu/docx-demo1 - Simple paragraph and text\n-   https://runkit.com/dolanmiu/docx-demo2 - Advanced Paragraphs and text\n-   https://runkit.com/dolanmiu/docx-demo3 - Bullet points\n-   https://runkit.com/dolanmiu/docx-demo4 - Simple table\n-   https://runkit.com/dolanmiu/docx-demo5 - Images\n-   https://runkit.com/dolanmiu/docx-demo6 - Margins\n-   https://runkit.com/dolanmiu/docx-demo7 - Landscape\n-   https://runkit.com/dolanmiu/docx-demo8 - Header and Footer\n-   https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx**\n\nMore [here](https://github.com/dolanmiu/docx/tree/master/demo)\n\n# How to use & Documentation\n\nPlease refer to the [documentation at https://docx.js.org/](https://docx.js.org/) for details on how to use this library, examples and much more!\n\n# Playground\n\nExperience `docx` in action through [Docx.js Editor][docxjs-editor-url], an interactive playground where you can code and preview the results in real-time.\n\n# Examples\n\nCheck the [demo folder](https://github.com/dolanmiu/docx/tree/master/demo) for examples.\n\n# Contributing\n\nRead the contribution guidelines [here](https://docx.js.org/#/contribution-guidelines).\n\n# Used by\n\n[<img src=\"https://i.imgur.com/zy5qWmI.png\" alt=\"drawing\" height=\"50\"/>](https://hfour.com/)\n[<img src=\"https://i.imgur.com/OYP5tgS.png\" alt=\"drawing\" height=\"50\"/>](https://fuzzproductions.com/)\n[<img src=\"https://i.imgur.com/zUDMfZ3.png\" alt=\"drawing\" height=\"50\"/>](https://www.mettzer.com/)\n[<img src=\"https://i.imgur.com/wtNB1uq.png\" alt=\"drawing\" height=\"50\"/>](https://www.wisedoc.net/)\n[<img src=\"https://i.imgur.com/suiH2zc.png\" alt=\"drawing\" height=\"50\"/>](https://www.dabblewriter.com/)\n[<img src=\"https://i.imgur.com/1LjuK2M.png\" alt=\"drawing\" height=\"50\"/>](https://turbopatent.com/)\n[<img src=\"https://i.imgur.com/dHMg0wF.gif\" alt=\"drawing\" height=\"50\"/>](http://www.madisoncres.com/)\n[<img src=\"https://i.imgur.com/QEZXU5b.png\" alt=\"drawing\" height=\"50\"/>](https://www.beekast.com/)\n[<img src=\"https://i.imgur.com/XVU6aoi.png\" alt=\"drawing\" height=\"50\"/>](https://herraizsoto.com/)\n[<img src=\"https://i.imgur.com/fn1xccG.png\" alt=\"drawing\" height=\"50\"/>](http://www.ativer.com.br/)\n[<img src=\"https://i.imgur.com/cmykN7c.png\" alt=\"drawing\"/>](https://www.arity.co/)\n[<img src=\"https://i.imgur.com/PXo25um.png\" alt=\"drawing\" height=\"50\"/>](https://www.circadianrisk.com/)\n[<img src=\"https://i.imgur.com/AKGhtlh.png\" alt=\"drawing\"/>](https://lexense.com/)\n[<img src=\"https://i.imgur.com/9tqJaHw.png\" alt=\"drawing\" height=\"50\"/>](https://novelpad.co/)\n[<img src=\"https://i.imgur.com/5bLKFeP.png\" alt=\"drawing\" height=\"50\"/>](https://proton.me/)\n\n...and many more!\n\n---\n\n[![patreon][patreon-image]][patreon-url]\n[![browserstack][browserstack-image]][browserstack-url]\n\nMade with 💖\n\n[npm-image]: https://badge.fury.io/js/docx.svg\n[npm-url]: https://npmjs.org/package/docx\n[downloads-image]: https://img.shields.io/npm/dm/docx.svg\n[downloads-url]: https://npmjs.org/package/docx\n[github-actions-workflow-image]: https://github.com/dolanmiu/docx/workflows/Default/badge.svg?branch=master\n[github-actions-workflow-url]: https://github.com/dolanmiu/docx/actions\n[snky-image]: https://snyk.io/test/github/dolanmiu/docx/badge.svg\n[snky-url]: https://snyk.io/test/github/dolanmiu/docx\n[pr-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[pr-url]: http://makeapullrequest.com\n[codecov-image]: https://codecov.io/gh/dolanmiu/docx/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/dolanmiu/docx\n[patreon-image]: https://user-images.githubusercontent.com/2917613/51251459-4e880480-1991-11e9-92bf-38b96675a9e2.png\n[patreon-url]: https://www.patreon.com/dolanmiu\n[browserstack-image]: https://user-images.githubusercontent.com/2917613/54233552-128e9d00-4505-11e9-88fb-025a4e04007c.png\n[browserstack-url]: https://www.browserstack.com\n[docxjs-editor-image]: https://img.shields.io/badge/Docx.js%20Editor-2b579a.svg?style=flat&amp;logo=javascript&amp;logoColor=white\n[docxjs-editor-url]: https://docxjs-editor.vercel.app/\n\nFile v1.12.4:node_modules/hash.js/README.md\n\n# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.svg)](http://travis-ci.org/indutny/hash.js)\n\nJust a bike-shed.\n\n## Install\n\n```sh\nnpm install hash.js\n```\n\n## Usage\n\n```js\nvar hash = require('hash.js')\nhash.sha256().update('abc').digest('hex')\n```\n\n## Selective hash usage\n\n```js\nvar sha512 = require('hash.js/lib/hash/sha/512');\nsha512().update('abc').digest('hex');\n```\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\nFile v1.12.4:node_modules/immediate/README.md\n\n# immediate [![Build Status](https://travis-ci.org/calvinmetcalf/immediate.svg?branch=master)](https://travis-ci.org/calvinmetcalf/immediate)\n\n```\nnpm install immediate --save\n```\n\nthen\n\n```js\nvar immediate = require(\"immediate\");\n\nimmediate(function () {\n  // this will run soon\n});\n\nimmediate(function (arg1, arg2) {\n  // get your args like in iojs\n}, thing1, thing2);\n```\n\n## Introduction\n\n**immediate** is a microtask library, decended from [NobleJS's setImmediate](https://github.com/NobleJS/setImmediate), but including ideas from [Cujo's When](https://github.com/cujojs/when) and [RSVP][RSVP].\n\nimmediate takes the tricks from setImmedate and RSVP and combines them with the schedualer inspired (vaugly) by whens.\n\nNote versions 2.6.5 and earlier were strictly speaking a 'macrotask' library not a microtask one, [see this for the difference](https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks), if you need a macrotask library, [I got you covered](https://github.com/calvinmetcalf/macrotask).\n\nSeveral new features were added in versions 3.1.0 and 3.2.0 to maintain parity with\nprocess.nextTick, but the 3.0.x series is still being kept up to date if you just need\nthe small barebones version.\n\n\n## The Tricks\n\n### `process.nextTick`\n\nNote that we check for *actual* Node.js environments, not emulated ones like those produced by browserify or similar.\n\n### `MutationObserver`\n\nThis is what [RSVP][RSVP] uses, it's very fast, details on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver).\n\n\n### `MessageChannel`\n\nUnfortunately, `postMessage` has completely different semantics inside web workers, and so cannot be used there. So we\nturn to [`MessageChannel`][MessageChannel], which has worse browser support, but does work inside a web worker.\n\n### `<script> onreadystatechange`\n\nFor our last trick, we pull something out to make things fast in Internet Explorer versions 6 through 8: namely,\ncreating a `<script>` element and firing our calls in its `onreadystatechange` event. This does execute in a future\nturn of the event loop, and is also faster than `setTimeout(…, 0)`, so hey, why not?\n\n## Tricks we don't use\n\n### `setImmediate`\nWe avoid this process.nextTick in node is better suited to our needs and in Internet Explorer 10 there is a broken version of setImmediate we avoid using this.\n\n\nIn Node.js, do\n\n```\nnpm install immediate\n```\n\nthen\n\n```js\nvar immediate = require(\"immediate\");\n```\n\n\n## Reference and Reading\n\n * [Efficient Script Yielding W3C Editor's Draft][spec]\n * [W3C mailing list post introducing the specification][list-post]\n * [IE Test Drive demo][ie-demo]\n * [Introductory blog post by Nicholas C. Zakas][ncz]\n * I wrote a couple blog pots on this, [part 1][my-blog-1] and [part 2][my-blog-2]\n\n[RSVP]: https://github.com/tildeio/rsvp.js\n[spec]: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n[list-post]: http://lists.w3.org/Archives/Public/public-web-perf/2011Jun/0100.html\n[ie-demo]: http://ie.microsoft.com/testdrive/Performance/setImmediateSorting/Default.html\n[ncz]: http://www.nczonline.net/blog/2011/09/19/script-yielding-with-setimmediate/\n[nextTick]: http://nodejs.org/docs/v0.8.16/api/process.html#process_process_nexttick_callback\n[postMessage]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#posting-messages\n[MessageChannel]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#channel-messaging\n[cross-browser-demo]: http://calvinmetcalf.github.io/setImmediate-shim-demo\n[my-blog-1]:http://calvinmetcalf.com/post/61672207151/setimmediate-etc\n[my-blog-2]:http://calvinmetcalf.com/post/61761231881/javascript-schedulers\n\nFile v1.12.4:node_modules/inherits/README.md\n\nBrowser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n  superclass\n* new version overwrites current prototype while old one preserves any\n  existing fields on it\n\nFile v1.12.4:node_modules/isarray/README.md\n\n# isarray\n\n`Array#isArray` for older browsers.\n\n[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)\n[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)\n\n[![browser support](https://ci.testling.com/juliangruber/isarray.png)\n](https://ci.testling.com/juliangruber/isarray)\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nFile v1.12.4:node_modules/lie/README.md\n\n# lie\n<a href=\"http://promises-aplus.github.com/promises-spec\">\n  <img src=\"http://promises-aplus.github.com/promises-spec/assets/logo-small.png\"\n       alt=\"Promises/A+ logo\" title=\"Promises/A+ 1.1 compliant\" align=\"right\" />\n</a> [![Build Status](https://travis-ci.org/calvinmetcalf/lie.svg)](https://travis-ci.org/calvinmetcalf/lie)\n\nlie is a small, performant promise library implementing the [Promises/A+ spec](http://promises-aplus.github.com/promises-spec/) (Version 1.1).\n\nOriginally a fork of [Ruben Verborgh](https://github.com/RubenVerborgh)'s [promiscuous](https://github.com/RubenVerborgh/promiscuous), with version 2.6 it became a fork of [ayepromise](https://github.com/cburgmer/ayepromise) by [Chris Burgmer](https://github.com/cburgmer).\n\n```bash\nnpm install lie\n\n```\n\n```javascript\nvar Promise = require('lie');\n// or use the pollyfill\nrequire('lie/polyfill');\n```\n\n## Usage\n\nEither use it with [browserify](http://browserify.org/) (recommended) or grab one of the files from the dist folder:\n\n- lie.js/lie.min.js exposes 'Promise' either as a UMD module or from the global scope, depending on if a CJS or AMD loader is available.\n- lie.polyfill.js/lie.polyfill.min.js adds 'Promise' to the global scope only if it's not already defined (not a UMD).\n\n## API\n\nImplements the standard ES6 api:\n\n```js\nnew Promise(function(resolve, reject){\n    doSomething(function(err, result) {\n        if (err) {\n            reject(err);\n        } else {\n            resolve(result);\n        }\n    });\n}).then(function (value) {\n    //on success\n}, function (reason) {\n    //on error\n}).catch(function (reason) {\n    //shortcut for error handling\n});\n\nPromise.all([\n    //array of promises or values\n]).then(function ([/* array of results */]));\n\nPromise.race([\n    //array of promises or values\n]);\n// either resolves or rejects depending on the first value to do so\n```\n\n## Unhandled Rejections\n\nIn Node.js, lie emits an `unhandledRejection` event when a rejected promise isn't caught, in line with [how io.js does it](https://iojs.org/api/process.html#process_event_unhandledrejection). This allows it to act as a promise shim in both Node.js and the browser.\n\nFile v1.12.4:node_modules/minimalistic-assert/readme.md\n\nminimalistic-assert\n===\n\nvery minimalistic assert module.\n\nFile v1.12.4:node_modules/nanoid/README.md\n\n# Nano ID\n\n<img src=\"https://ai.github.io/nanoid/logo.svg\" align=\"right\"\n     alt=\"Nano ID logo by Anton Lovchikov\" width=\"180\" height=\"94\">\n\n**English** | [日本語](./README.ja.md) | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) | [한국어](./README.ko.md) | [العربية](./README.ar.md)\n\nA tiny, secure, URL-friendly, unique string ID generator for JavaScript.\n\n> “An amazing level of senseless perfectionism,\n> which is simply impossible not to respect.”\n\n* **Small.** 118 bytes (minified and brotlied). No dependencies.\n  [Size Limit] controls the size.\n* **Safe.** It uses hardware random generator. Can be used in clusters.\n* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).\n  So ID size was reduced from 36 to 21 symbols.\n* **Portable.** Nano ID was ported\n  to over [20 programming languages](./README.md#other-programming-languages).\n\n```js\nimport { nanoid } from 'nanoid'\nmodel.id = nanoid() //=> \"V1StGXR8_Z5jdHi6B-myT\"\n```\n\n---\n\n<img src=\"https://cdn.evilmartians.com/badges/logo-no-label.svg\" alt=\"\" width=\"22\" height=\"16\" />  Made at <b><a href=\"https://evilmartians.com/devtools?utm_source=nanoid&utm_campaign=devtools-button&utm_medium=github\">Evil Martians</a></b>, product consulting for <b>developer tools</b>.\n\n---\n\n[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/\n[with Babel]:  https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/\n[Size Limit]:  https://github.com/ai/size-limit\n\n\n## Docs\nRead full docs **[here](https://github.com/ai/nanoid#readme)**.\n\nFile v1.12.4:node_modules/pako/lib/zlib/README\n\nContent of this folder follows zlib C sources as close as possible.\nThat's intended to simplify maintainability and guarantee equal API\nand result.\n\nKey differences:\n\n- Everything is in JavaScript.\n- No platform-dependent blocks.\n- Some things like crc32 rewritten to keep size small and make JIT\n  work better.\n- Some code is different due missed features in JS (macros, pointers,\n  structures, header files)\n- Specific API methods are not implemented (see notes in root readme)\n\nThis port is based on zlib 1.2.8.\n\nThis port is under zlib license (see below) with contribution and addition of javascript\nport under expat license (see LICENSE at root of project)\n\nCopyright:\n(C) 1995-2013 Jean-loup Gailly and Mark Adler\n(C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n\n\nFrom zlib's README\n=============================================================================\n\nAcknowledgments:\n\n  The deflate format used by zlib was defined by Phil Katz.  The deflate and\n  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the\n  people who reported problems and suggested various improvements in zlib; they\n  are too numerous to cite here.\n\nCopyright notice:\n\n (C) 1995-2013 Jean-loup Gailly and Mark Adler\n\nCopyright (c) <''year''> <''copyright holders''>\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not\n   claim that you wrote the original software. If you use this software\n   in a product, an acknowledgment in the product documentation would be\n   appreciated but is not required.\n2. Altered source versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n3. This notice may not be removed or altered from any source distribution.\n\n\n  Jean-loup Gailly        Mark Adler\n  jloup@gzip.org          madler@alumni.caltech.edu\n\nArchive v1.12.2: 8 files, 24614 bytes\n\nFiles: _skillhub_meta.json (89b), CHANGELOG.md (10636b), package-lock.json (7998b), package.json (205b), scripts/create_gov_doc.js (42569b), skill-card.md (2188b), SKILL.md (13154b), _meta.json (135b)\n\nFile v1.12.2:SKILL.md\n\n---\nname: \"国央企word文档\"\ndescription: \"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。\"\nauthor: \"刘洪亮\"\nversion: \"1.12.3\"\n---\n\n# 国央企Work文档创建技能\n\n本技能用于创建符合中国政府及央企规范的Word文档(.docx)，使用Microsoft Word最新格式。\n\n## 文档格式规范\n\n### 页面设置\n\n| 属性 | 值 |\n|------|-----|\n| 纸张 | A4 |\n| 上边距 | 3.7厘米 |\n| 下边距 | 3.5厘米 |\n| 左边距 | 2.8厘米 |\n| 右边距 | 2.6厘米 |\n| 页码 | 居中显示，宋体四号 |\n\n### 字体规范\n\n| 样式 | 中文字体 | 西文字体 | 字号 |\n|------|----------|----------|------|\n| 首页大标题 | 方正小标宋简体 (FZXiaoBiaoSong-B05S) | Times New Roman | 小二号 (18pt) |\n| 正文 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 正文无缩进 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 一级标题 | 黑体 | Times New Roman | 小三号 (15pt) |\n| 二级标题 | 楷体 | Times New Roman | 小三号 (15pt) |\n| 三级标题 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) 加粗 |\n| 落款-部门 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 落款-日期 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 页码 | 宋体 | - | 四号 (14pt) |\n| 表格 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小五号 (9pt) |\n\n### 行间距\n\n| 样式 | 行间距 |\n|------|--------|\n| 首页大标题 | 固定28磅 |\n| 正文 | 固定28磅 |\n| 正文无缩进 | 固定28磅 |\n| 一级标题 | 固定28磅 |\n| 二级标题 | 固定28磅 |\n| 三级标题 | 固定28磅 |\n| 落款-部门 | 固定28磅 |\n| 落款-日期 | 固定28磅 |\n| 图片 | 单倍行距 |\n| 表格 | 单倍行距 |\n\n### 段落格式\n\n| 样式 | 序号格式 | 首行缩进 | 大纲级别 |\n|------|----------|----------|----------|\n| 正文有缩进 | 无 | 2字符 | - |\n| 正文无缩进 | 无 | 0 | 1级 |\n| 一级的标题 | 一、二、三、 | 2字符 | 1级 |\n| 二级的标题 | （一）（二）（三） | 2字符 | 2级 |\n| 三级的标题 | 1.2.3. | 2字符 | 3级 |\n| 落款-部门 | 无 | 无 | - |\n| 落款-日期 | 无 | 无 | - |\n\n## 样式名称\n\n创建文档时，必须使用以下样式名称：\n\n- `首页大标题` - 首页大标题\n- `正文有缩进` - 正文段落\n- `正文无缩进` - 无缩进正文段落（大纲级别一级，用于附件分页标题等需要出现在导航窗格的段落）\n- `一级的标题` - 一级标题\n- `二级的标题` - 二级标题\n- `三级的标题` - 三级标题\n- `图片样式` - 图片\n- `表格样式` - 表格\n- `落款-部门` - 部门落款（右下对齐）\n- `落款-日期` - 日期落款（右下对齐，自动与部门左对齐）\n- `页码样式` - 页脚页码\n\n## 使用方法\n\n### 方式一：使用JavaScript脚本创建文档\n\n```javascript\nconst {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  createAttachmentBlock,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('~/.openclaw/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1.第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2.第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths: [2000, 2000, 2000] }\n    ),\n  ]\n});\n\n// 生成文件\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('output.docx', buffer);\n});\n```\n\n### 方式二：使用CLI命令\n\n```bash\nnode scripts/create_gov_doc.js output.docx '{\n  \"title\": \"文档标题\",\n  \"body\": [\n    {\"type\": \"heading1\", \"text\": \"第一章\", \"number\": 0},\n    {\"type\": \"paragraph\", \"text\": \"正文内容\"},\n    {\"type\": \"table\", \"rows\": [...], \"columnWidths\": [2000, 2000, 2000]}\n  ]\n}'\n```\n\n## 表格规范\n\n- 表格宽度自动适应窗口（百分比100%），无需手动计算列宽\n- 列宽比例通过 `columnWidths` 参数控制（DXA 相对值，实际宽度自动缩放）\n- 表头：灰色底 (#D9D9D9)、加粗、居中\n- 内容：白色底、居中、小五号 (9pt) 字体\n- 边框：单线黑色\n\n```javascript\n// 表格示例\nconst border = { style: BorderStyle.SINGLE, size: 1, color: \"000000\" };\nconst borders = { top: border, bottom: border, left: border, right: border };\n\n// 表头行\nnew TableRow({\n  tableHeader: true,\n  children: [\n    new TableCell({\n      borders,\n      shading: { fill: \"D9D9D9\", type: ShadingType.CLEAR },\n      children: [new Paragraph({ children: [new TextRun({ text: \"表头\", bold: true })] })]\n    })\n  ]\n});\n```\n\n## 落款规范\n\n- 落款（部门名称 + 日期）放文档右下角，与上方正文间隔一行\n- 两行均右顶格对齐，不加缩进；日期自然向左延伸\n- 部门名称使用 `落款-部门` 样式，日期使用 `落款-日期` 样式，均为方正仿宋小三号\n- 使用 `createSignatureBlock()` 一键生成\n\n```javascript\nconst { createSignatureBlock } = require('...');\n\n// 一键创建落款块（含间隔空行 + 部门名称 + 日期）\nsections.push(...createSignatureBlock('科技创新部', '2026年6月'));\n```\n\n## 附件规范\n\n- **是否添加附件**：落款上方的段落是否包含\"附件\"列表，应根据文档需求和内容判断\n  - 文档正文引用了具体材料、表格、说明、名单等独立内容时，应添加附件列表\n  - 文档内容自包含、不引用其他材料时，不必添加附件\n- **位置与样式**：附件位于正文之后、落款之前，全部使用 `正文有缩进` 样式（方正仿宋小三号、固定28磅行距）\n- **附件名称后不加任何标点符号**（不加句号、顿号、逗号等）\n- **格式约定**：\n  - 第一个附件写在\"附件：\"段内：\"附件：1.附件名称\"（冒号后直接跟序号，不加空格），使用正文默认首行缩进 2 字符\n  - 只有 1 个附件时，段落保持正文默认首行缩进 2 字符\n  - 从附件 2 开始，覆盖首行缩进为 5 字符，使序号 \"2.\" 与第一段 \"1.\" 纵向对齐\n- 使用 `createAttachmentBlock()` 一键生成\n\n### 单附件示例\n\n```\n附件：1.科技创新工作周报表\n```\n\n### 多附件示例\n\n```\n附件：1.科技创新工作周报表\n      2.项目实施情况明细表\n      3.下一步工作计划\n```\n\n```javascript\nconst { createAttachmentBlock } = require('...');\n\n// 单附件\nsections.push(...createAttachmentBlock(['科技创新工作周报表']));\n\n// 多附件\nsections.push(...createAttachmentBlock([\n  '科技创新工作周报表',\n  '项目实施情况明细表',\n  '下一步工作计划',\n]));\n```\n\n### 在 createGovDocument 中使用\n\n```javascript\nconst sections = [\n  // ... 正文段落 ...\n  // ... 落款 ...\n];\n\n// 在正文和落款之间插入附件\nsections.push({ type: 'attachment', attachments: ['附件标题一', '附件标题二'] });\n```\n\n### 附件独立分页\n\n每个附件可在文档最后（落款之后）独占一页，用于手动插入图片或表格等实际内容，每页标题为\"附件1\"\"附件2\"……依次排列。使用 `createAttachmentPages()` 一键生成。\n\n```javascript\nconst { createAttachmentPages } = require('...');\n\n// 在落款之后插入附件独立分页\nsections.push(...createAttachmentPages(['附件A标题', '附件B标题']));\n```\n\n**格式**：分页符 → \"附件1\"（`正文无缩进` 样式、加粗、大纲一级，出现在 Word 导航窗格）→ `正文有缩进` 空行供插入内容。\n\n在 `createGovDocument` 中使用：\n\n```javascript\nsections.push({ type: 'attachment_pages', attachments: ['附件标题一', '附件标题二'] });\n```\n\n## 图片规范\n\n- 行间距：单倍行距\n- 对齐：居中\n- 样式名称：`图片样式`\n\n## 文档属性\n\n- 删除文档作者（`dc:creator` 和 `lastModifiedBy` 留空或不写入）\n- 在创建文档时不要设置 `creator` 属性，或设置为空字符串\n\n## 完整示例\n\n```javascript\nconst fs = require('fs');\nconst {\n  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,\n  Footer, BorderStyle, WidthType, ShadingType, VerticalAlign,\n  PageNumber, ImageRun, AlignmentType, HeadingLevel, LevelFormat,\n  createTitleParagraph, createBodyParagraph, createLevel1Heading,\n  createLevel2Heading, createLevel3Heading, createTable,\n  createImageParagraph, createSignatureBlock, createAttachmentBlock,\n  createAttachmentPages,\n  createDocument, CHINESE_FONTS, FONT_SIZES,\n  CONTENT_WIDTH, PAGE_MARGINS, LINE_SPACING_EXACT_28\n} = require('~/.openclaw/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 内容构建\nconst sections = [\n  createTitleParagraph('关于XXX工作的报告'),\n\n  createLevel1Heading('一、基本情况', 0),\n  createBodyParagraph('这里是正文内容，详细描述基本情况。'),\n  createBodyParagraph('继续描述相关内容和细节。'),\n\n  createLevel1Heading('二、主要做法', 1),\n  createLevel2Heading('（一）加强组织领导', 0),\n  createBodyParagraph('具体做法描述...'),\n  createLevel2Heading('（二）完善制度建设', 1),\n  createBodyParagraph('制度建设内容...'),\n\n  createLevel1Heading('三、存在问题', 2),\n  createBodyParagraph('当前存在以下问题：'),\n  createLevel3Heading('问题一', 0),\n  createBodyParagraph('问题一的具体描述。'),\n  createLevel3Heading('问题二', 1),\n  createBodyParagraph('问题二的具体描述。'),\n\n  createLevel1Heading('四、下一步计划', 3),\n  createBodyParagraph('针对以上问题，计划采取以下措施...'),\n\n  // 附件列表（位置：正文与落款之间；按需添加）\n  ...createAttachmentBlock([\n    '科技创新工作周报表',\n    '项目实施情况明细表',\n    '下一步工作计划',\n  ]),\n\n  // 落款（右下对齐，与正文间隔一行）\n  ...createSignatureBlock('科技创新部', '2026年6月'),\n\n  // 附件独立分页（每个附件独占一页，供插入图片/表格）\n  ...createAttachmentPages([\n    '科技创新工作周报表',\n    '项目实施情况明细表',\n    '下一步工作计划',\n  ]),\n];\n\n// 创建文档（不设置作者）\nconst doc = createDocument({\n  title: '关于XXX工作的报告',\n  sections\n});\n\n// 生成并保存\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('report.docx', buffer);\n  console.log('文档已生成: report.docx');\n});\n```\n\n## 注意事项\n\n1. **字号转换**：Word中的\"号\"转换为半磅值（如小三号=30，小二号=36，四号=28，小五号=18）\n2. **行间距固定28磅**：line值设置为560（28 × 20），lineRule设置为\"exact\"\n3. **首行缩进**：使用 `indent: { firstLine: charWidth * 2 }`，字符宽度约等于字号的一半\n4. **页码**：仅在页脚居中显示，使用宋体四号\n5. **不要封面**：文档从首页大标题开始，不创建封面页\n6. **文档作者**：不设置或留空\n7. **双引号自动规范化**：所有文本内容中的 ASCII 双引号 `\"` 会自动替换为配对的中文双引号 `\"\"`（`\\u201c`/`\\u201d`），无需手动转换\n8. **中西文字体分段写入**：`createTextRunsFromSegments` 对每个 TextRun 均明确写入字体（西文：Times New Roman；中文：对应中文字体 + Times New Roman）。**不要**使用 `useDirectFormatting: false` 模式（已废弃），始终明确写字体以保证 Word 渲染稳定。\n9. **docDefaults 字体**：`createDocument` 的 `styles.default.document.run.font` 必须使用对象格式（`{ eastAsia, ascii, hAnsi, cs }`），不能传字符串，否则 `docDefaults` 中 ascii/hAnsi 会被设为中文字体导致西文渲染错误。\n10. **pPrDefault 行距**：`createDocument` 的 `styles.default.document.paragraph` 必须设置 `spacing: { before: 0, after: 0, line: 560, lineRule: \"exact\" }`，确保 `pPrDefault` 不为空。这使 Normal（正文）样式在 Word 样式窗格中显示正确的28磅固定行距。无需额外定义 Normal 样式，各自定义样式通过 `basedOn: \"Normal\"` 继承后自行覆盖 spacing。\n\n## 相关文件\n\n- `scripts/create_gov_doc.js` - 核心创建函数库\n\nFile v1.12.2:_meta.json\n\n{\n  \"ownerId\": \"kn761ajb8xnkak52sb6wc60hvx831ymg\",\n  \"slug\": \"gov-doc-writing\",\n  \"version\": \"1.12.2\",\n  \"publishedAt\": 1785231858167\n}\n\nFile v1.12.2:CHANGELOG.md\n\n# 国央企Word文档技能更新日志\n\n## [1.12.2] - 2026-07-28\n\n### 修复\n- **附件分页标题加粗**：`createAttachmentPages` 生成的\"附件1\"\"附件2\"……标题文字追加 `bold: true`\n\n## [1.12.1] - 2026-07-28\n\n### 变更\n- **新增 `正文无缩进` 样式 + 附件分页标题改用该样式**\n  - 新增 `createBodyNoIndentStyle`：方正仿宋小三号、左对齐、无首行缩进、大纲级别一级\n  - `createAttachmentPages` 的\"附件1\"\"附件2\"……标题由内联格式化改为使用 `正文无缩进` 样式\n  - 样式在 Word 导航窗格中可见（大纲级别一级），可直接跳转\n  - SKILL.md 字体规范表、行间距表、段落格式表、样式名称列表同步新增\n\n## [1.12.0] - 2026-07-28\n\n### 新增\n- **首页标题下自动空行**：`createDocument` 自动在首页大标题后插入一行 `正文有缩进` 空段落，无需手动添加\n- **附件独立分页功能**：新增 `createAttachmentPages(attachments)` 函数\n  - 每个附件独占一页，标题为\"附件1\"\"附件2\"……（黑体小三号居中加粗）\n  - 分页符分隔，标题后留空行供手动插入图片或表格\n  - `createGovDocument` 新增 `attachment_pages` 类型支持\n  - 导出 `createAttachmentPages`\n\n## [1.11.2] - 2026-07-28\n\n### 修复\n- **附件1格式修正**：去除\"附件：\"与\"1.\"之间的多余空格\n  - 旧格式：`附件： 1.附件名称`（冒号后有空格）\n  - 新格式：`附件：1.附件名称`（冒号后直接跟序号）\n  - 涉及函数：`createAttachmentBlock`\n  - 同步更新 SKILL.md 附件规范章节及所有示例\n\n## [1.11.1] - 2026-07-28\n\n### 变更\n- **附件样式由独立样式改为「正文有缩进」样式**\n  - 移除独立的 `createAttachmentStyle` 函数及\"附件\"样式注册（`paragraphStyles` 中删除）\n  - `createAttachmentBlock` 改为全部使用 `正文有缩进` 样式\n    - 第一个附件 \"附件： 1.xxx\" 使用正文默认首行缩进 2 字符\n    - 从附件 2 开始覆盖首行缩进为 5 字符（1500 twips），实现 \"2.\" 与 \"1.\" 纵向对齐\n    - 只有 1 个附件时保持正文默认 2 字符缩进\n  - SKILL.md 中字体规范表、行间距表、段落格式表、样式名称列表均移除\"附件\"行\n  - 附件规范章节更新为使用 `正文有缩进` 样式\n\n## [1.11.0] - 2026-07-28\n\n### 新增\n- **新增「附件」样式与 `createAttachmentBlock` 函数**\n  - 用途：用于在落款上方添加附件列表（如\"附件： 1.xxx\"），符合公文/国央企文档规范\n  - 新增样式 `createAttachmentStyle`：方正仿宋小三号、左对齐、固定28磅行距、无首行缩进\n  - 新增函数 `createAttachmentBlock(attachments)`：根据附件名称数组自动生成多附件段落\n    - 第一个附件与\"附件：\"写在同一段：\"附件： 1.附件名称\"（\"附件：\"后接 1 个全角空格）\n    - 附件名称后不加任何标点符号\n    - 多附件时，每条附件独立成段，序号 \"2.\"、\"3.\" 等与首段 \"1.\" 纵向对齐\n    - 附件名称较长需回行时，与本段\"附件名称\"的首字对齐（通过悬挂缩进实现）\n  - `createGovDocument` 新增 `attachment` 类型支持，调用方式：`{ type: 'attachment', attachments: ['名称一', '名称二'] }`\n  - 涉及函数：`createAttachmentStyle`（新增）、`createAttachmentBlock`（新增）、`createGovDocument`\n\n### 设计说明\n- 是否添加附件应根据文档需求和内容判断：正文引用具体材料、表格、说明、名单等独立内容时添加；自包含内容不引用其他材料时不添加\n\n## [1.7.1] - 2026-05-26\n\n### 修复\n\n- **Bug 7：Word 样式窗格中「正文」（Normal）样式的行距不是28磅固定**\n  - 问题：`docDefaults` 中仅设置了 `<w:rPrDefault>`（字体默认值），`<w:pPrDefault/>` 为空，导致 Normal（正文）样式缺少段落的行距定义，Word 样式窗格中显示为默认单倍行距而非固定28磅。\n  - 修复：在 `createDocument` 的 `styles.default.document` 中增加 `paragraph` 键，设置 `spacing: { before: 0, after: 0, line: 560, lineRule: \"exact\" }`。这会填充 `<w:pPrDefault>`，使 Normal 样式自动继承28磅固定行距。\n  - 影响函数：`createDocument`\n\n## [1.7.0] - 2026-05-26\n\n### 修复\n\n- **Bug 6：正文及标题中西文字体不稳定，西文未显示 Times New Roman**\n  - 问题根因一：`createTextRunsFromSegments` 中 `useDirectFormatting = false` 时，所有 `TextRun` 只写 `text` 字段，不包含任何 `<w:rPr>`，依赖段落样式 `run` 字段的字体继承。Word 对无 rPr 的 TextRun 在中西文混排时字体应用不稳定，导致西文片段（NETCONF、BIN 等）实际使用方正仿宋而非 Times New Roman。\n  - 问题根因二：`createDocument` 的 `styles.default.document.run.font` 传入了字符串（`FZFangSong-Z02S`），导致 `docDefaults` 中 `w:ascii` 和 `w:hAnsi` 也被设置为方正仿宋，而非 Times New Roman，进一步加剧了西文字体错误。\n  - 修复一：`createTextRunsFromSegments` 改为**始终为每个 TextRun 明确写入字体**：西文片段写 `ascii/hAnsi/cs = Times New Roman`，中文片段写 `eastAsia = 对应中文字体` + `ascii/hAnsi/cs = Times New Roman`。行距、缩进等段落属性仍由段落样式控制。\n  - 修复二：`createDocument` 的 `styles.default.document.run.font` 改为对象格式：`{ eastAsia: FZFangSong, ascii: Times New Roman, hAnsi: Times New Roman, cs: Times New Roman }`，修正 `docDefaults` 中西文字体。\n  - 废弃 `useDirectFormatting` 参数（保留签名兼容性，不再区分两种模式）。\n  - 影响函数：`createTextRunsFromSegments`、`createDocument`\n\n## [1.6.0] - 2026-04-25\n\n### 变更\n- **二级标题序号格式调整**：去掉序号后的顿号\n  - 旧格式：`（一）、标题内容`\n  - 新格式：`（一）标题内容`\n  - 涉及函数：`createLevel2Heading`、`createLevel2HeadingSafe`\n\n- **三级标题序号格式调整**：序号后改用点号，去掉顿号\n  - 旧格式：`1、标题内容`\n  - 新格式：`1.标题内容`\n  - 涉及函数：`createLevel3Heading`\n\n- **表格宽度改为自动适应**：改为百分比宽度，自动适应窗口和内容\n  - 旧方式：固定 DXA 宽度（按页面内容区域计算）\n  - 新方式：`WidthType.PERCENTAGE` 100%（自动铺满可用宽度）\n  - 涉及函数：`createTable`\n\n- **双引号自动规范化为中文引号**：所有文本内容中的 ASCII 双引号 `\"` 自动替换为配对的中文双引号 `\"\"`\n  - 规则：按出现顺序奇偶配对，奇数位→左引号 `\"`，偶数位→右引号 `\"`\n  - 已有的正确中文引号对保持不变，全角引号 `\"` `\"` 也统一为 `\\u201c` `\\u201d`\n  - 奇数个引号时自动容错闭合为右引号\n  - 涉及函数：`normalizeQuotes`（新增）、`createTextRunsFromSegments`、`createTitleParagraph`、`createTable`、`createTableHeaderRow`\n  - 覆盖范围：正文、标题（全部层级）、表格单元格、表头行\n\n## [1.5.0] - 2026-04-08\n\n### 修复\n- **Bug 5：正文首行缩进只有1字符而非2字符**\n  - 问题：所有样式定义（`正文有缩进`、`一级的标题`、`二级的标题`、`三级的标题`）中的首行缩进计算公式错误\n  - 错误公式：`Math.round(2 * FONT_SIZES['小三号'] / 2 * 10)` = 300 Twips（仅1字符）\n  - 错误原因：`FONT_SIZES['小三号'] = 30`（半磅值 = 15pt），正确换算应为 `15pt × 20twips/pt = 300twips = 1字符`，2字符需要 `600 twips`；而原公式 `/2 * 10 = * 5` 实际只得到1字符\n  - 修复公式：`2 * FONT_SIZES['小三号'] * 10` = 600 Twips（正确2字符）\n  - 同时修复 `createDocument` 中 `charWidth` 变量的计算，从约150改为正确的300 Twips\n  - 影响样式：`正文有缩进`、`一级的标题`、`二级的标题`、`三级的标题`\n\n## [1.4.0] - 2026-04-07\n\n### 新增\n- 添加 `createGovDocument(content, outputPath)` 便捷函数，简化文档生成流程\n  - 支持通过简单的内容对象定义文档结构\n  - 支持类型：title、body、heading1、heading2、heading3、table\n  - 自动处理标题序号计数和添加\n\n### 修复\n- **Bug 4：Word中显示\"由多种样式组成\"**\n  - 问题：段落中的 `TextRun` 元素包含 `rPr`（直接格式化属性），导致 Word 认为段落同时应用了样式和直接格式化\n  - 修复：移除所有 `TextRun` 中的 `rPr` 元素，只保留 `pPr` 中的 `pStyle` 样式引用\n  - 影响函数：createTitleParagraph、createBodyParagraph、createLevel1Heading、createLevel2Heading、createLevel3Heading、createTable、createTableHeaderRow\n\n## [1.3.0] - 2026-04-07\n\n### 修复\n- **Bug 3：Word中新增内容字体不生效**\n  - 问题：样式定义中只使用 `run.font` 设置单一字体，Word 样式系统对于中西文混排需要分别指定中文字体和西文字体\n  - 修复：在所有样式定义中将 `run.font` 从字符串改为对象格式\n    - `eastAsia`: 对应中文字体（方正仿宋/黑体/楷体/方正小标宋）\n    - `ascii`: Times New Roman（西文字体）\n    - `hAnsi`: Times New Roman\n    - `cs`: Times New Roman\n\n## [1.2.0] - 2026-04-07\n\n### 修复\n- **Bug 2：表格中西文字体未正确应用**\n  - 问题：表格单元格和表头行中的文本直接使用 `new TextRun` 创建，只指定了中文字体，没有分别处理中西文字符\n  - 修复：\n    - 修改 `createTable` 函数，使用 `createTextRunsFromSegments` 处理单元格文本\n    - 修改 `createTableHeaderRow` 函数，使用 `createTextRunsFromSegments` 处理表头文本\n\n## [1.1.0] - 2026-04-07\n\n### 修复\n- **Bug 1：标题序号重复**\n  - 问题：一级、二级、三级标题函数在传入序号参数时会自动添加序号前缀，如果调用者已经在text中写了序号，会导致重复（如\"一、一、会议议程\"）\n  - 修复：在 `createLevel1Heading`、`createLevel2Heading`、`createLevel3Heading` 函数中添加序号前缀检测逻辑\n    - 检测text是否已包含对应格式的序号前缀\n    - 如果已包含正确序号，则不再添加\n    - 如果包含其他序号，则替换为正确序号\n    - 如果没有序号，则添加序号前缀\n\n## [1.0.0] - 初始版本\n\n### 功能\n- 创建符合中国政府及央企规范的Word文档(.docx)\n- 支持页面设置（A4纸张、标准边距）\n- 支持标准字体规范（方正小标宋、方正仿宋、黑体、楷体）\n- 支持标题层级（一级、二级、三级标题）\n- 支持表格创建（自动计算列宽、表头样式）\n- 支持图片插入\n- 支持页码设置\n- 提供完整的JavaScript API\n\nFile v1.12.2:skill-card.md\n\n## Description: <br>\n此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。 <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[a-lhliang](https://clawhub.ai/user/a-lhliang) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nEmployees, external users, and developers use this skill to create Word .docx files that follow Chinese government and central state-owned enterprise document conventions, including prescribed page margins, fonts, headings, tables, attachments, signatures, and page numbers. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can write .docx files to paths supplied by the user or agent. <br>\nMitigation: Review output paths before execution and run the skill in a workspace where file writes are expected. <br>\nRisk: The docx dependency is declared with a version range, which can reduce reproducibility across installs. <br>\nMitigation: Use the committed package-lock.json during install or pin the docx dependency exactly for stricter reproducibility. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/a-lhliang/skills/gov-doc-writing) <br>\n- [Publisher profile](https://clawhub.ai/user/a-lhliang) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with JavaScript examples, CLI commands, and generated .docx file output] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Creates local .docx files at user- or agent-provided output paths.] <br>\n\n## Skill Version(s): <br>\n1.12.2 (source: server release metadata and CHANGELOG.md, released 2026-07-28) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.12.2:_skillhub_meta.json\n\n{\n  \"name\": \"国央企word文档\",\n  \"installedAt\": 1777171174208,\n  \"source\": \"import\"\n}\n\nFile v1.12.2:package-lock.json\n\n{\n  \"name\": \"gov-doc-writing\",\n  \"version\": \"1.5.0\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"name\": \"gov-doc-writing\",\n      \"version\": \"1.5.0\",\n      \"dependencies\": {\n        \"docx\": \"^9.6.1\"\n      }\n    },\n    \"node_modules/@types/node\": {\n      \"version\": \"25.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz\",\n      \"integrity\": \"sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"undici-types\": \"~7.18.0\"\n      }\n    },\n    \"node_modules/core-util-is\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz\",\n      \"integrity\": \"sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/docx\": {\n      \"version\": \"9.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/docx/-/docx-9.6.1.tgz\",\n      \"integrity\": \"sha512-ZJja9/KBUuFC109sCMzovoq2GR2wCG/AuxivjA+OHj/q0TEgJIm3S7yrlUxIy3B+bV8YDj/BiHfWyrRFmyWpDQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"@types/node\": \"^25.2.3\",\n        \"hash.js\": \"^1.1.7\",\n        \"jszip\": \"^3.10.1\",\n        \"nanoid\": \"^5.1.3\",\n        \"xml\": \"^1.0.1\",\n        \"xml-js\": \"^1.6.8\"\n      },\n      \"engines\": {\n        \"node\": \">=10\"\n      }\n    },\n    \"node_modules/hash.js\": {\n      \"version\": \"1.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz\",\n      \"integrity\": \"sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"inherits\": \"^2.0.3\",\n        \"minimalistic-assert\": \"^1.0.1\"\n      }\n    },\n    \"node_modules/immediate\": {\n      \"version\": \"3.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz\",\n      \"integrity\": \"sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/inherits\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz\",\n      \"integrity\": \"sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==\",\n      \"license\": \"ISC\"\n    },\n    \"node_modules/isarray\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n      \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/jszip\": {\n      \"version\": \"3.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz\",\n      \"integrity\": \"sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==\",\n      \"license\": \"(MIT OR GPL-3.0-or-later)\",\n      \"dependencies\": {\n        \"lie\": \"~3.3.0\",\n        \"pako\": \"~1.0.2\",\n        \"readable-stream\": \"~2.3.6\",\n        \"setimmediate\": \"^1.0.5\"\n      }\n    },\n    \"node_modules/lie\": {\n      \"version\": \"3.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/lie/-/lie-3.3.0.tgz\",\n      \"integrity\": \"sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"immediate\": \"~3.0.5\"\n      }\n    },\n    \"node_modules/minimalistic-assert\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz\",\n      \"integrity\": \"sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==\",\n      \"license\": \"ISC\"\n    },\n    \"node_modules/nanoid\": {\n      \"version\": \"5.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-5.1.7.tgz\",\n      \"integrity\": \"sha512-ua3NDgISf6jdwezAheMOk4mbE1LXjm1DfMUDMuJf4AqxLFK3ccGpgWizwa5YV7Yz9EpXwEaWoRXSb/BnV0t5dQ==\",\n      \"funding\": [\n        {\n          \"type\": \"github\",\n          \"url\": \"https://github.com/sponsors/ai\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"bin\": {\n        \"nanoid\": \"bin/nanoid.js\"\n      },\n      \"engines\": {\n        \"node\": \"^18 || >=20\"\n      }\n    },\n    \"node_modules/pako\": {\n      \"version\": \"1.0.11\",\n      \"resolved\": \"https://registry.npmjs.org/pako/-/pako-1.0.11.tgz\",\n      \"integrity\": \"sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==\",\n      \"license\": \"(MIT AND Zlib)\"\n    },\n    \"node_modules/process-nextick-args\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz\",\n      \"integrity\": \"sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/readable-stream\": {\n      \"version\": \"2.3.8\",\n      \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n      \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"core-util-is\": \"~1.0.0\",\n        \"inherits\": \"~2.0.3\",\n        \"isarray\": \"~1.0.0\",\n        \"process-nextick-args\": \"~2.0.0\",\n        \"safe-buffer\": \"~5.1.1\",\n        \"string_decoder\": \"~1.1.1\",\n        \"util-deprecate\": \"~1.0.1\"\n      }\n    },\n    \"node_modules/safe-buffer\": {\n      \"version\": \"5.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n      \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/sax\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/sax/-/sax-1.6.0.tgz\",\n      \"integrity\": \"sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==\",\n      \"license\": \"BlueOak-1.0.0\",\n      \"engines\": {\n        \"node\": \">=11.0.0\"\n      }\n    },\n    \"node_modules/setimmediate\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz\",\n      \"integrity\": \"sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/string_decoder\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n      \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"safe-buffer\": \"~5.1.0\"\n      }\n    },\n    \"node_modules/undici-types\": {\n      \"version\": \"7.18.2\",\n      \"resolved\": \"https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz\",\n      \"integrity\": \"sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/util-deprecate\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz\",\n      \"integrity\": \"sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/xml\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/xml/-/xml-1.0.1.tgz\",\n      \"integrity\": \"sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/xml-js\": {\n      \"version\": \"1.6.11\",\n      \"resolved\": \"https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz\",\n      \"integrity\": \"sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"sax\": \"^1.2.4\"\n      },\n      \"bin\": {\n        \"xml-js\": \"bin/cli.js\"\n      }\n    }\n  }\n}\n\nFile v1.12.2:package.json\n\n{\n  \"name\": \"gov-doc-writing\",\n  \"version\": \"1.5.0\",\n  \"description\": \"创建符合中国政府及央企规范的Word文档(.docx)\",\n  \"author\": \"刘洪亮\",\n  \"dependencies\": {\n    \"docx\": \"^9.6.1\"\n  }\n}\n\nArchive v1.10.0: 363 files, 1945742 bytes\n\nFiles: _skillhub_meta.json (89b), CHANGELOG.md (7097b), node_modules/.package-lock.json (7865b), node_modules/@types/node/assert.d.ts (40091b), node_modules/@types/node/assert/strict.d.ts (2828b), node_modules/@types/node/async_hooks.d.ts (26213b), node_modules/@types/node/buffer.buffer.d.ts (22610b), node_modules/@types/node/buffer.d.ts (82641b), node_modules/@types/node/child_process.d.ts (63684b), node_modules/@types/node/cluster.d.ts (21212b), node_modules/@types/node/compatibility/iterators.d.ts (1303b), node_modules/@types/node/console.d.ts (6758b), node_modules/@types/node/constants.d.ts (820b), node_modules/@types/node/crypto.d.ts (172141b), node_modules/@types/node/dgram.d.ts (25654b), node_modules/@types/node/diagnostics_channel.d.ts (25053b), node_modules/@types/node/dns.d.ts (36127b), node_modules/@types/node/dns/promises.d.ts (21112b), node_modules/@types/node/domain.d.ts (7510b), node_modules/@types/node/events.d.ts (48918b), node_modules/@types/node/fs.d.ts (197562b), node_modules/@types/node/fs/promises.d.ts (57210b), node_modules/@types/node/globals.d.ts (5132b), node_modules/@types/node/globals.typedarray.d.ts (4864b), node_modules/@types/node/http.d.ts (97345b), node_modules/@types/node/http2.d.ts (118435b), node_modules/@types/node/https.d.ts (16993b), node_modules/@types/node/index.d.ts (5031b), node_modules/@types/node/inspector.d.ts (12372b), node_modules/@types/node/inspector.generated.d.ts (228065b), node_modules/@types/node/inspector/promises.d.ts (1681b), node_modules/@types/node/module.d.ts (34455b), node_modules/@types/node/net.d.ts (42409b), node_modules/@types/node/os.d.ts (19438b), node_modules/@types/node/package.json (4509b), node_modules/@types/node/path.d.ts (7888b), node_modules/@types/node/path/posix.d.ts (194b), node_modules/@types/node/path/win32.d.ts (194b), node_modules/@types/node/perf_hooks.d.ts (24609b), node_modules/@types/node/process.d.ts (109502b), node_modules/@types/node/punycode.d.ts (5458b), node_modules/@types/node/querystring.d.ts (7130b), node_modules/@types/node/quic.d.ts (29946b), node_modules/@types/node/readline.d.ts (22372b), node_modules/@types/node/readline/promises.d.ts (6444b), node_modules/@types/node/README.md (1582b), node_modules/@types/node/repl.d.ts (18464b), node_modules/@types/node/sea.d.ts (6638b), node_modules/@types/node/sqlite.d.ts (51465b), node_modules/@types/node/stream.d.ts (89875b), node_modules/@types/node/stream/consumers.d.ts (1572b), node_modules/@types/node/stream/promises.d.ts (7347b), node_modules/@types/node/stream/web.d.ts (11988b), node_modules/@types/node/string_decoder.d.ts (2814b), node_modules/@types/node/test.d.ts (104429b), node_modules/@types/node/test/reporters.d.ts (4046b), node_modules/@types/node/timers.d.ts (7948b), node_modules/@types/node/timers/promises.d.ts (3785b), node_modules/@types/node/tls.d.ts (58343b), node_modules/@types/node/trace_events.d.ts (8931b), node_modules/@types/node/ts5.6/buffer.buffer.d.ts (21861b), node_modules/@types/node/ts5.6/compatibility/float16array.d.ts (3811b), node_modules/@types/node/ts5.6/globals.typedarray.d.ts (1238b), node_modules/@types/node/ts5.6/index.d.ts (5362b), node_modules/@types/node/ts5.7/compatibility/float16array.d.ts (3872b), node_modules/@types/node/ts5.7/index.d.ts (5349b), node_modules/@types/node/tty.d.ts (12238b), node_modules/@types/node/url.d.ts (24768b), node_modules/@types/node/util.d.ts (66168b), node_modules/@types/node/util/types.d.ts (23832b), node_modules/@types/node/v8.d.ts (40754b), node_modules/@types/node/vm.d.ts (55418b), node_modules/@types/node/wasi.d.ts (9125b), node_modules/@types/node/web-globals/abortcontroller.d.ts (1989b), node_modules/@types/node/web-globals/blob.d.ts (902b), node_modules/@types/node/web-globals/console.d.ts (149b), node_modules/@types/node/web-globals/crypto.d.ts (1449b), node_modules/@types/node/web-globals/domexception.d.ts (2565b), node_modules/@types/node/web-globals/encoding.d.ts (414b), node_modules/@types/node/web-globals/events.d.ts (3367b)\n\nFile v1.10.0:SKILL.md\n\n---\nname: \"国央企word文档\"\ndescription: \"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。\"\nauthor: \"刘洪亮\"\nversion: \"1.10\"\n---\n\n# 国央企Work文档创建技能\n\n本技能用于创建符合中国政府及央企规范的Word文档(.docx)，使用Microsoft Word最新格式。\n\n## 文档格式规范\n\n### 页面设置\n\n| 属性 | 值 |\n|------|-----|\n| 纸张 | A4 |\n| 上边距 | 3.7厘米 |\n| 下边距 | 3.5厘米 |\n| 左边距 | 2.8厘米 |\n| 右边距 | 2.6厘米 |\n| 页码 | 居中显示，宋体四号 |\n\n### 字体规范\n\n| 样式 | 中文字体 | 西文字体 | 字号 |\n|------|----------|----------|------|\n| 首页大标题 | 方正小标宋简体 (FZXiaoBiaoSong-B05S) | Times New Roman | 小二号 (18pt) |\n| 正文 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 一级标题 | 黑体 | Times New Roman | 小三号 (15pt) |\n| 二级标题 | 楷体 | Times New Roman | 小三号 (15pt) |\n| 三级标题 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) 加粗 |\n| 落款-部门 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 落款-日期 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 页码 | 宋体 | - | 四号 (14pt) |\n| 表格 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小五号 (9pt) |\n\n### 行间距\n\n| 样式 | 行间距 |\n|------|--------|\n| 首页大标题 | 固定28磅 |\n| 正文 | 固定28磅 |\n| 一级标题 | 固定28磅 |\n| 二级标题 | 固定28磅 |\n| 三级标题 | 固定28磅 |\n| 落款-部门 | 固定28磅 |\n| 落款-日期 | 固定28磅 |\n| 图片 | 单倍行距 |\n| 表格 | 单倍行距 |\n\n### 段落格式\n\n| 样式 | 序号格式 | 首行缩进 | 大纲级别 |\n|------|----------|----------|----------|\n| 正文有缩进 | 无 | 2字符 | - |\n| 一级的标题 | 一、二、三、 | 2字符 | 1级 |\n| 二级的标题 | （一）（二）（三） | 2字符 | 2级 |\n| 三级的标题 | 1.2.3. | 2字符 | 3级 |\n| 落款-部门 | 无 | 无 | - |\n| 落款-日期 | 无 | 无 | - |\n\n## 样式名称\n\n创建文档时，必须使用以下样式名称：\n\n- `首页大标题` - 首页大标题\n- `正文有缩进` - 正文段落\n- `一级的标题` - 一级标题\n- `二级的标题` - 二级标题\n- `三级的标题` - 三级标题\n- `图片样式` - 图片\n- `表格样式` - 表格\n- `落款-部门` - 部门落款（右下对齐）\n- `落款-日期` - 日期落款（右下对齐，自动与部门左对齐）\n- `页码样式` - 页脚页码\n\n## 使用方法\n\n### 方式一：使用JavaScript脚本创建文档\n\n```javascript\nconst {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('~/.openclaw/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1.第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2.第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths: [2000, 2000, 2000] }\n    ),\n  ]\n});\n\n// 生成文件\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('output.docx', buffer);\n});\n```\n\n### 方式二：使用CLI命令\n\n```bash\nnode scripts/create_gov_doc.js output.docx '{\n  \"title\": \"文档标题\",\n  \"body\": [\n    {\"type\": \"heading1\", \"text\": \"第一章\", \"number\": 0},\n    {\"type\": \"paragraph\", \"text\": \"正文内容\"},\n    {\"type\": \"table\", \"rows\": [...], \"columnWidths\": [2000, 2000, 2000]}\n  ]\n}'\n```\n\n## 表格规范\n\n- 表格宽度自动适应窗口（百分比100%），无需手动计算列宽\n- 列宽比例通过 `columnWidths` 参数控制（DXA 相对值，实际宽度自动缩放）\n- 表头：灰色底 (#D9D9D9)、加粗、居中\n- 内容：白色底、居中、小五号 (9pt) 字体\n- 边框：单线黑色\n\n```javascript\n// 表格示例\nconst border = { style: BorderStyle.SINGLE, size: 1, color: \"000000\" };\nconst borders = { top: border, bottom: border, left: border, right: border };\n\n// 表头行\nnew TableRow({\n  tableHeader: true,\n  children: [\n    new TableCell({\n      borders,\n      shading: { fill: \"D9D9D9\", type: ShadingType.CLEAR },\n      children: [new Paragraph({ children: [new TextRun({ text: \"表头\", bold: true })] })]\n    })\n  ]\n});\n```\n\n## 落款规范\n\n- 落款（部门名称 + 日期）放文档右下角，与上方正文间隔一行\n- 两行均右顶格对齐，不加缩进；日期自然向左延伸\n- 部门名称使用 `落款-部门` 样式，日期使用 `落款-日期` 样式，均为方正仿宋小三号\n- 使用 `createSignatureBlock()` 一键生成\n\n```javascript\nconst { createSignatureBlock } = require('...');\n\n// 一键创建落款块（含间隔空行 + 部门名称 + 日期）\nsections.push(...createSignatureBlock('科技创新部', '2026年6月'));\n```\n\n## 图片规范\n\n- 行间距：单倍行距\n- 对齐：居中\n- 样式名称：`图片样式`\n\n## 文档属性\n\n- 删除文档作者（`dc:creator` 和 `lastModifiedBy` 留空或不写入）\n- 在创建文档时不要设置 `creator` 属性，或设置为空字符串\n\n## 完整示例\n\n```javascript\nconst fs = require('fs');\nconst {\n  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,\n  Footer, BorderStyle, WidthType, ShadingType, VerticalAlign,\n  PageNumber, ImageRun, AlignmentType, HeadingLevel, LevelFormat,\n  createTitleParagraph, createBodyParagraph, createLevel1Heading,\n  createLevel2Heading, createLevel3Heading, createTable,\n  createImageParagraph, createSignatureBlock, createDocument, CHINESE_FONTS, FONT_SIZES,\n  CONTENT_WIDTH, PAGE_MARGINS, LINE_SPACING_EXACT_28\n} = require('~/.openclaw/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 内容构建\nconst sections = [\n  createTitleParagraph('关于XXX工作的报告'),\n\n  createLevel1Heading('一、基本情况', 0),\n  createBodyParagraph('这里是正文内容，详细描述基本情况。'),\n  createBodyParagraph('继续描述相关内容和细节。'),\n\n  createLevel1Heading('二、主要做法', 1),\n  createLevel2Heading('（一）加强组织领导', 0),\n  createBodyParagraph('具体做法描述...'),\n  createLevel2Heading('（二）完善制度建设', 1),\n  createBodyParagraph('制度建设内容...'),\n\n  createLevel1Heading('三、存在问题', 2),\n  createBodyParagraph('当前存在以下问题：'),\n  createLevel3Heading('问题一', 0),\n  createBodyParagraph('问题一的具体描述。'),\n  createLevel3Heading('问题二', 1),\n  createBodyParagraph('问题二的具体描述。'),\n\n  createLevel1Heading('四、下一步计划', 3),\n  createBodyParagraph('针对以上问题，计划采取以下措施...'),\n\n  // 落款（右下对齐，与正文间隔一行）\n  ...createSignatureBlock('科技创新部', '2026年6月'),\n];\n\n// 创建文档（不设置作者）\nconst doc = createDocument({\n  title: '关于XXX工作的报告',\n  sections\n});\n\n// 生成并保存\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('report.docx', buffer);\n  console.log('文档已生成: report.docx');\n});\n```\n\n## 注意事项\n\n1. **字号转换**：Word中的\"号\"转换为半磅值（如小三号=30，小二号=36，四号=28，小五号=18）\n2. **行间距固定28磅**：line值设置为560（28 × 20），lineRule设置为\"exact\"\n3. **首行缩进**：使用 `indent: { firstLine: charWidth * 2 }`，字符宽度约等于字号的一半\n4. **页码**：仅在页脚居中显示，使用宋体四号\n5. **不要封面**：文档从首页大标题开始，不创建封面页\n6. **文档作者**：不设置或留空\n7. **双引号自动规范化**：所有文本内容中的 ASCII 双引号 `\"` 会自动替换为配对的中文双引号 `\"\"`（`\\u201c`/`\\u201d`），无需手动转换\n8. **中西文字体分段写入**：`createTextRunsFromSegments` 对每个 TextRun 均明确写入字体（西文：Times New Roman；中文：对应中文字体 + Times New Roman）。**不要**使用 `useDirectFormatting: false` 模式（已废弃），始终明确写字体以保证 Word 渲染稳定。\n9. **docDefaults 字体**：`createDocument` 的 `styles.default.document.run.font` 必须使用对象格式（`{ eastAsia, ascii, hAnsi, cs }`），不能传字符串，否则 `docDefaults` 中 ascii/hAnsi 会被设为中文字体导致西文渲染错误。\n10. **pPrDefault 行距**：`createDocument` 的 `styles.default.document.paragraph` 必须设置 `spacing: { before: 0, after: 0, line: 560, lineRule: \"exact\" }`，确保 `pPrDefault` 不为空。这使 Normal（正文）样式在 Word 样式窗格中显示正确的28磅固定行距。无需额外定义 Normal 样式，各自定义样式通过 `basedOn: \"Normal\"` 继承后自行覆盖 spacing。\n\n## 相关文件\n\n- `scripts/create_gov_doc.js` - 核心创建函数库\n\nFile v1.10.0:node_modules/@types/node/README.md\n\n# Installation\r\n> `npm install --save @types/node`\r\n\r\n# Summary\r\nThis package contains type definitions for node (https://nodejs.org/).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.\r\n\r\n### Additional Details\r\n * Last updated: Fri, 03 Apr 2026 11:14:41 GMT\r\n * Dependencies: [undici-types](https://npmjs.com/package/undici-types)\r\n\r\n# Credits\r\nThese definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig).\n\nFile v1.10.0:node_modules/core-util-is/README.md\n\n# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n\nFile v1.10.0:node_modules/docx/README.md\n\n<p align=\"center\">\n    <img src=\"./logo/logo-animate.svg\" width=\"100%\" height=\"300\" alt=\"clippy the assistant\">\n</p>\n\n<p align=\"center\">\n    Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.\n</p>\n\n---\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads per month][downloads-image]][downloads-url]\n[![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url]\n[![Known Vulnerabilities][snky-image]][snky-url]\n[![PRs Welcome][pr-image]][pr-url]\n[![codecov][codecov-image]][codecov-url]\n[![Docx.js Editor][docxjs-editor-image]][docxjs-editor-url]\n\n<p align=\"center\">\n    <img src=\"https://i.imgur.com/QeL1HuU.png\" alt=\"drawing\"/>\n</p>\n\n# Demo\n\n## Browser\n\nHere are examples of `docx` being used with basic `HTML/JS` in a browser environment:\n\n-   https://codepen.io/dolanmiu/pen/RwNeObg\n-   https://jsfiddle.net/dolanmiu/onadx1gu/\n\nHere are examples of `docx` working in `Angular`:\n\n-   https://stackblitz.com/edit/angular-docx\n-   https://stackblitz.com/edit/angular-wmd6k3\n\nHere are examples of `docx` working in `React`:\n\n-   https://stackblitz.com/edit/react-docx\n-   https://stackblitz.com/edit/react-docx-images (adding images to Word Document)\n\nHere is an example of `docx` working in `Vue.js`:\n\n-   https://stackblitz.com/edit/vuejs-docx\n\n## Node\n\nPress `endpoint` on the `RunKit` website:\n\n![RunKit Instructions](https://user-images.githubusercontent.com/2917613/38582539-f84311b6-3d07-11e8-90db-5885ae02c3c4.png)\n\n-   https://runkit.com/dolanmiu/docx-demo1 - Simple paragraph and text\n-   https://runkit.com/dolanmiu/docx-demo2 - Advanced Paragraphs and text\n-   https://runkit.com/dolanmiu/docx-demo3 - Bullet points\n-   https://runkit.com/dolanmiu/docx-demo4 - Simple table\n-   https://runkit.com/dolanmiu/docx-demo5 - Images\n-   https://runkit.com/dolanmiu/docx-demo6 - Margins\n-   https://runkit.com/dolanmiu/docx-demo7 - Landscape\n-   https://runkit.com/dolanmiu/docx-demo8 - Header and Footer\n-   https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx**\n\nMore [here](https://github.com/dolanmiu/docx/tree/master/demo)\n\n# How to use & Documentation\n\nPlease refer to the [documentation at https://docx.js.org/](https://docx.js.org/) for details on how to use this library, examples and much more!\n\n# Playground\n\nExperience `docx` in action through [Docx.js Editor][docxjs-editor-url], an interactive playground where you can code and preview the results in real-time.\n\n# Examples\n\nCheck the [demo folder](https://github.com/dolanmiu/docx/tree/master/demo) for examples.\n\n# Contributing\n\nRead the contribution guidelines [here](https://docx.js.org/#/contribution-guidelines).\n\n# Used by\n\n[<img src=\"https://i.imgur.com/zy5qWmI.png\" alt=\"drawing\" height=\"50\"/>](https://hfour.com/)\n[<img src=\"https://i.imgur.com/OYP5tgS.png\" alt=\"drawing\" height=\"50\"/>](https://fuzzproductions.com/)\n[<img src=\"https://i.imgur.com/zUDMfZ3.png\" alt=\"drawing\" height=\"50\"/>](https://www.mettzer.com/)\n[<img src=\"https://i.imgur.com/wtNB1uq.png\" alt=\"drawing\" height=\"50\"/>](https://www.wisedoc.net/)\n[<img src=\"https://i.imgur.com/suiH2zc.png\" alt=\"drawing\" height=\"50\"/>](https://www.dabblewriter.com/)\n[<img src=\"https://i.imgur.com/1LjuK2M.png\" alt=\"drawing\" height=\"50\"/>](https://turbopatent.com/)\n[<img src=\"https://i.imgur.com/dHMg0wF.gif\" alt=\"drawing\" height=\"50\"/>](http://www.madisoncres.com/)\n[<img src=\"https://i.imgur.com/QEZXU5b.png\" alt=\"drawing\" height=\"50\"/>](https://www.beekast.com/)\n[<img src=\"https://i.imgur.com/XVU6aoi.png\" alt=\"drawing\" height=\"50\"/>](https://herraizsoto.com/)\n[<img src=\"https://i.imgur.com/fn1xccG.png\" alt=\"drawing\" height=\"50\"/>](http://www.ativer.com.br/)\n[<img src=\"https://i.imgur.com/cmykN7c.png\" alt=\"drawing\"/>](https://www.arity.co/)\n[<img src=\"https://i.imgur.com/PXo25um.png\" alt=\"drawing\" height=\"50\"/>](https://www.circadianrisk.com/)\n[<img src=\"https://i.imgur.com/AKGhtlh.png\" alt=\"drawing\"/>](https://lexense.com/)\n[<img src=\"https://i.imgur.com/9tqJaHw.png\" alt=\"drawing\" height=\"50\"/>](https://novelpad.co/)\n[<img src=\"https://i.imgur.com/5bLKFeP.png\" alt=\"drawing\" height=\"50\"/>](https://proton.me/)\n\n...and many more!\n\n---\n\n[![patreon][patreon-image]][patreon-url]\n[![browserstack][browserstack-image]][browserstack-url]\n\nMade with 💖\n\n[npm-image]: https://badge.fury.io/js/docx.svg\n[npm-url]: https://npmjs.org/package/docx\n[downloads-image]: https://img.shields.io/npm/dm/docx.svg\n[downloads-url]: https://npmjs.org/package/docx\n[github-actions-workflow-image]: https://github.com/dolanmiu/docx/workflows/Default/badge.svg?branch=master\n[github-actions-workflow-url]: https://github.com/dolanmiu/docx/actions\n[snky-image]: https://snyk.io/test/github/dolanmiu/docx/badge.svg\n[snky-url]: https://snyk.io/test/github/dolanmiu/docx\n[pr-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg\n[pr-url]: http://makeapullrequest.com\n[codecov-image]: https://codecov.io/gh/dolanmiu/docx/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/dolanmiu/docx\n[patreon-image]: https://user-images.githubusercontent.com/2917613/51251459-4e880480-1991-11e9-92bf-38b96675a9e2.png\n[patreon-url]: https://www.patreon.com/dolanmiu\n[browserstack-image]: https://user-images.githubusercontent.com/2917613/54233552-128e9d00-4505-11e9-88fb-025a4e04007c.png\n[browserstack-url]: https://www.browserstack.com\n[docxjs-editor-image]: https://img.shields.io/badge/Docx.js%20Editor-2b579a.svg?style=flat&amp;logo=javascript&amp;logoColor=white\n[docxjs-editor-url]: https://docxjs-editor.vercel.app/\n\nFile v1.10.0:node_modules/hash.js/README.md\n\n# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.svg)](http://travis-ci.org/indutny/hash.js)\n\nJust a bike-shed.\n\n## Install\n\n```sh\nnpm install hash.js\n```\n\n## Usage\n\n```js\nvar hash = require('hash.js')\nhash.sha256().update('abc').digest('hex')\n```\n\n## Selective hash usage\n\n```js\nvar sha512 = require('hash.js/lib/hash/sha/512');\nsha512().update('abc').digest('hex');\n```\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\nFile v1.10.0:node_modules/immediate/README.md\n\n# immediate [![Build Status](https://travis-ci.org/calvinmetcalf/immediate.svg?branch=master)](https://travis-ci.org/calvinmetcalf/immediate)\n\n```\nnpm install immediate --save\n```\n\nthen\n\n```js\nvar immediate = require(\"immediate\");\n\nimmediate(function () {\n  // this will run soon\n});\n\nimmediate(function (arg1, arg2) {\n  // get your args like in iojs\n}, thing1, thing2);\n```\n\n## Introduction\n\n**immediate** is a microtask library, decended from [NobleJS's setImmediate](https://github.com/NobleJS/setImmediate), but including ideas from [Cujo's When](https://github.com/cujojs/when) and [RSVP][RSVP].\n\nimmediate takes the tricks from setImmedate and RSVP and combines them with the schedualer inspired (vaugly) by whens.\n\nNote versions 2.6.5 and earlier were strictly speaking a 'macrotask' library not a microtask one, [see this for the difference](https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks), if you need a macrotask library, [I got you covered](https://github.com/calvinmetcalf/macrotask).\n\nSeveral new features were added in versions 3.1.0 and 3.2.0 to maintain parity with\nprocess.nextTick, but the 3.0.x series is still being kept up to date if you just need\nthe small barebones version.\n\n\n## The Tricks\n\n### `process.nextTick`\n\nNote that we check for *actual* Node.js environments, not emulated ones like those produced by browserify or similar.\n\n### `MutationObserver`\n\nThis is what [RSVP][RSVP] uses, it's very fast, details on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver).\n\n\n### `MessageChannel`\n\nUnfortunately, `postMessage` has completely different semantics inside web workers, and so cannot be used there. So we\nturn to [`MessageChannel`][MessageChannel], which has worse browser support, but does work inside a web worker.\n\n### `<script> onreadystatechange`\n\nFor our last trick, we pull something out to make things fast in Internet Explorer versions 6 through 8: namely,\ncreating a `<script>` element and firing our calls in its `onreadystatechange` event. This does execute in a future\nturn of the event loop, and is also faster than `setTimeout(…, 0)`, so hey, why not?\n\n## Tricks we don't use\n\n### `setImmediate`\nWe avoid this process.nextTick in node is better suited to our needs and in Internet Explorer 10 there is a broken version of setImmediate we avoid using this.\n\n\nIn Node.js, do\n\n```\nnpm install immediate\n```\n\nthen\n\n```js\nvar immediate = require(\"immediate\");\n```\n\n\n## Reference and Reading\n\n * [Efficient Script Yielding W3C Editor's Draft][spec]\n * [W3C mailing list post introducing the specification][list-post]\n * [IE Test Drive demo][ie-demo]\n * [Introductory blog post by Nicholas C. Zakas][ncz]\n * I wrote a couple blog pots on this, [part 1][my-blog-1] and [part 2][my-blog-2]\n\n[RSVP]: https://github.com/tildeio/rsvp.js\n[spec]: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n[list-post]: http://lists.w3.org/Archives/Public/public-web-perf/2011Jun/0100.html\n[ie-demo]: http://ie.microsoft.com/testdrive/Performance/setImmediateSorting/Default.html\n[ncz]: http://www.nczonline.net/blog/2011/09/19/script-yielding-with-setimmediate/\n[nextTick]: http://nodejs.org/docs/v0.8.16/api/process.html#process_process_nexttick_callback\n[postMessage]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#posting-messages\n[MessageChannel]: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#channel-messaging\n[cross-browser-demo]: http://calvinmetcalf.github.io/setImmediate-shim-demo\n[my-blog-1]:http://calvinmetcalf.com/post/61672207151/setimmediate-etc\n[my-blog-2]:http://calvinmetcalf.com/post/61761231881/javascript-schedulers\n\nFile v1.10.0:node_modules/inherits/README.md\n\nBrowser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n  superclass\n* new version overwrites current prototype while old one preserves any\n  existing fields on it\n\nFile v1.10.0:node_modules/isarray/README.md\n\n# isarray\n\n`Array#isArray` for older browsers.\n\n[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray)\n[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray)\n\n[![browser support](https://ci.testling.com/juliangruber/isarray.png)\n](https://ci.testling.com/juliangruber/isarray)\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nFile v1.10.0:node_modules/lie/README.md\n\n# lie\n<a href=\"http://promises-aplus.github.com/promises-spec\">\n  <img src=\"http://promises-aplus.github.com/promises-spec/assets/logo-small.png\"\n       alt=\"Promises/A+ logo\" title=\"Promises/A+ 1.1 compliant\" align=\"right\" />\n</a> [![Build Status](https://travis-ci.org/calvinmetcalf/lie.svg)](https://travis-ci.org/calvinmetcalf/lie)\n\nlie is a small, performant promise library implementing the [Promises/A+ spec](http://promises-aplus.github.com/promises-spec/) (Version 1.1).\n\nOriginally a fork of [Ruben Verborgh](https://github.com/RubenVerborgh)'s [promiscuous](https://github.com/RubenVerborgh/promiscuous), with version 2.6 it became a fork of [ayepromise](https://github.com/cburgmer/ayepromise) by [Chris Burgmer](https://github.com/cburgmer).\n\n```bash\nnpm install lie\n\n```\n\n```javascript\nvar Promise = require('lie');\n// or use the pollyfill\nrequire('lie/polyfill');\n```\n\n## Usage\n\nEither use it with [browserify](http://browserify.org/) (recommended) or grab one of the files from the dist folder:\n\n- lie.js/lie.min.js exposes 'Promise' either as a UMD module or from the global scope, depending on if a CJS or AMD loader is available.\n- lie.polyfill.js/lie.polyfill.min.js adds 'Promise' to the global scope only if it's not already defined (not a UMD).\n\n## API\n\nImplements the standard ES6 api:\n\n```js\nnew Promise(function(resolve, reject){\n    doSomething(function(err, result) {\n        if (err) {\n            reject(err);\n        } else {\n            resolve(result);\n        }\n    });\n}).then(function (value) {\n    //on success\n}, function (reason) {\n    //on error\n}).catch(function (reason) {\n    //shortcut for error handling\n});\n\nPromise.all([\n    //array of promises or values\n]).then(function ([/* array of results */]));\n\nPromise.race([\n    //array of promises or values\n]);\n// either resolves or rejects depending on the first value to do so\n```\n\n## Unhandled Rejections\n\nIn Node.js, lie emits an `unhandledRejection` event when a rejected promise isn't caught, in line with [how io.js does it](https://iojs.org/api/process.html#process_event_unhandledrejection). This allows it to act as a promise shim in both Node.js and the browser.\n\nFile v1.10.0:node_modules/minimalistic-assert/readme.md\n\nminimalistic-assert\n===\n\nvery minimalistic assert module.\n\nFile v1.10.0:node_modules/nanoid/README.md\n\n# Nano ID\n\n<img src=\"https://ai.github.io/nanoid/logo.svg\" align=\"right\"\n     alt=\"Nano ID logo by Anton Lovchikov\" width=\"180\" height=\"94\">\n\n**English** | [日本語](./README.ja.md) | [Русский](./README.ru.md) | [简体中文](./README.zh-CN.md) | [Bahasa Indonesia](./README.id-ID.md) | [한국어](./README.ko.md) | [العربية](./README.ar.md)\n\nA tiny, secure, URL-friendly, unique string ID generator for JavaScript.\n\n> “An amazing level of senseless perfectionism,\n> which is simply impossible not to respect.”\n\n* **Small.** 118 bytes (minified and brotlied). No dependencies.\n  [Size Limit] controls the size.\n* **Safe.** It uses hardware random generator. Can be used in clusters.\n* **Short IDs.** It uses a larger alphabet than UUID (`A-Za-z0-9_-`).\n  So ID size was reduced from 36 to 21 symbols.\n* **Portable.** Nano ID was ported\n  to over [20 programming languages](./README.md#other-programming-languages).\n\n```js\nimport { nanoid } from 'nanoid'\nmodel.id = nanoid() //=> \"V1StGXR8_Z5jdHi6B-myT\"\n```\n\n---\n\n<img src=\"https://cdn.evilmartians.com/badges/logo-no-label.svg\" alt=\"\" width=\"22\" height=\"16\" />  Made at <b><a href=\"https://evilmartians.com/devtools?utm_source=nanoid&utm_campaign=devtools-button&utm_medium=github\">Evil Martians</a></b>, product consulting for <b>developer tools</b>.\n\n---\n\n[online tool]: https://gitpod.io/#https://github.com/ai/nanoid/\n[with Babel]:  https://developer.epages.com/blog/coding/how-to-transpile-node-modules-with-babel-and-webpack-in-a-monorepo/\n[Size Limit]:  https://github.com/ai/size-limit\n\n\n## Docs\nRead full docs **[here](https://github.com/ai/nanoid#readme)**.\n\nFile v1.10.0:node_modules/pako/README.md\n\npako\n==========================================\n\n[![Build Status](https://travis-ci.org/nodeca/pako.svg?branch=master)](https://travis-ci.org/nodeca/pako)\n[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako)\n\n> zlib port to javascript, very fast!\n\n__Why pako is cool:__\n\n- Almost as fast in modern JS engines as C implementation (see benchmarks).\n- Works in browsers, you can browserify any separate component.\n- Chunking support for big blobs.\n- Results are binary equal to well known [zlib](http://www.zlib.net/) (now contains ported zlib v1.2.8).\n\nThis project was done to understand how fast JS can be and is it necessary to\ndevelop native C modules for CPU-intensive tasks. Enjoy the result!\n\n\n__Famous projects, using pako:__\n\n- [browserify](http://browserify.org/) (via [browserify-zlib](https://github.com/devongovett/browserify-zlib))\n- [JSZip](http://stuk.github.io/jszip/)\n- [mincer](https://github.com/nodeca/mincer)\n- [JS-Git](https://github.com/creationix/js-git) and\n  [Tedit](https://chrome.google.com/webstore/detail/tedit-development-environ/ooekdijbnbbjdfjocaiflnjgoohnblgf)\n  by [@creationix](https://github.com/creationix)\n\n\n__Benchmarks:__\n\n```\nnode v0.10.26, 1mb sample:\n\n   deflate-dankogai x 4.73 ops/sec ±0.82% (15 runs sampled)\n   deflate-gildas x 4.58 ops/sec ±2.33% (15 runs sampled)\n   deflate-imaya x 3.22 ops/sec ±3.95% (12 runs sampled)\n ! deflate-pako x 6.99 ops/sec ±0.51% (21 runs sampled)\n   deflate-pako-string x 5.89 ops/sec ±0.77% (18 runs sampled)\n   deflate-pako-untyped x 4.39 ops/sec ±1.58% (14 runs sampled)\n * deflate-zlib x 14.71 ops/sec ±4.23% (59 runs sampled)\n   inflate-dankogai x 32.16 ops/sec ±0.13% (56 runs sampled)\n   inflate-imaya x 30.35 ops/sec ±0.92% (53 runs sampled)\n ! inflate-pako x 69.89 ops/sec ±1.46% (71 runs sampled)\n   inflate-pako-string x 19.22 ops/sec ±1.86% (49 runs sampled)\n   inflate-pako-untyped x 17.19 ops/sec ±0.85% (32 runs sampled)\n * inflate-zlib x 70.03 ops/sec ±1.64% (81 runs sampled)\n\nnode v0.11.12, 1mb sample:\n\n   deflate-dankogai x 5.60 ops/sec ±0.49% (17 runs sampled)\n   deflate-gildas x 5.06 ops/sec ±6.00% (16 runs sampled)\n   deflate-imaya x 3.52 ops/sec ±3.71% (13 runs sampled)\n ! deflate-pako x 11.52 ops/sec ±0.22% (32 runs sampled)\n   deflate-pako-string x 9.53 ops/sec ±1.12% (27 runs sampled)\n   deflate-pako-untyped x 5.44 ops/sec ±0.72% (17 runs sampled)\n * deflate-zlib x 14.05 ops/sec ±3.34% (63 runs sampled)\n   inflate-dankogai x 42.19 ops/sec ±0.09% (56 runs sampled)\n   inflate-imaya x 79.68 ops/sec ±1.07% (68 runs sampled)\n ! inflate-pako x 97.52 ops/sec ±0.83% (80 runs sampled)\n   inflate-pako-string x 45.19 ops/sec ±1.69% (57 runs sampled)\n   inflate-pako-untyped x 24.35 ops/sec ±2.59% (40 runs sampled)\n * inflate-zlib x 60.32 ops/sec ±1.36% (69 runs sampled)\n```\n\nzlib's test is partially affected by marshalling (that make sense for inflate only).\nYou can change deflate level to 0 in benchmark source, to investigate details.\nFor deflate level 6 results can be considered as correct.\n\n__Install:__\n\nnode.js:\n\n```\nnpm install pako\n```\n\nbrowser:\n\n```\nbower install pako\n```\n\n\nExample & API\n-------------\n\nFull docs - http://nodeca.github.io/pako/\n\n```javascript\nvar pako = require('pako');\n\n// Deflate\n//\nvar input = new Uint8Array();\n//... fill input data here\nvar output = pako.deflate(input);\n\n// Inflate (simple wrapper can throw exception on broken stream)\n//\nvar compressed = new Uint8Array();\n//... fill data to uncompress here\ntry {\n  var result = pako.inflate(compressed);\n} catch (err) {\n  console.log(err);\n}\n\n//\n// Alternate interface for chunking & without exceptions\n//\n\nvar inflator = new pako.Inflate();\n\ninflator.push(chunk1, false);\ninflator.push(chunk2, false);\n...\ninflator.push(chunkN, true); // true -> last chunk\n\nif (inflator.err) {\n  console.log(inflator.msg);\n}\n\nvar output = inflator.result;\n\n```\n\nSometime you can wish to work with strings. For example, to send\nbig objects as json to server. Pako detects input data type. You can\nforce output to be string with option `{ to: 'string' }`.\n\n```javascript\nvar pako = require('pako');\n\nvar test = { my: 'super', puper: [456, 567], awesome: 'pako' };\n\nvar binaryString = pako.deflate(JSON.stringify(test), { to: 'string' });\n\n//\n// Here you can do base64 encode, make xhr requests and so on.\n//\n\nvar restored = JSON.parse(pako.inflate(binaryString, { to: 'string' }));\n```\n\n\nNotes\n-----\n\nPako does not contain some specific zlib functions:\n\n- __deflate__ -  methods `deflateCopy`, `deflateBound`, `deflateParams`,\n  `deflatePending`, `deflatePrime`, `deflateTune`.\n- __inflate__ - methods `inflateCopy`, `inflateMark`,\n  `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`.\n- High level inflate/deflate wrappers (classes) may not support some flush\n  modes. Those should work: Z_NO_FLUSH, Z_FINISH, Z_SYNC_FLUSH.\n\n\npako for enterprise\n-------------------\n\nAvailable as part of the Tidelift Subscription\n\nThe maintainers of pako and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-pako?utm_source=npm-pako&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)\n\n\nAuthors\n-------\n\n- Andrey Tupitsin [@anrd83](https://github.com/andr83)\n- Vitaly Puzrin [@puzrin](https://github.com/puzrin)\n\nPersonal thanks to:\n\n- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome\n  tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/)\n  tool and his advices.\n- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with\n  testing.\n\nOriginal implementation (in C):\n\n- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler.\n\n\nLicense\n-------\n\n- MIT - all files, except `/lib/zlib` folder\n- ZLIB - `/lib/zlib` content\n\nArchive v1.7.1: 7 files, 16933 bytes\n\nFiles: CHANGELOG.md (3664b), package-lock.json (7917b), package.json (205b), scripts/create_gov_doc.js (30462b), skill-card.md (2073b), SKILL.md (7589b), _meta.json (134b)\n\nFile v1.7.1:SKILL.md\n\n---\nname: \"国央企word文档\"\ndescription: \"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。\"\nauthor: \"刘洪亮\"\nversion: \"1.5\"\n---\n\n# 国央企Work文档创建技能\n\n本技能用于创建符合中国政府及央企规范的Word文档(.docx)，使用Microsoft Word最新格式。\n\n## 文档格式规范\n\n### 页面设置\n\n| 属性 | 值 |\n|------|-----|\n| 纸张 | A4 |\n| 上边距 | 3.7厘米 |\n| 下边距 | 3.5厘米 |\n| 左边距 | 2.8厘米 |\n| 右边距 | 2.6厘米 |\n| 页码 | 居中显示，宋体四号 |\n\n### 字体规范\n\n| 样式 | 中文字体 | 西文字体 | 字号 |\n|------|----------|----------|------|\n| 首页大标题 | 方正小标宋简体 (FZXiaoBiaoSong-B05S) | Times New Roman | 小二号 (18pt) |\n| 正文 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 一级标题 | 黑体 | Times New Roman | 小三号 (15pt) |\n| 二级标题 | 楷体 | Times New Roman | 小三号 (15pt) |\n| 三级标题 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) 加粗 |\n| 页码 | 宋体 | - | 四号 (14pt) |\n| 表格 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小五号 (9pt) |\n\n### 行间距\n\n| 样式 | 行间距 |\n|------|--------|\n| 首页大标题 | 固定28磅 |\n| 正文 | 固定28磅 |\n| 一级标题 | 固定28磅 |\n| 二级标题 | 固定28磅 |\n| 三级标题 | 固定28磅 |\n| 图片 | 单倍行距 |\n| 表格 | 单倍行距 |\n\n### 段落格式\n\n| 样式 | 序号格式 | 首行缩进 | 大纲级别 |\n|------|----------|----------|----------|\n| 正文有缩进 | 无 | 2字符 | - |\n| 一级的标题 | 一、二、三、 | 2字符 | 1级 |\n| 二级的标题 | （一）、（二）、（三）、 | 2字符 | 2级 |\n| 三级的标题 | 1.、2.、3.、 | 2字符 | 3级 |\n\n## 样式名称\n\n创建文档时，必须使用以下样式名称：\n\n- `首页大标题` - 首页大标题\n- `正文有缩进` - 正文段落\n- `一级的标题` - 一级标题\n- `二级的标题` - 二级标题\n- `三级的标题` - 三级标题\n- `图片样式` - 图片\n- `表格样式` - 表格\n- `页码样式` - 页脚页码\n\n## 使用方法\n\n### 方式一：使用JavaScript脚本创建文档\n\n```javascript\nconst {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('~/.workbuddy/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1、第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2、第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths: [2000, 2000, 2000] }\n    ),\n  ]\n});\n\n// 生成文件\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('output.docx', buffer);\n});\n```\n\n### 方式二：使用CLI命令\n\n```bash\nnode scripts/create_gov_doc.js output.docx '{\n  \"title\": \"文档标题\",\n  \"body\": [\n    {\"type\": \"heading1\", \"text\": \"第一章\", \"number\": 0},\n    {\"type\": \"paragraph\", \"text\": \"正文内容\"},\n    {\"type\": \"table\", \"rows\": [...], \"columnWidths\": [2000, 2000, 2000]}\n  ]\n}'\n```\n\n## 表格规范\n\n- 表格总宽度 = 内容宽度（A4宽度 - 左右边距）\n- 列宽用最后一列吸收余量，确保精确等于内容宽度\n- 表头：灰色底 (#D9D9D9)、加粗、居中\n- 内容：白色底、居中、小五号 (9pt) 字体\n- 边框：单线黑色\n\n```javascript\n// 表格示例\nconst border = { style: BorderStyle.SINGLE, size: 1, color: \"000000\" };\nconst borders = { top: border, bottom: border, left: border, right: border };\n\n// 表头行\nnew TableRow({\n  tableHeader: true,\n  children: [\n    new TableCell({\n      borders,\n      shading: { fill: \"D9D9D9\", type: ShadingType.CLEAR },\n      children: [new Paragraph({ children: [new TextRun({ text: \"表头\", bold: true })] })]\n    })\n  ]\n});\n```\n\n## 图片规范\n\n- 行间距：单倍行距\n- 对齐：居中\n- 样式名称：`图片样式`\n\n## 文档属性\n\n- 删除文档作者（`dc:creator` 和 `lastModifiedBy` 留空或不写入）\n- 在创建文档时不要设置 `creator` 属性，或设置为空字符串\n\n## 完整示例\n\n```javascript\nconst fs = require('fs');\nconst {\n  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,\n  Footer, BorderStyle, WidthType, ShadingType, VerticalAlign,\n  PageNumber, ImageRun, AlignmentType, HeadingLevel, LevelFormat,\n  createTitleParagraph, createBodyParagraph, createLevel1Heading,\n  createLevel2Heading, createLevel3Heading, createTable,\n  createImageParagraph, createDocument, CHINESE_FONTS, FONT_SIZES,\n  CONTENT_WIDTH, PAGE_MARGINS, LINE_SPACING_EXACT_28\n} = require('~/.workbuddy/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 内容构建\nconst sections = [\n  createTitleParagraph('关于XXX工作的报告'),\n\n  createLevel1Heading('一、基本情况', 0),\n  createBodyParagraph('这里是正文内容，详细描述基本情况。'),\n  createBodyParagraph('继续描述相关内容和细节。'),\n\n  createLevel1Heading('二、主要做法', 1),\n  createLevel2Heading('（一）加强组织领导', 0),\n  createBodyParagraph('具体做法描述...'),\n  createLevel2Heading('（二）完善制度建设', 1),\n  createBodyParagraph('制度建设内容...'),\n\n  createLevel1Heading('三、存在问题', 2),\n  createBodyParagraph('当前存在以下问题：'),\n  createLevel3Heading('问题一', 0),\n  createBodyParagraph('问题一的具体描述。'),\n  createLevel3Heading('问题二', 1),\n  createBodyParagraph('问题二的具体描述。'),\n\n  createLevel1Heading('四、下一步计划', 3),\n  createBodyParagraph('针对以上问题，计划采取以下措施...'),\n];\n\n// 创建文档（不设置作者）\nconst doc = createDocument({\n  title: '关于XXX工作的报告',\n  sections\n});\n\n// 生成并保存\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('report.docx', buffer);\n  console.log('文档已生成: report.docx');\n});\n```\n\n## 注意事项\n\n1. **字号转换**：Word中的\"号\"转换为半磅值（如小三号=30，小二号=36，四号=28，小五号=18）\n2. **行间距固定28磅**：line值设置为560（28 × 20），lineRule设置为\"exact\"\n3. **首行缩进**：使用 `indent: { firstLine: charWidth * 2 }`，字符宽度约等于字号的一半\n4. **页码**：仅在页脚居中显示，使用宋体四号\n5. **不要封面**：文档从首页大标题开始，不创建封面页\n6. **文档作者**：不设置或留空\n\n## 相关文件\n\n- `scripts/create_gov_doc.js` - 核心创建函数库\n\nFile v1.7.1:_meta.json\n\n{\n  \"ownerId\": \"kn761ajb8xnkak52sb6wc60hvx831ymg\",\n  \"slug\": \"gov-doc-writing\",\n  \"version\": \"1.7.1\",\n  \"publishedAt\": 1779760262740\n}\n\nFile v1.7.1:CHANGELOG.md\n\n# 国央企Word文档技能更新日志\n\n## [1.5.0] - 2026-04-08\n\n### 修复\n- **Bug 5：正文首行缩进只有1字符而非2字符**\n  - 问题：所有样式定义（`正文有缩进`、`一级的标题`、`二级的标题`、`三级的标题`）中的首行缩进计算公式错误\n  - 错误公式：`Math.round(2 * FONT_SIZES['小三号'] / 2 * 10)` = 300 Twips（仅1字符）\n  - 错误原因：`FONT_SIZES['小三号'] = 30`（半磅值 = 15pt），正确换算应为 `15pt × 20twips/pt = 300twips = 1字符`，2字符需要 `600 twips`；而原公式 `/2 * 10 = * 5` 实际只得到1字符\n  - 修复公式：`2 * FONT_SIZES['小三号'] * 10` = 600 Twips（正确2字符）\n  - 同时修复 `createDocument` 中 `charWidth` 变量的计算，从约150改为正确的300 Twips\n  - 影响样式：`正文有缩进`、`一级的标题`、`二级的标题`、`三级的标题`\n\n## [1.4.0] - 2026-04-07\n\n### 新增\n- 添加 `createGovDocument(content, outputPath)` 便捷函数，简化文档生成流程\n  - 支持通过简单的内容对象定义文档结构\n  - 支持类型：title、body、heading1、heading2、heading3、table\n  - 自动处理标题序号计数和添加\n\n### 修复\n- **Bug 4：Word中显示\"由多种样式组成\"**\n  - 问题：段落中的 `TextRun` 元素包含 `rPr`（直接格式化属性），导致 Word 认为段落同时应用了样式和直接格式化\n  - 修复：移除所有 `TextRun` 中的 `rPr` 元素，只保留 `pPr` 中的 `pStyle` 样式引用\n  - 影响函数：createTitleParagraph、createBodyParagraph、createLevel1Heading、createLevel2Heading、createLevel3Heading、createTable、createTableHeaderRow\n\n## [1.3.0] - 2026-04-07\n\n### 修复\n- **Bug 3：Word中新增内容字体不生效**\n  - 问题：样式定义中只使用 `run.font` 设置单一字体，Word 样式系统对于中西文混排需要分别指定中文字体和西文字体\n  - 修复：在所有样式定义中将 `run.font` 从字符串改为对象格式\n    - `eastAsia`: 对应中文字体（方正仿宋/黑体/楷体/方正小标宋）\n    - `ascii`: Times New Roman（西文字体）\n    - `hAnsi`: Times New Roman\n    - `cs`: Times New Roman\n\n## [1.2.0] - 2026-04-07\n\n### 修复\n- **Bug 2：表格中西文字体未正确应用**\n  - 问题：表格单元格和表头行中的文本直接使用 `new TextRun` 创建，只指定了中文字体，没有分别处理中西文字符\n  - 修复：\n    - 修改 `createTable` 函数，使用 `createTextRunsFromSegments` 处理单元格文本\n    - 修改 `createTableHeaderRow` 函数，使用 `createTextRunsFromSegments` 处理表头文本\n\n## [1.1.0] - 2026-04-07\n\n### 修复\n- **Bug 1：标题序号重复**\n  - 问题：一级、二级、三级标题函数在传入序号参数时会自动添加序号前缀，如果调用者已经在text中写了序号，会导致重复（如\"一、一、会议议程\"）\n  - 修复：在 `createLevel1Heading`、`createLevel2Heading`、`createLevel3Heading` 函数中添加序号前缀检测逻辑\n    - 检测text是否已包含对应格式的序号前缀\n    - 如果已包含正确序号，则不再添加\n    - 如果包含其他序号，则替换为正确序号\n    - 如果没有序号，则添加序号前缀\n\n## [1.0.0] - 初始版本\n\n### 功能\n- 创建符合中国政府及央企规范的Word文档(.docx)\n- 支持页面设置（A4纸张、标准边距）\n- 支持标准字体规范（方正小标宋、方正仿宋、黑体、楷体）\n- 支持标题层级（一级、二级、三级标题）\n- 支持表格创建（自动计算列宽、表头样式）\n- 支持图片插入\n- 支持页码设置\n- 提供完整的JavaScript API\n\nFile v1.7.1:skill-card.md\n\n## Description: <br>\n此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。 <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[a-lhliang](https://clawhub.ai/user/a-lhliang) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nEmployees, external users, and developers use this skill to generate formatted Word .docx documents for Chinese government, state-owned enterprise, formal report, and official-document workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The CLI writes to the output path supplied by the user. <br>\nMitigation: Choose output filenames deliberately and avoid pointing the command at files that should be preserved. <br>\nRisk: Generated document appearance depends on the expected Chinese and Western fonts being available in the viewing environment. <br>\nMitigation: Review generated .docx files in Microsoft Word or the target document environment before distribution. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/a-lhliang/gov-doc-writing) <br>\n- [Publisher profile](https://clawhub.ai/user/a-lhliang) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Code, Shell commands, Files, Guidance] <br>\n**Output Format:** [Markdown guidance with JavaScript examples and generated .docx files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs are created locally; the CLI writes the .docx file to the user-supplied output path.] <br>\n\n## Skill Version(s): <br>\n1.7.1 (source: server release evidence, released 2026-05-26) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.7.1:package-lock.json\n\n{\n  \"name\": \"gov-doc-writing\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"dependencies\": {\n        \"docx\": \"^9.6.1\"\n      }\n    },\n    \"node_modules/@types/node\": {\n      \"version\": \"25.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz\",\n      \"integrity\": \"sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"undici-types\": \"~7.18.0\"\n      }\n    },\n    \"node_modules/core-util-is\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz\",\n      \"integrity\": \"sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/docx\": {\n      \"version\": \"9.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/docx/-/docx-9.6.1.tgz\",\n      \"integrity\": \"sha512-ZJja9/KBUuFC109sCMzovoq2GR2wCG/AuxivjA+OHj/q0TEgJIm3S7yrlUxIy3B+bV8YDj/BiHfWyrRFmyWpDQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"@types/node\": \"^25.2.3\",\n        \"hash.js\": \"^1.1.7\",\n        \"jszip\": \"^3.10.1\",\n        \"nanoid\": \"^5.1.3\",\n        \"xml\": \"^1.0.1\",\n        \"xml-js\": \"^1.6.8\"\n      },\n      \"engines\": {\n        \"node\": \">=10\"\n      }\n    },\n    \"node_modules/hash.js\": {\n      \"version\": \"1.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz\",\n      \"integrity\": \"sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"inherits\": \"^2.0.3\",\n        \"minimalistic-assert\": \"^1.0.1\"\n      }\n    },\n    \"node_modules/immediate\": {\n      \"version\": \"3.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz\",\n      \"integrity\": \"sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/inherits\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz\",\n      \"integrity\": \"sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==\",\n      \"license\": \"ISC\"\n    },\n    \"node_modules/isarray\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n      \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/jszip\": {\n      \"version\": \"3.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz\",\n      \"integrity\": \"sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==\",\n      \"license\": \"(MIT OR GPL-3.0-or-later)\",\n      \"dependencies\": {\n        \"lie\": \"~3.3.0\",\n        \"pako\": \"~1.0.2\",\n        \"readable-stream\": \"~2.3.6\",\n        \"setimmediate\": \"^1.0.5\"\n      }\n    },\n    \"node_modules/lie\": {\n      \"version\": \"3.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/lie/-/lie-3.3.0.tgz\",\n      \"integrity\": \"sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"immediate\": \"~3.0.5\"\n      }\n    },\n    \"node_modules/minimalistic-assert\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz\",\n      \"integrity\": \"sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==\",\n      \"license\": \"ISC\"\n    },\n    \"node_modules/nanoid\": {\n      \"version\": \"5.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-5.1.7.tgz\",\n      \"integrity\": \"sha512-ua3NDgISf6jdwezAheMOk4mbE1LXjm1DfMUDMuJf4AqxLFK3ccGpgWizwa5YV7Yz9EpXwEaWoRXSb/BnV0t5dQ==\",\n      \"funding\": [\n        {\n          \"type\": \"github\",\n          \"url\": \"https://github.com/sponsors/ai\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"bin\": {\n        \"nanoid\": \"bin/nanoid.js\"\n      },\n      \"engines\": {\n        \"node\": \"^18 || >=20\"\n      }\n    },\n    \"node_modules/pako\": {\n      \"version\": \"1.0.11\",\n      \"resolved\": \"https://registry.npmjs.org/pako/-/pako-1.0.11.tgz\",\n      \"integrity\": \"sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==\",\n      \"license\": \"(MIT AND Zlib)\"\n    },\n    \"node_modules/process-nextick-args\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz\",\n      \"integrity\": \"sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/readable-stream\": {\n      \"version\": \"2.3.8\",\n      \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n      \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"core-util-is\": \"~1.0.0\",\n        \"inherits\": \"~2.0.3\",\n        \"isarray\": \"~1.0.0\",\n        \"process-nextick-args\": \"~2.0.0\",\n        \"safe-buffer\": \"~5.1.1\",\n        \"string_decoder\": \"~1.1.1\",\n        \"util-deprecate\": \"~1.0.1\"\n      }\n    },\n    \"node_modules/safe-buffer\": {\n      \"version\": \"5.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n      \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/sax\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/sax/-/sax-1.6.0.tgz\",\n      \"integrity\": \"sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==\",\n      \"license\": \"BlueOak-1.0.0\",\n      \"engines\": {\n        \"node\": \">=11.0.0\"\n      }\n    },\n    \"node_modules/setimmediate\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz\",\n      \"integrity\": \"sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/string_decoder\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n      \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"safe-buffer\": \"~5.1.0\"\n      }\n    },\n    \"node_modules/undici-types\": {\n      \"version\": \"7.18.2\",\n      \"resolved\": \"https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz\",\n      \"integrity\": \"sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/util-deprecate\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz\",\n      \"integrity\": \"sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/xml\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/xml/-/xml-1.0.1.tgz\",\n      \"integrity\": \"sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/xml-js\": {\n      \"version\": \"1.6.11\",\n      \"resolved\": \"https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz\",\n      \"integrity\": \"sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"sax\": \"^1.2.4\"\n      },\n      \"bin\": {\n        \"xml-js\": \"bin/cli.js\"\n      }\n    }\n  }\n}\n\nFile v1.7.1:package.json\n\n{\n  \"name\": \"gov-doc-writing\",\n  \"version\": \"1.5.0\",\n  \"description\": \"创建符合中国政府及央企规范的Word文档(.docx)\",\n  \"author\": \"刘洪亮\",\n  \"dependencies\": {\n    \"docx\": \"^9.6.1\"\n  }\n}\n\nArchive v1.6.0: 7 files, 17310 bytes\n\nFiles: _skillhub_meta.json (89b), CHANGELOG.md (4988b), package-lock.json (7917b), package.json (205b), scripts/create_gov_doc.js (32346b), SKILL.md (7781b), _meta.json (134b)\n\nFile v1.6.0:SKILL.md\n\n---\nname: \"国央企word文档\"\ndescription: \"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。\"\nauthor: \"刘洪亮\"\nversion: \"1.6\"\n---\n\n# 国央企Work文档创建技能\n\n本技能用于创建符合中国政府及央企规范的Word文档(.docx)，使用Microsoft Word最新格式。\n\n## 文档格式规范\n\n### 页面设置\n\n| 属性 | 值 |\n|------|-----|\n| 纸张 | A4 |\n| 上边距 | 3.7厘米 |\n| 下边距 | 3.5厘米 |\n| 左边距 | 2.8厘米 |\n| 右边距 | 2.6厘米 |\n| 页码 | 居中显示，宋体四号 |\n\n### 字体规范\n\n| 样式 | 中文字体 | 西文字体 | 字号 |\n|------|----------|----------|------|\n| 首页大标题 | 方正小标宋简体 (FZXiaoBiaoSong-B05S) | Times New Roman | 小二号 (18pt) |\n| 正文 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 一级标题 | 黑体 | Times New Roman | 小三号 (15pt) |\n| 二级标题 | 楷体 | Times New Roman | 小三号 (15pt) |\n| 三级标题 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) 加粗 |\n| 页码 | 宋体 | - | 四号 (14pt) |\n| 表格 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小五号 (9pt) |\n\n### 行间距\n\n| 样式 | 行间距 |\n|------|--------|\n| 首页大标题 | 固定28磅 |\n| 正文 | 固定28磅 |\n| 一级标题 | 固定28磅 |\n| 二级标题 | 固定28磅 |\n| 三级标题 | 固定28磅 |\n| 图片 | 单倍行距 |\n| 表格 | 单倍行距 |\n\n### 段落格式\n\n| 样式 | 序号格式 | 首行缩进 | 大纲级别 |\n|------|----------|----------|----------|\n| 正文有缩进 | 无 | 2字符 | - |\n| 一级的标题 | 一、二、三、 | 2字符 | 1级 |\n| 二级的标题 | （一）（二）（三） | 2字符 | 2级 |\n| 三级的标题 | 1.2.3. | 2字符 | 3级 |\n\n## 样式名称\n\n创建文档时，必须使用以下样式名称：\n\n- `首页大标题` - 首页大标题\n- `正文有缩进` - 正文段落\n- `一级的标题` - 一级标题\n- `二级的标题` - 二级标题\n- `三级的标题` - 三级标题\n- `图片样式` - 图片\n- `表格样式` - 表格\n- `页码样式` - 页脚页码\n\n## 使用方法\n\n### 方式一：使用JavaScript脚本创建文档\n\n```javascript\nconst {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('~/.workbuddy/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1.第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2.第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths: [2000, 2000, 2000] }\n    ),\n  ]\n});\n\n// 生成文件\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('output.docx', buffer);\n});\n```\n\n### 方式二：使用CLI命令\n\n```bash\nnode scripts/create_gov_doc.js output.docx '{\n  \"title\": \"文档标题\",\n  \"body\": [\n    {\"type\": \"heading1\", \"text\": \"第一章\", \"number\": 0},\n    {\"type\": \"paragraph\", \"text\": \"正文内容\"},\n    {\"type\": \"table\", \"rows\": [...], \"columnWidths\": [2000, 2000, 2000]}\n  ]\n}'\n```\n\n## 表格规范\n\n- 表格宽度自动适应窗口（百分比100%），无需手动计算列宽\n- 列宽比例通过 `columnWidths` 参数控制（DXA 相对值，实际宽度自动缩放）\n- 表头：灰色底 (#D9D9D9)、加粗、居中\n- 内容：白色底、居中、小五号 (9pt) 字体\n- 边框：单线黑色\n\n```javascript\n// 表格示例\nconst border = { style: BorderStyle.SINGLE, size: 1, color: \"000000\" };\nconst borders = { top: border, bottom: border, left: border, right: border };\n\n// 表头行\nnew TableRow({\n  tableHeader: true,\n  children: [\n    new TableCell({\n      borders,\n      shading: { fill: \"D9D9D9\", type: ShadingType.CLEAR },\n      children: [new Paragraph({ children: [new TextRun({ text: \"表头\", bold: true })] })]\n    })\n  ]\n});\n```\n\n## 图片规范\n\n- 行间距：单倍行距\n- 对齐：居中\n- 样式名称：`图片样式`\n\n## 文档属性\n\n- 删除文档作者（`dc:creator` 和 `lastModifiedBy` 留空或不写入）\n- 在创建文档时不要设置 `creator` 属性，或设置为空字符串\n\n## 完整示例\n\n```javascript\nconst fs = require('fs');\nconst {\n  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,\n  Footer, BorderStyle, WidthType, ShadingType, VerticalAlign,\n  PageNumber, ImageRun, AlignmentType, HeadingLevel, LevelFormat,\n  createTitleParagraph, createBodyParagraph, createLevel1Heading,\n  createLevel2Heading, createLevel3Heading, createTable,\n  createImageParagraph, createDocument, CHINESE_FONTS, FONT_SIZES,\n  CONTENT_WIDTH, PAGE_MARGINS, LINE_SPACING_EXACT_28\n} = require('~/.workbuddy/skills/gov-doc-writing/scripts/create_gov_doc.js');\n\n// 内容构建\nconst sections = [\n  createTitleParagraph('关于XXX工作的报告'),\n\n  createLevel1Heading('一、基本情况', 0),\n  createBodyParagraph('这里是正文内容，详细描述基本情况。'),\n  createBodyParagraph('继续描述相关内容和细节。'),\n\n  createLevel1Heading('二、主要做法', 1),\n  createLevel2Heading('（一）加强组织领导', 0),\n  createBodyParagraph('具体做法描述...'),\n  createLevel2Heading('（二）完善制度建设', 1),\n  createBodyParagraph('制度建设内容...'),\n\n  createLevel1Heading('三、存在问题', 2),\n  createBodyParagraph('当前存在以下问题：'),\n  createLevel3Heading('问题一', 0),\n  createBodyParagraph('问题一的具体描述。'),\n  createLevel3Heading('问题二', 1),\n  createBodyParagraph('问题二的具体描述。'),\n\n  createLevel1Heading('四、下一步计划', 3),\n  createBodyParagraph('针对以上问题，计划采取以下措施...'),\n];\n\n// 创建文档（不设置作者）\nconst doc = createDocument({\n  title: '关于XXX工作的报告',\n  sections\n});\n\n// 生成并保存\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('report.docx', buffer);\n  console.log('文档已生成: report.docx');\n});\n```\n\n## 注意事项\n\n1. **字号转换**：Word中的\"号\"转换为半磅值（如小三号=30，小二号=36，四号=28，小五号=18）\n2. **行间距固定28磅**：line值设置为560（28 × 20），lineRule设置为\"exact\"\n3. **首行缩进**：使用 `indent: { firstLine: charWidth * 2 }`，字符宽度约等于字号的一半\n4. **页码**：仅在页脚居中显示，使用宋体四号\n5. **不要封面**：文档从首页大标题开始，不创建封面页\n6. **文档作者**：不设置或留空\n7. **双引号自动规范化**：所有文本内容中的 ASCII 双引号 `\"` 会自动替换为配对的中文双引号 `\"\"`（`\\u201c`/`\\u201d`），无需手动转换\n\n## 相关文件\n\n- `scripts/create_gov_doc.js` - 核心创建函数库\n\nFile v1.6.0:_meta.json\n\n{\n  \"ownerId\": \"kn761ajb8xnkak52sb6wc60hvx831ymg\",\n  \"slug\": \"gov-doc-writing\",\n  \"version\": \"1.6.0\",\n  \"publishedAt\": 1777181757675\n}\n\nFile v1.6.0:CHANGELOG.md\n\n# 国央企Word文档技能更新日志\n\n## [1.6.0] - 2026-04-25\n\n### 变更\n- **二级标题序号格式调整**：去掉序号后的顿号\n  - 旧格式：`（一）、标题内容`\n  - 新格式：`（一）标题内容`\n  - 涉及函数：`createLevel2Heading`、`createLevel2HeadingSafe`\n\n- **三级标题序号格式调整**：序号后改用点号，去掉顿号\n  - 旧格式：`1、标题内容`\n  - 新格式：`1.标题内容`\n  - 涉及函数：`createLevel3Heading`\n\n- **表格宽度改为自动适应**：改为百分比宽度，自动适应窗口和内容\n  - 旧方式：固定 DXA 宽度（按页面内容区域计算）\n  - 新方式：`WidthType.PERCENTAGE` 100%（自动铺满可用宽度）\n  - 涉及函数：`createTable`\n\n- **双引号自动规范化为中文引号**：所有文本内容中的 ASCII 双引号 `\"` 自动替换为配对的中文双引号 `\"\"`\n  - 规则：按出现顺序奇偶配对，奇数位→左引号 `\"`，偶数位→右引号 `\"`\n  - 已有的正确中文引号对保持不变，全角引号 `\"` `\"` 也统一为 `\\u201c` `\\u201d`\n  - 奇数个引号时自动容错闭合为右引号\n  - 涉及函数：`normalizeQuotes`（新增）、`createTextRunsFromSegments`、`createTitleParagraph`、`createTable`、`createTableHeaderRow`\n  - 覆盖范围：正文、标题（全部层级）、表格单元格、表头行\n\n## [1.5.0] - 2026-04-08\n\n### 修复\n- **Bug 5：正文首行缩进只有1字符而非2字符**\n  - 问题：所有样式定义（`正文有缩进`、`一级的标题`、`二级的标题`、`三级的标题`）中的首行缩进计算公式错误\n  - 错误公式：`Math.round(2 * FONT_SIZES['小三号'] / 2 * 10)` = 300 Twips（仅1字符）\n  - 错误原因：`FONT_SIZES['小三号'] = 30`（半磅值 = 15pt），正确换算应为 `15pt × 20twips/pt = 300twips = 1字符`，2字符需要 `600 twips`；而原公式 `/2 * 10 = * 5` 实际只得到1字符\n  - 修复公式：`2 * FONT_SIZES['小三号'] * 10` = 600 Twips（正确2字符）\n  - 同时修复 `createDocument` 中 `charWidth` 变量的计算，从约150改为正确的300 Twips\n  - 影响样式：`正文有缩进`、`一级的标题`、`二级的标题`、`三级的标题`\n\n## [1.4.0] - 2026-04-07\n\n### 新增\n- 添加 `createGovDocument(content, outputPath)` 便捷函数，简化文档生成流程\n  - 支持通过简单的内容对象定义文档结构\n  - 支持类型：title、body、heading1、heading2、heading3、table\n  - 自动处理标题序号计数和添加\n\n### 修复\n- **Bug 4：Word中显示\"由多种样式组成\"**\n  - 问题：段落中的 `TextRun` 元素包含 `rPr`（直接格式化属性），导致 Word 认为段落同时应用了样式和直接格式化\n  - 修复：移除所有 `TextRun` 中的 `rPr` 元素，只保留 `pPr` 中的 `pStyle` 样式引用\n  - 影响函数：createTitleParagraph、createBodyParagraph、createLevel1Heading、createLevel2Heading、createLevel3Heading、createTable、createTableHeaderRow\n\n## [1.3.0] - 2026-04-07\n\n### 修复\n- **Bug 3：Word中新增内容字体不生效**\n  - 问题：样式定义中只使用 `run.font` 设置单一字体，Word 样式系统对于中西文混排需要分别指定中文字体和西文字体\n  - 修复：在所有样式定义中将 `run.font` 从字符串改为对象格式\n    - `eastAsia`: 对应中文字体（方正仿宋/黑体/楷体/方正小标宋）\n    - `ascii`: Times New Roman（西文字体）\n    - `hAnsi`: Times New Roman\n    - `cs`: Times New Roman\n\n## [1.2.0] - 2026-04-07\n\n### 修复\n- **Bug 2：表格中西文字体未正确应用**\n  - 问题：表格单元格和表头行中的文本直接使用 `new TextRun` 创建，只指定了中文字体，没有分别处理中西文字符\n  - 修复：\n    - 修改 `createTable` 函数，使用 `createTextRunsFromSegments` 处理单元格文本\n    - 修改 `createTableHeaderRow` 函数，使用 `createTextRunsFromSegments` 处理表头文本\n\n## [1.1.0] - 2026-04-07\n\n### 修复\n- **Bug 1：标题序号重复**\n  - 问题：一级、二级、三级标题函数在传入序号参数时会自动添加序号前缀，如果调用者已经在text中写了序号，会导致重复（如\"一、一、会议议程\"）\n  - 修复：在 `createLevel1Heading`、`createLevel2Heading`、`createLevel3Heading` 函数中添加序号前缀检测逻辑\n    - 检测text是否已包含对应格式的序号前缀\n    - 如果已包含正确序号，则不再添加\n    - 如果包含其他序号，则替换为正确序号\n    - 如果没有序号，则添加序号前缀\n\n## [1.0.0] - 初始版本\n\n### 功能\n- 创建符合中国政府及央企规范的Word文档(.docx)\n- 支持页面设置（A4纸张、标准边距）\n- 支持标准字体规范（方正小标宋、方正仿宋、黑体、楷体）\n- 支持标题层级（一级、二级、三级标题）\n- 支持表格创建（自动计算列宽、表头样式）\n- 支持图片插入\n- 支持页码设置\n- 提供完整的JavaScript API\n\nFile v1.6.0:_skillhub_meta.json\n\n{\n  \"name\": \"国央企word文档\",\n  \"installedAt\": 1776080157936,\n  \"source\": \"import\"\n}\n\nFile v1.6.0:package-lock.json\n\n{\n  \"name\": \"gov-doc-writing\",\n  \"lockfileVersion\": 3,\n  \"requires\": true,\n  \"packages\": {\n    \"\": {\n      \"dependencies\": {\n        \"docx\": \"^9.6.1\"\n      }\n    },\n    \"node_modules/@types/node\": {\n      \"version\": \"25.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz\",\n      \"integrity\": \"sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"undici-types\": \"~7.18.0\"\n      }\n    },\n    \"node_modules/core-util-is\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz\",\n      \"integrity\": \"sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/docx\": {\n      \"version\": \"9.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/docx/-/docx-9.6.1.tgz\",\n      \"integrity\": \"sha512-ZJja9/KBUuFC109sCMzovoq2GR2wCG/AuxivjA+OHj/q0TEgJIm3S7yrlUxIy3B+bV8YDj/BiHfWyrRFmyWpDQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"@types/node\": \"^25.2.3\",\n        \"hash.js\": \"^1.1.7\",\n        \"jszip\": \"^3.10.1\",\n        \"nanoid\": \"^5.1.3\",\n        \"xml\": \"^1.0.1\",\n        \"xml-js\": \"^1.6.8\"\n      },\n      \"engines\": {\n        \"node\": \">=10\"\n      }\n    },\n    \"node_modules/hash.js\": {\n      \"version\": \"1.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz\",\n      \"integrity\": \"sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"inherits\": \"^2.0.3\",\n        \"minimalistic-assert\": \"^1.0.1\"\n      }\n    },\n    \"node_modules/immediate\": {\n      \"version\": \"3.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz\",\n      \"integrity\": \"sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/inherits\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz\",\n      \"integrity\": \"sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==\",\n      \"license\": \"ISC\"\n    },\n    \"node_modules/isarray\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n      \"integrity\": \"sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/jszip\": {\n      \"version\": \"3.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz\",\n      \"integrity\": \"sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==\",\n      \"license\": \"(MIT OR GPL-3.0-or-later)\",\n      \"dependencies\": {\n        \"lie\": \"~3.3.0\",\n        \"pako\": \"~1.0.2\",\n        \"readable-stream\": \"~2.3.6\",\n        \"setimmediate\": \"^1.0.5\"\n      }\n    },\n    \"node_modules/lie\": {\n      \"version\": \"3.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/lie/-/lie-3.3.0.tgz\",\n      \"integrity\": \"sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"immediate\": \"~3.0.5\"\n      }\n    },\n    \"node_modules/minimalistic-assert\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz\",\n      \"integrity\": \"sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==\",\n      \"license\": \"ISC\"\n    },\n    \"node_modules/nanoid\": {\n      \"version\": \"5.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/nanoid/-/nanoid-5.1.7.tgz\",\n      \"integrity\": \"sha512-ua3NDgISf6jdwezAheMOk4mbE1LXjm1DfMUDMuJf4AqxLFK3ccGpgWizwa5YV7Yz9EpXwEaWoRXSb/BnV0t5dQ==\",\n      \"funding\": [\n        {\n          \"type\": \"github\",\n          \"url\": \"https://github.com/sponsors/ai\"\n        }\n      ],\n      \"license\": \"MIT\",\n      \"bin\": {\n        \"nanoid\": \"bin/nanoid.js\"\n      },\n      \"engines\": {\n        \"node\": \"^18 || >=20\"\n      }\n    },\n    \"node_modules/pako\": {\n      \"version\": \"1.0.11\",\n      \"resolved\": \"https://registry.npmjs.org/pako/-/pako-1.0.11.tgz\",\n      \"integrity\": \"sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==\",\n      \"license\": \"(MIT AND Zlib)\"\n    },\n    \"node_modules/process-nextick-args\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz\",\n      \"integrity\": \"sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/readable-stream\": {\n      \"version\": \"2.3.8\",\n      \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz\",\n      \"integrity\": \"sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"core-util-is\": \"~1.0.0\",\n        \"inherits\": \"~2.0.3\",\n        \"isarray\": \"~1.0.0\",\n        \"process-nextick-args\": \"~2.0.0\",\n        \"safe-buffer\": \"~5.1.1\",\n        \"string_decoder\": \"~1.1.1\",\n        \"util-deprecate\": \"~1.0.1\"\n      }\n    },\n    \"node_modules/safe-buffer\": {\n      \"version\": \"5.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n      \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/sax\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/sax/-/sax-1.6.0.tgz\",\n      \"integrity\": \"sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==\",\n      \"license\": \"BlueOak-1.0.0\",\n      \"engines\": {\n        \"node\": \">=11.0.0\"\n      }\n    },\n    \"node_modules/setimmediate\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz\",\n      \"integrity\": \"sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/string_decoder\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n      \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"safe-buffer\": \"~5.1.0\"\n      }\n    },\n    \"node_modules/undici-types\": {\n      \"version\": \"7.18.2\",\n      \"resolved\": \"https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz\",\n      \"integrity\": \"sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/util-deprecate\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz\",\n      \"integrity\": \"sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/xml\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/xml/-/xml-1.0.1.tgz\",\n      \"integrity\": \"sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==\",\n      \"license\": \"MIT\"\n    },\n    \"node_modules/xml-js\": {\n      \"version\": \"1.6.11\",\n      \"resolved\": \"https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz\",\n      \"integrity\": \"sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==\",\n      \"license\": \"MIT\",\n      \"dependencies\": {\n        \"sax\": \"^1.2.4\"\n      },\n      \"bin\": {\n        \"xml-js\": \"bin/cli.js\"\n      }\n    }\n  }\n}\n\nFile v1.6.0:package.json\n\n{\n  \"name\": \"gov-doc-writing\",\n  \"version\": \"1.5.0\",\n  \"description\": \"创建符合中国政府及央企规范的Word文档(.docx)\",\n  \"author\": \"刘洪亮\",\n  \"dependencies\": {\n    \"docx\": \"^9.6.1\"\n  }\n}","readmeExcerpt":"Skill: 国央企word文档 Owner: a-lhliang Summary: 此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。 Tags: latest:1.12.4 Version history: v1.12.4 | 2026-08-10T09:36:28.444Z | user - 修订了落款间隔3行。 v1.12.2 | 2026-07-28T09:44:18.167Z | user 1、新增附件列表（正文空一行）及附件分页； 2、新增首页标题下空一行； 3、优化了文档结构。 v1.10.0 | 2026-06-04T06:14:10.507Z | user “落款-部门”“落款-日期”两类落款样式，及右下对齐规范。 v1.7.1 | 2026-05-26T01:51","codeSnippets":[],"executableExamples":[{"language":"javascript","snippet":"const {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  createAttachmentBlock,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('/Users/lhliang/.workbuddy/skills/workbuddy-skill-1777171174172/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1.第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2.第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths: [2000, 2000, 2000] }\n    ),\n  ]\n});\n\n// 生成文件\nPacker.toBuffer(doc).then(buffer => {\n  fs.writeFileSync('output.docx', buffer);\n});"},{"language":"bash","snippet":"node scripts/create_gov_doc.js output.docx '{\n  \"title\": \"文档标题\",\n  \"body\": [\n    {\"type\": \"heading1\", \"text\": \"第一章\", \"number\": 0},\n    {\"type\": \"paragraph\", \"text\": \"正文内容\"},\n    {\"type\": \"table\", \"rows\": [...], \"columnWidths\": [2000, 2000, 2000]}\n  ]\n}'"},{"language":"javascript","snippet":"// 表格示例\nconst border = { style: BorderStyle.SINGLE, size: 1, color: \"000000\" };\nconst borders = { top: border, bottom: border, left: border, right: border };\n\n// 表头行\nnew TableRow({\n  tableHeader: true,\n  children: [\n    new TableCell({\n      borders,\n      shading: { fill: \"D9D9D9\", type: ShadingType.CLEAR },\n      children: [new Paragraph({ children: [new TextRun({ text: \"表头\", bold: true })] })]\n    })\n  ]\n});"},{"language":"javascript","snippet":"const { createSignatureBlock } = require('...');\n\n// 一键创建落款块（含三行空行 + 部门名称 + 日期）\nsections.push(...createSignatureBlock('科技创新部', '2026年6月'));"},{"language":"text","snippet":"附件：1.科技创新工作周报表"},{"language":"text","snippet":"附件：1.科技创新工作周报表\n      2.项目实施情况明细表\n      3.下一步工作计划"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"国央企word文档\"\ndescription: \"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。\"\nauthor: \"刘洪亮\"\nversion: \"1.12.4\"\n---\n\n# 国央企Work文档创建技能\n\n本技能用于创建符合中国政府及央企规范的Word文档(.docx)，使用Microsoft Word最新格式。\n\n## 文档格式规范\n\n### 页面设置\n\n| 属性 | 值 |\n|------|-----|\n| 纸张 | A4 |\n| 上边距 | 3.7厘米 |\n| 下边距 | 3.5厘米 |\n| 左边距 | 2.8厘米 |\n| 右边距 | 2.6厘米 |\n| 页码 | 居中显示，宋体四号 |\n\n### 字体规范\n\n| 样式 | 中文字体 | 西文字体 | 字号 |\n|------|----------|----------|------|\n| 首页大标题 | 方正小标宋简体 (FZXiaoBiaoSong-B05S) | Times New Roman | 小二号 (18pt) |\n| 正文 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 正文无缩进 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 一级标题 | 黑体 | Times New Roman | 小三号 (15pt) |\n| 二级标题 | 楷体 | Times New Roman | 小三号 (15pt) |\n| 三级标题 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) 加粗 |\n| 落款-部门 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 落款-日期 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小三号 (15pt) |\n| 页码 | 宋体 | - | 四号 (14pt) |\n| 表格 | 方正仿宋简体 (FZFangSong-Z02S) | Times New Roman | 小五号 (9pt) |\n\n### 行间距\n\n| 样式 | 行间距 |\n|------|--------|\n| 首页大标题 | 固定28磅 |\n| 正文 | 固定28磅 |\n| 正文无缩进 | 固定28磅 |\n| 一级标题 | 固定28磅 |\n| 二级标题 | 固定28磅 |\n| 三级标题 | 固定28磅 |\n| 落款-部门 | 固定28磅 |\n| 落款-日期 | 固定28磅 |\n| 图片 | 单倍行距 |\n| 表格 | 单倍行距 |\n\n### 段落格式\n\n| 样式 | 序号格式 | 首行缩进 | 大纲级别 |\n|------|----------|----------|----------|\n| 正文有缩进 | 无 | 2字符 | - |\n| 正文无缩进 | 无 | 0 | 1级 |\n| 一级的标题 | 一、二、三、 | 2字符 | 1级 |\n| 二级的标题 | （一）（二）（三） | 2字符 | 2级 |\n| 三级的标题 | 1.2.3. | 2字符 | 3级 |\n| 落款-部门 | 无 | 无 | - |\n| 落款-日期 | 无 | 无 | - |\n\n## 样式名称\n\n创建文档时，必须使用以下样式名称：\n\n- `首页大标题` - 首页大标题\n- `正文有缩进` - 正文段落\n- `正文无缩进` - 无缩进正文段落（大纲级别一级，用于附件分页标题等需要出现在导航窗格的段落）\n- `一级的标题` - 一级标题\n- `二级的标题` - 二级标题\n- `三级的标题` - 三级标题\n- `图片样式` - 图片\n- `表格样式` - 表格\n- `落款-部门` - 部门落款（右下对齐）\n- `落款-日期` - 日期落款（右下对齐，自动与部门左对齐）\n- `页码样式` - 页脚页码\n\n## 使用方法\n\n### 方式一：使用JavaScript脚本创建文档\n\n```javascript\nconst {\n  createDocument,\n  createTitleParagraph,\n  createBodyParagraph,\n  createLevel1Heading,\n  createLevel2Heading,\n  createLevel3Heading,\n  createTable,\n  createImageParagraph,\n  createAttachmentBlock,\n  CHINESE_FONTS,\n  FONT_SIZES,\n  CONTENT_WIDTH,\n  Packer,\n  BorderStyle,\n  WidthType,\n  ShadingType,\n  VerticalAlign,\n  Paragraph,\n  TextRun,\n  Table,\n  TableRow,\n  TableCell,\n  Footer,\n  ImageRun,\n} = require('/Users/lhliang/.workbuddy/skills/workbuddy-skill-1777171174172/scripts/create_gov_doc.js');\n\n// 创建文档\nconst doc = createDocument({\n  title: '文档标题',\n  sections: [\n    // 首页大标题\n    createTitleParagraph('这是文档标题'),\n\n    // 一级标题\n    createLevel1Heading('第一章', 0),  // 输出: 一、第一章\n    createLevel1Heading('第二章', 1),  // 输出: 二、第二章\n\n    // 二级标题\n    createLevel2Heading('第一节', 0),  // 输出: （一）第一节\n    createLevel2Heading('第二节', 1),  // 输出: （二）第二节\n\n    // 三级标题\n    createLevel3Heading('第一点', 0),  // 输出: 1.第一点\n    createLevel3Heading('第二点', 1),  // 输出: 2.第二点\n\n    // 正文\n    createBodyParagraph('这是正文内容，首行自动缩进2字符。'),\n\n    // 表格\n    createTable(\n      [\n        { children: ['表头1', '表头2', '表头3'] },\n        { children: ['内容1', '内容2', '内容3'] },\n      ],\n      { columnWidths"},{"path":"node_modules/@types/node/README.md","content":"# Installation\r\n> `npm install --save @types/node`\r\n\r\n# Summary\r\nThis package contains type definitions for node (https://nodejs.org/).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.\r\n\r\n### Additional Details\r\n * Last updated: Fri, 03 Apr 2026 11:14:41 GMT\r\n * Dependencies: [undici-types](https://npmjs.com/package/undici-types)\r\n\r\n# Credits\r\nThese definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig)."},{"path":"node_modules/core-util-is/README.md","content":"# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12."},{"path":"node_modules/docx/README.md","content":"<p align=\"center\">\n    <img src=\"./logo/logo-animate.svg\" width=\"100%\" height=\"300\" alt=\"clippy the assistant\">\n</p>\n\n<p align=\"center\">\n    Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.\n</p>\n\n---\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads per month][downloads-image]][downloads-url]\n[![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url]\n[![Known Vulnerabilities][snky-image]][snky-url]\n[![PRs Welcome][pr-image]][pr-url]\n[![codecov][codecov-image]][codecov-url]\n[![Docx.js Editor][docxjs-editor-image]][docxjs-editor-url]\n\n<p align=\"center\">\n    <img src=\"https://i.imgur.com/QeL1HuU.png\" alt=\"drawing\"/>\n</p>\n\n# Demo\n\n## Browser\n\nHere are examples of `docx` being used with basic `HTML/JS` in a browser environment:\n\n-   https://codepen.io/dolanmiu/pen/RwNeObg\n-   https://jsfiddle.net/dolanmiu/onadx1gu/\n\nHere are examples of `docx` working in `Angular`:\n\n-   https://stackblitz.com/edit/angular-docx\n-   https://stackblitz.com/edit/angular-wmd6k3\n\nHere are examples of `docx` working in `React`:\n\n-   https://stackblitz.com/edit/react-docx\n-   https://stackblitz.com/edit/react-docx-images (adding images to Word Document)\n\nHere is an example of `docx` working in `Vue.js`:\n\n-   https://stackblitz.com/edit/vuejs-docx\n\n## Node\n\nPress `endpoint` on the `RunKit` website:\n\n![RunKit Instructions](https://user-images.githubusercontent.com/2917613/38582539-f84311b6-3d07-11e8-90db-5885ae02c3c4.png)\n\n-   https://runkit.com/dolanmiu/docx-demo1 - Simple paragraph and text\n-   https://runkit.com/dolanmiu/docx-demo2 - Advanced Paragraphs and text\n-   https://runkit.com/dolanmiu/docx-demo3 - Bullet points\n-   https://runkit.com/dolanmiu/docx-demo4 - Simple table\n-   https://runkit.com/dolanmiu/docx-demo5 - Images\n-   https://runkit.com/dolanmiu/docx-demo6 - Margins\n-   https://runkit.com/dolanmiu/docx-demo7 - Landscape\n-   https://runkit.com/dolanmiu/docx-demo8 - Header and Footer\n-   https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx**\n\nMore [here](https://github.com/dolanmiu/docx/tree/master/demo)\n\n# How to use & Documentation\n\nPlease refer to the [documentation at https://docx.js.org/](https://docx.js.org/) for details on how to use this library, examples and much more!\n\n# Playground\n\nExperience `docx` in action through [Docx.js Editor][docxjs-editor-url], an interactive playground where you can code and preview the results in real-time.\n\n# Examples\n\nCheck the [demo folder](https://github.com/dolanmiu/docx/tree/master/demo) for examples.\n\n# Contributing\n\nRead the contribution guidelines [here](https://docx.js.org/#/contribution-guidelines).\n\n# Used by\n\n[<img src=\"https://i.imgur.com/zy5qWmI.png\" alt=\"drawing\" height=\"50\"/>](https://hfour.com/)\n[<img src=\"https://i.imgur.com/OYP5tgS.png\" alt=\"drawing\" height=\"50\"/>](https://fuzzproductions.com/)\n[<img src=\"https://i.imgur.com/zUDMfZ3.png\" alt=\"drawing\" height=\"50\"/>](https://www.mettzer.com/)\n[<img src=\"https://i.img"},{"path":"node_modules/hash.js/README.md","content":"# hash.js [![Build Status](https://secure.travis-ci.org/indutny/hash.js.svg)](http://travis-ci.org/indutny/hash.js)\n\nJust a bike-shed.\n\n## Install\n\n```sh\nnpm install hash.js\n```\n\n## Usage\n\n```js\nvar hash = require('hash.js')\nhash.sha256().update('abc').digest('hex')\n```\n\n## Selective hash usage\n\n```js\nvar sha512 = require('hash.js/lib/hash/sha/512');\nsha512().update('abc').digest('hex');\n```\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。 Skill: 国央企word文档 Owner: a-lhliang Summary: 此技能用于创建符合中国政府及央企规范的Word文档(.docx)。当用户要求创建公文、国央企文档、规范文书、正式报告等需要特定中国公文格式的文档时使用此技能。公文字体（方正仿宋简体）可以自行下载。 Tags: latest:1.12.4 Version history: v1.12.4 | 2026-08-10T09:36:28.444Z | user - 修订了落款间隔3行。 v1.12.2 | 2026-07-28T09:44:18.167Z | user 1、新增附件列表（正文空一行）及附件分页； 2、新增首页标题下空一行； 3、优化了文档结构。 v1.10.0 | 2026-06-04T06:14:10.507Z | user “落款-部门”“落款-日期”两类落款样式，及右下对齐规范。 v1.7.1 | 2026-05-26T01:51","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":821,"uniquenessScore":59,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:22:50.394Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:22:50.394Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:56:23.457Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}