professional-docx

Use when asked to create Word doc, client-ready document, interview template, capture template, report, user guide, or .docx output for client/customer/external use. Produces professional-grade Word documents directly with docx-js instead of markdown conversion.

Get this skill

---

name: professional-docx

description: Use when asked to create Word doc, client-ready document, interview template, capture template, report, user guide, or .docx output for client/customer/external use. Produces professional-grade Word documents directly with docx-js instead of markdown conversion.

---

Professional DOCX

Non-negotiable rule

For client-facing or external `.docx` documents, **NEVER use pandoc or markdown-to-docx conversion**. Do not generate markdown and convert it. Build the Word document directly with `docx` / docx-js so headings, tables, bullets, headers, footers, spacing and page layout are intentional.

Use `/root/.openclaw/workspace/skills/professional-docx/reference-build.js` as the implementation pattern.

When to use

Use this skill for:

→ create Word doc

→ client-ready document

→ interview template

→ capture template

→ report

→ user guide

→ `.docx` output for a client/customer/external audience

→ any document where ugly markdown artefacts, raw `##`, literal `**bold**`, or unstyled tables would be unacceptable

Workflow

1. Decide orientation:

→ Landscape A4 for wide tables, capture templates, assessment matrices.

→ Portrait A4 for narrative-only documents.

2. Create a Node build script using `docx` directly.

3. Define brand/theme constants at the top of the script.

4. Use built-in Heading1/2/3 style IDs and outline levels for TOC support.

5. Build tables with fixed DXA widths, explicit column widths and explicit cell widths.

6. Use docx numbering for bullets/numbers; never inline unicode bullets.

7. Add section header and footer to every section.

8. Generate `.docx` via `Packer.toBuffer()`.

9. Validate the output:

```bash

python3 /mnt/skills/public/docx/scripts/office/validate.py output.docx

```

If the validator path is unavailable, at minimum run a ZIP integrity check and inspect generated XML. Do not knowingly ship invalid DOCX.

10. For first-time templates, render to PDF via `soffice` and visually check 2-3 pages before declaring done.

Page setup

→ Landscape A4 for wide tables:

→ width `11906`, height `16838`, orientation `PageOrientation.LANDSCAPE`.

→ Margins `1080` DXA on all sides.

→ Content width landscape A4 = `14678` DXA.

→ Portrait A4 for narrative-only docs.

Theme constants

Always keep these constants near the top of build scripts:

```js

const COLOR_PRIMARY = "1F3A5F"; // deep navy — H1, H2, label cells

const COLOR_ACCENT = "2E75B6"; // mid blue — H3, accent rules, eyebrow text

const COLOR_MUTED = "6B7280"; // grey — captions, footers

const COLOR_ZEBRA = "F2F5F9"; // table zebra striping

const COLOR_BORDER = "BFC8D6"; // table borders

const COLOR_TEXT = "1F2937"; // body text

```

Typography

→ Font: Calibri throughout.

→ Body: 22 half-points / 11pt.

→ H1: 36.

→ H2: 28.

→ H3: 24.

→ Footer/header: 18.

Style overrides

Override built-in style IDs exactly:

→ `Heading1` with `outlineLevel: 0`

→ `Heading2` with `outlineLevel: 1`

→ `Heading3` with `outlineLevel: 2`

Tables — critical pattern

→ Always `WidthType.DXA`; never `WidthType.PERCENTAGE` for client-ready tables.

→ Always set both:

→ table `columnWidths` array; and

→ cell-level `width`.

→ Header row:

→ `tableHeader: true`

→ navy fill

→ white bold text

→ Body rows:

→ zebra stripe alternating rows: `i % 2 === 1` gets `COLOR_ZEBRA`

→ Cell margins:

→ top/bottom `100–140`

→ left/right `140`

→ Shading: use `ShadingType.CLEAR`, never `SOLID`.

→ Borders: `4pt` single, `COLOR_BORDER`.

Lists

→ Never inline unicode bullets (`•`).

→ Define document numbering config with both:

→ `bullets` using `LevelFormat.BULLET`

→ `nums` using decimal numbering

→ Use paragraph numbering references instead of literal bullet characters.

Headers and footers

Every section must include:

→ Header: document title left-aligned and project/context right-aligned via tab stop, with bottom border in `COLOR_ACCENT`.

→ Footer: organisation name + `Confidential` left, page `X of Y` right via tab stop using `PageNumber.CURRENT` and `PageNumber.TOTAL_PAGES`.

Cover page pattern

Include:

→ Eyebrow text: small caps, accent colour, character spacing 40.

→ Large title: size 56, bold, primary colour.

→ Subtitle: size 36, primary colour.

→ Accent rule: paragraph with 18-size bottom border.

→ Metadata block: label/value pairs with bold labels.

→ Italic muted “how to use this document” note.

Release evidence

Reviewed in the 2026-06-15 GetAgentIQ warehouse propagation cycle.