ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

docx-cn

Word 文档处理 | Word Document Processing. 创建、读取、编辑 Word 文档 | Create, read, edit Word documents. 支持 .docx 格式、格式化、表格、图片 | Supports .docx format, formatting, tables, images. 触发词:Word、文档、docx.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/binbin/docx-cn-1-0-1
Or

DOCX creation, editing, and analysis

Overview

A .docx file is a ZIP archive containing XML files.

Quick Reference

TaskApproach
Read/analyze contentpandoc or unpack for raw XML
Create new documentUse docx-js - see Creating New Documents below
Edit existing documentUnpack → edit XML → repack - see Editing Existing Documents below

Converting .doc to .docx

Legacy .doc files must be converted before editing:

python scripts/office/soffice.py --headless --convert-to docx document.doc

Reading Content

# Text extraction with tracked changes
pandoc --track-changes=all document.docx -o output.md

# Raw XML access
python scripts/office/unpack.py document.docx unpacked/

Converting to Images

python scripts/office/soffice.py --headless --convert-to pdf document.docx
pdftoppm -jpeg -r 150 document.pdf page

Accepting Tracked Changes

To produce a clean document with all tracked changes accepted (requires LibreOffice):

python scripts/accept_changes.py input.docx output.docx

Creating New Documents

Generate .docx files with JavaScript, then validate. Install: npm install -g docx

Setup

const { Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell, ImageRun,
        Header, Footer, AlignmentType, PageOrientation, LevelFormat, ExternalHyperlink,
        TableOfContents, HeadingLevel, BorderStyle, WidthType, ShadingType,
        VerticalAlign, PageNumber, PageBreak } = require('docx');

const doc = new Document({ sections: [{ children: [/* content */] }] });
Packer.toBuffer(doc).then(buffer => fs.writeFileSync("doc.docx", buffer));

Validation

After creating the file, validate it. If validation fails, unpack, fix the XML, and repack.

python scripts/office/validate.py doc.docx

Page Size

// CRITICAL: docx-js defaults to A4, not US Letter
// Always set page size explicitly for consistent results
sections: [{
  properties: {
    page: {
      size: {
        width: 12240,   // 8.5 inches in DXA
        height: 15840   // 11 inches in DXA
      },
      margin: { top: 1440, right: 1440, bottom: 1440, left: 1440 } // 1 inch margins
    }
  },
  children: [/* content */]
}]

Common page sizes (DXA units, 1440 DXA = 1 inch):

PaperWidthHeightContent Width (1" margins)
US Letter12,24015,8409,360
A4 (default)11,90616,8389,026

Landscape orientation: docx-js swaps width/height internally, so pass portrait dimensions and let it handle the swap:

size: {
  width: 12240,   // Pass SHORT edge as width
  height: 15840,  // Pass LONG edge as height
  orientation: PageOrientation.LANDSCAPE  // docx-js swaps them in the XML
},
// Content width = 15840 - left margin - right margin (uses the long edge)

Styles (Override Built-in Headings)

Metadata

Author@binbin
Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-binbin-docx-cn-1-0-1": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.

Related Skills

im-social-insurance-backpay

内蒙古养老保险补缴计算工具。用于计算内蒙古地区养老保险补缴金额,包括本金、利息(按月复利计息)、滞纳金等明细。 **触发关键词**:社保补缴、社保补费、补缴、补费、养老保险补缴、社保欠费计算 **使用场景**: 1. 计算历史欠缴养老保险的补缴金额 2. 估算补缴本金、利息、滞纳金明细 3. 对比不同缴费档次(60%/80%/100%/150%/200%/300%)的补缴金额 4. 计算无滞纳金情况下的补缴金额 **输入参数**: - 补缴起止年月(必填) - 缴费档次比例(可选,默认60%,支持--all计算全部档次) - 补缴时间(可选,默认当前时间) - 自定义月缴费基数(可选,设置后忽略档次比例和社平工资) **输出结果**: - 个人本金、单位本金 - 个人利息、单位利息(按月复利计算) - 个人滞纳金、单位滞纳金 - 有滞纳金和无滞纳金分别汇总 - 支持六档对比:60%、80%、100%、150%、200%、300%

binbin 4473

openclaw-skills-setup-cn

ClawHub 安装与配置 | ClawHub setup. 帮助中文用户安装 ClawHub、配置镜像(如阿里云)、 找技能(发现/推荐)、以及技能的安装/更新/启用/禁用。 Use when: 安装 clawhub, clawhub 怎么用, 找技能/找 skill, 有什么技能可以/有什么 skill 可以, 找一个技能/找一个 skill, 搜索技能/搜索 skill, 安装技能/安装 skill, 更新技能/更新 skill, 管理技能/管理 skill, clawhub init, clawhub install, clawhub search, clawhub update, openclaw skills.

binbin 4473

software-copyright-cn

中国计算机软件著作权登记申请材料生成器。用于生成软著申请所需的全部材料,包括软件基本信息表单填写、程序鉴别材料PDF(源代码语法高亮)、文档鉴别材料PDF(用户手册)。当用户提到"软著"、"软件著作权"、"著作权登记"、"版权登记"、"软著申请"、"copyright registration"时使用此技能。

binbin 4473

install-openclaw

OpenClaw 全自动安装、配置和修复工具。包括:OpenClaw 安装、Claude API 中转站配置、飞书插件集成、bug 自动修复。当用户需要安装、配置或修复 OpenClaw 时使用此技能。

binbin 4473

feishu-docs

飞书文档(Docx)API技能。用于创建、读取、更新和删除飞书文档。支持Markdown/HTML内容转换、文档权限管理。

binbin 4473