Skip to content
Agent Orchestration
Skill

/docx

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When GLM needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content,

From plugin
helloagents
2.7k17 skills
Install
$ npx -y skills add jjyaoao/helloagents --skill docx --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/docx

Context preview

The summary Claude sees to decide when to auto-load this skill.

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When GLM needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content,

SKILL.md

docx.SKILL.md
name: docx
description: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When GLM needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
license: Proprietary. LICENSE.txt has complete terms

DOCX creation, editing, and analysis

Overview

A user may ask you to create, edit, or analyze the contents of a .docx file. A .docx file is essentially a ZIP archive containing XML files and other resources that you can read or edit. You have different tools and workflows available for different tasks.

Design requiremnet

Deliver studio-quality Word documents with deep thought on content, functionality, and styling. Users often don't explicitly request advanced features (covers, TOC, backgrounds, back covers, footnotes, charts)—deeply understand needs and proactively extend. The document must have 1.3x line spacing and have charts centered horizontally.

Available color(choose one)

  • "Ink & Zen" Color Palette (Wabi-Sabi Style)

The design uses a grayscale "Ink" palette to differentiate from standard business blue/morandi styles. Primary (Titles):#0B1220 Body Text:#0F172A Secondary (Subtitles):#2B2B2B Accent (UI / Decor):#9AA6B2 Table Header / Subtle Background:#F1F5F9

  • Wilderness Oasis": Sage & Deep Forest

Primary (Titles): #1A1F16 (Deep Forest Ink) Body Text: #2D3329 (Dark Moss Gray) Secondary (Subtitles): #4A5548 (Neutral Olive) Accent (UI/Decor): #94A3B8 (Steady Silver) Table/Background: #F8FAF7 (Ultra-Pale Mint White)

  • "Terra Cotta Afterglow": Warm Clay & Greige

Commonly utilized by top-tier consulting firms and architectural studios, this scheme warms up the gray scale to create a tactile sensation similar to premium cashmere. Primary (Titles): #26211F (Deep Charcoal Espresso) Body Text: #3D3735 (Dark Umber Gray) Secondary (Subtitles): #6B6361 (Warm Greige) Accent (UI/Decor): #C19A6B (Terra Cotta Gold / Muted Ochre) Table/Background: #FDFCFB (Off-White / Paper Texture)

  • "Midnight Code": High-Contrast Slate & Silver

Ideal for cutting-edge technology, AI ventures, or digital transformation projects. This palette carries a slight "electric" undertone that provides superior visual penetration. Primary (Titles): #020617 (Midnight Black) Body Text: #1E293B (Deep Slate Blue) Secondary (Subtitles): #64748B (Cool Blue-Gray) Accent (UI/Decor): #94A3B8 (Steady Silver) Table/Background: #F8FAFC (Glacial Blue-White)

Chinese plot PNG method**

If using Python to generate PNGs containing Chinese characters, note that Matplotlib defaults to the DejaVu Sans font which lacks Chinese support; since the environment already has the SimHei font installed, you should set it as the default by configuring:

matplotlib.font_manager.fontManager.addfont('/usr/share/fonts/truetype/chinese/SimHei.ttf') plt.rcParams['font.sans-serif'] = ['SimHei'] plt.rcParams['axes.unicode_minus'] = False

Specialized Element Styling

  • Table Borders: Use a "Single" line style with a size of 12 and the Primary Ink color. Internal vertical borders should be set to Nil (invisible) to create a clean, modern horizontal-only look.
  • **CRITICAL: Table Cell Margins** - ALL tables MUST set `margins` property at the Table level to prevent text from touching borders. This is mandatory for professional document quality.

Alignment and Typography

CJK body: justify + 2-char indent. English: left. Table numbers: right. Headings: no indent. For both languages, Must use a line spacing of 1.3x (250 twips). Do not use single line spacing !!!

CRITICAL: Chinese Quotes in JavaScript/TypeScript Code

**MANDATORY**: When writing JavaScript/TypeScript code for docx-js, ALL Chinese quotation marks (""", ''') inside strings MUST be escaped as Unicode escape sequences:

  • Left double quote "\u201c" (")
  • Right double quote "\u201d" (")
  • Left single quote "\u2018" (')
  • Right single quote "\u2019" (')

**Example - INCORRECT (will cause syntax error):**

new TextRun({
  text: "他说"你好""  // ERROR: Chinese quotes break JS syntax
})

**Example - CORRECT:**

new TextRun({
  text: "他说\u201c你好\u201d"  // Correct: escaped Unicode
})

**Alternative - Use template literals:**

new TextRun({
  text: `他说"你好"`  // Also works: template literals allow Chinese quotes
})

Workflow Decision Tree

Reading/Analyzing Content

Use "Text extraction" or "Raw XML access" sections below.

Creating New Document

Use "Creating a new Word document" workflow.

Editing Existing Document

  • **Your own document + simple changes**

Use "Basic OOXML editing" workflow

  • **Someone else's document**

Use **"Redlining workflow"** (recommended default)

  • **Legal, academic, business, or government docs**

Use **"Redlining workflow"** (required)

Reading and analyzing content

**Note**: For .doc (legacy format), first convert with `libreoffice --convert-to docx file.doc`.

Text extraction

If you just need to read the text contents of a document, you should convert the document to markdown using pandoc. Pandoc provides excellent support for preserving document structure and can show tracked changes:

# Convert document to markdown with tracked changes
pandoc --track-changes=all path-to-file.docx -o output.md
# Options: --track-changes=accept/reject/all

Raw XML access

You need raw XML access for: comments, complex formatting, document structure, embedded media, and metadata. For any of these features, you'll need to unpack a document and read its raw XML contents.

Unpacking a file

`python ooxml/scripts/unpack.py <office_file> <output_directory>`

Key file structures

  • `word/document.xml` - Main document contents
  • `word/comments.xml` - Comments referenced in docume
Read more
Ships withhelloagents

🤖 生产级多智能体框架 - 工具响应协议、上下文工程、会话持久化、子代理机制等16项核心能力 HelloAgents 是一个基于 OpenAI 原生 API 构建的生产级多智能体框架,集成了工具响应协议(ToolResponse)、上下文工程(HistoryManager/TokenCounter)、会话持久化(SessionStore)、子代理机制(TaskTool)、乐观锁(文件编辑)、熔断器(CircuitBreaker)、Skills 知识外化、TodoWrite 进度管理、DevLog

Get the whole plugin
Stats
2,751
Stars
649
Forks
Maintained
Maintenance
Python
Language
2mo ago
Last commit
11mo ago
Created

Repo: jjyaoao/helloagents

Other skills on helloagents.