Word Document Reader and Writer
HKUDS/DeepTutor
Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.
Creates and edits Word documents along four paths of rising capability, from a quick tool to the docx library, an OOXML round-trip and pandoc, then verifies the file.
$ npx skills add spinabot/brigade --skill docx -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install spinabot/brigade docx --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/spinabot/brigade.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/docx .claude/skills/docx && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "docx" agent skill from https://github.com/spinabot/brigade/tree/main/skills/docx into .claude/skills/docx/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/spinabot/brigade/tree/main/skills/docxType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add spinabot/brigade --skill docx -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install spinabot/brigade docx --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spinabot/brigade.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/docx .agents/skills/docx && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "docx" agent skill from https://github.com/spinabot/brigade/tree/main/skills/docx into .agents/skills/docx/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add spinabot/brigade --skill docx -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install spinabot/brigade docx --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spinabot/brigade.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/docx .cursor/skills/docx && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "docx" agent skill from https://github.com/spinabot/brigade/tree/main/skills/docx into .cursor/skills/docx/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/spinabot/brigade.git --path skills/docx--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add spinabot/brigade --skill docx -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install spinabot/brigade docx --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spinabot/brigade.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/docx .gemini/skills/docx && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "docx" agent skill from https://github.com/spinabot/brigade/tree/main/skills/docx into .gemini/skills/docx/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install spinabot/brigade docxInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add spinabot/brigade --skill docx -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/spinabot/brigade.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/docx .github/skills/docx && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "docx" agent skill from https://github.com/spinabot/brigade/tree/main/skills/docx into .github/skills/docx/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add spinabot/brigade --skill docx -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install spinabot/brigade docx --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/spinabot/brigade.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/docx .opencode/skills/docx && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "docx" agent skill from https://github.com/spinabot/brigade/tree/main/skills/docx into .opencode/skills/docx/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docx", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
docxCreates and edits Word documents along four paths of rising capability, from a quick tool to the docx library, an OOXML round-trip and pandoc, then verifies the file.
Four paths are on offer, and the lightest one that fits the need is chosen. A simple make_document tool handles headings, paragraphs, bullets, a basic table and an image. Richer documents (custom styles, multi-level lists, merged or shaded cells, headers and footers, a table of contents, hyperlinks, footnotes, tracked changes, comments) are written as a CommonJS script using the docx library and run with brigade exec-node.
To fill or redline an existing branded file without losing its theme, the agent unzips the .docx, edits the XML and rezips it, with the edit_document tool as the first choice for plain placeholder swaps. Markdown can optionally be converted through pandoc using a corporate template. The skill insists that no document is called done until the result has been opened or validated at least once.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 4c2a18f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pandocsofficeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Word Document Builder loads about 2.1k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 578 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from spinabot/brigade at commit 4c2a18f, republished under its MIT licence (© spinabot). 578 words, ~2,059 tokens.
.claude/skills/docx/SKILL.md (or your agent's skills folder).Pick the lightest path that meets the need. Never declare a document done without opening/validating the result at least once (see Verify).
| Need | Path |
|---|---|
| Simple structured doc (headings, paragraphs, bullets, a basic table, an image) | Path 1 — make_document tool |
| Anything richer (custom styles, numbered/multi-level lists, merged/shaded table cells, headers/footers, TOC, hyperlinks, footnotes, inline bold/italic/color, tracked changes, comments) | Path 2 — script the docx library via brigade exec-node |
Fill / redline an EXISTING branded .docx without disturbing its styling | Path 3 — OOXML round-trip |
| Markdown → branded Word inheriting a corporate template | Path 4 — pandoc (optional) |
make_document tool)make_document(format="docx", content={ title, sections:[{heading, level, paragraphs, bullets, table:{rows}, image:{path}}] })Good for a fast first draft. It is deliberately limited (single-level bullets, string-only tables, no inline formatting). The moment you need more, go to Path 2 — don't fight the schema.
docx libraryBrigade bundles the docx library (dolanmiu/docx). Write a CommonJS script and run it with brigade exec-node, which makes Brigade's bundled libraries require()-able from anywhere (no install):
write a file gen.cjs.brigade exec-node gen.cjs// gen.cjs — illustrative; adapt to the content
const fs = require("node:fs");
const {
Document, Packer, Paragraph, TextRun, HeadingLevel, AlignmentType,
Table, TableRow, TableCell, WidthType, BorderStyle, ShadingType,
LevelFormat, Header, Footer, PageNumber, TableOfContents, ExternalHyperlink,
} = require("docx");
const doc = new Document({
styles: { default: { document: { run: { font: "Calibri", size: 22 } } }, // size is half-points (22 = 11pt)
paragraphStyles: [{ id: "Body", name: "Body", run: { size: 22 }, paragraph: { spacing: { after: 160 } } }] },
numbering: { config: [{ reference: "nums", levels: [{ level: 0, format: LevelFormat.DECIMAL, text: "%1.", alignment: AlignmentType.START }] }] },
sections: [{
properties: { page: { size: { width: 12240, height: 15840 } } }, // US Letter, in DXA (1440 = 1 inch)
headers: { default: new Header({ children: [new Paragraph("Acme Corp — Confidential")] }) },
footers: { default: new Footer({ children: [new Paragraph({ children: [new TextRun("Page "), new TextRun({ children: [PageNumber.CURRENT] })] })] }) },
children: [
new Paragraph({ text: "Q3 Business Review", heading: HeadingLevel.TITLE }),
new TableOfContents("Contents", { hyperlink: true, headingStyleRange: "1-3" }),
new Paragraph({ text: "Summary", heading: HeadingLevel.HEADING_1 }),
new Paragraph({ children: [ new TextRun("Revenue was "), new TextRun({ text: "$1.2M", bold: true }), new TextRun(" — up 18%.") ] }),
new Paragraph({ text: "First item", numbering: { reference: "nums", level: 0 } }),
new Paragraph({ children: [ new ExternalHyperlink({ children: [new TextRun({ text: "Full data", style: "Hyperlink" })], link: "https://example.com" }) ] }),
new Table({
columnWidths: [4680, 4680], // DXA, sum = content width
rows: [
new TableRow({ tableHeader: true, children: ["Metric","Value"].map((t) =>
new TableCell({ width: { size: 4680, type: WidthType.DXA }, shading: { type: ShadingType.CLEAR, fill: "D9E2F3" },
children: [new Paragraph({ children: [new TextRun({ text: t, bold: true })] })] })) }),
new TableRow({ children: ["Revenue","$1.2M"].map((t) =>
new TableCell({ width: { size: 4680, type: WidthType.DXA }, children: [new Paragraph(t)] })) }),
],
}),
],
}],
});
Packer.toBuffer(doc).then((buf) => { fs.writeFileSync(process.argv[2] || "out.docx", buf); console.log("wrote", process.argv[2] || "out.docx"); });The docx library also supports: footnotes (FootnoteReferenceRun + footnotes), comments, tracked changes (InsertedTextRun/DeletedTextRun with author/date), multi-section layouts, page breaks, columns, internal bookmarks, and images inside table cells. Read its API as needed — anything Word can express, this can author.
.docx (highest fidelity)To fill a branded company template or surgically edit a real document without regenerating it (which would drop the theme), use the OOXML round-trip — unzip, edit the XML, rezip. For plain placeholder/text swaps the edit_document tool (replace_text / fill_template / append) already does exactly this and is the first choice.
For edits beyond text, script it via brigade exec-node with fflate:
// edit.cjs — unzip → edit word/document.xml → rezip (styles/headers/theme untouched)
const fs = require("node:fs");
const { unzipSync, zipSync, strToU8, strFromU8 } = require("fflate");
const zip = unzipSync(fs.readFileSync(process.argv[2]));
let xml = strFromU8(zip["word/document.xml"]);
xml = xml.replaceAll("{{client}}", "Acme Corp"); // fill placeholders in <w:t> runs
zip["word/document.xml"] = strToU8(xml);
fs.writeFileSync(process.argv[3], zipSync(zip));Rules for raw OOXML edits:
<w:t>; pointing a run/paragraph at an already-defined styleId; appending <w:p>/<w:r> that reference existing styles.[Content_Types].xml + the matching _rels/*.rels updated atomically, or Word reports corruption. For those, regenerate with the docx library instead.<w:ins>/<w:del> as siblings of <w:r> (never inside a run); copy the original <w:rPr> into the change runs; keep edits minimal so an "accept all" yields exactly the intended text. Author yourself as "Brigade".pandoc)For long prose where the brand styling lives in a corporate .docx, if pandoc is installed it inherits every style/margin/header:
command -v pandoc >/dev/null 2>&1 && pandoc input.md --reference-doc=brand-template.docx -o out.docxDetect first; else fall back to Path 2. pandoc is GPL — a separate program shelled out to, never bundled.
12240×15840 DXA (1440 DXA = 1"); landscape = portrait dims + orientation flip.columnWidths (table) and per-cell width in WidthType.DXA (PERCENTAGE breaks some viewers), summing to content width; ShadingType.CLEAR (never SOLID → black boxes); add cell margins; never use a table as a horizontal rule (use a paragraph bottom border).TITLE, then HEADING_1..3 with proper outline levels (required for a working TOC).After writing, confirm the file exists and is non-trivial. If LibreOffice is available, render to PDF and look at it — fix overflow/placeholder leftovers, then re-verify:
command -v soffice >/dev/null 2>&1 && soffice --headless --convert-to pdf out.docxTOC/page-number fields show blank until Word (or a soffice convert) recalculates them — note this to the user if you can't run the convert. Never declare success without at least one look-and-fix pass.
© spinabot, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/docx of spinabot/brigade.
Open the folder on GitHubat commit 4c2a18f
Word Document Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Word Document Builder this skillspinabot/brigade | 11k | — | ~2.1k | Automated safety check: Pass | MIT | |
| Word Document Reader and WriterHKUDS/DeepTutor | 41k | — | ~2.5k | Automated safety check: Pass | Apache-2.0 | |
| BiSheng DOCX Builderdataelement/bisheng | 12k | — | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Pandoc DOCX TemplateAchuan-2/pandoc_docx_template | 1.1k | — | ~1k | Automated safety check: Pass | None | |
| DOCX ToolkitXiaomiMiMo/MiMo-Code | 14k | — | ~2.4k | Automated safety check: Pass | Apache-2.0 | |
| Markdown to Word Convertercat-xierluo/SuitAgent | 206 | — | ~559 | Automated safety check: Pass | MIT |
HKUDS/DeepTutor
Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.
dataelement/bisheng
Builds or edits Word .docx documents inside BiSheng's code executor with python-docx, handling Chinese fonts, tables of contents, page numbers and official-document layout.
Achuan-2/pandoc_docx_template
A skill your agent uses when converting Markdown to Word DOCX or DOCX back to Markdown with Pandoc, especially when the output should use the bundled Chinese Word reference templates, heading…
XiaomiMiMo/MiMo-Code
Produces, edits and reads Microsoft Word files through python-docx and lxml, with a decision table for picking the lightest workflow for a given task.
cat-xierluo/SuitAgent
Converts Markdown files into Word documents formatted to Chinese typesetting conventions, with presets for academic, legal, report and book layouts.
Get00/BiaoShu-SKILL
Converts a tender document into Markdown, extracts scoring criteria and requirements, then drafts an industry-formatted technical bid as a Word file.
spinabot/brigade
Shows HTML content such as games, dashboards, visualizations and demos on a connected Brigade node's canvas, using a local canvas host server and a node bridge.
spinabot/brigade
Writes HTML compositions with a GSAP timeline that the render_video tool turns into deterministic MP4 videos from data, text or layouts.
spinabot/brigade
Diagnoses why a Brigade companion app can't pair or connect, by first identifying the real node-to-gateway route and then fixing auth.
spinabot/brigade
Connects an OAuth 2.0 account such as Gmail with the built-in oauth_authorize tool: an authorization link, automatic code capture and sealed token storage.
spinabot/brigade
Creates and edits PDFs in Brigade through four paths: a quick content tool, an edit tool for forms and merging, a pdf-lib script for full control, and HTML-to-PDF for styled layouts.
spinabot/brigade
Explains how a skill folder should be laid out and bundled as a tar archive for sharing, with a checklist covering name, description and eligibility keys.
Works with
Categories
Creates and edits Word documents along four paths of rising capability, from a quick tool to the docx library, an OOXML round-trip and pandoc, then verifies the file. Four paths are on offer, and the lightest one that fits the need is chosen. A simple make_document tool handles headings, paragraphs, bullets, a basic table and an image.
Word Document Builder fits situations like: drafting a report, proposal, letter or memo as a .docx file; filling a branded Word template without disturbing its styling; redlining a contract with tracked changes and comments; building a document with a table of contents and footnotes.
Run `npx skills add spinabot/brigade --skill docx -a claude-code`. Or copy the skill folder (skills/docx in spinabot/brigade) into .claude/skills/docx in your project. Claude Code loads it when a task matches its description.
Run `npx skills add spinabot/brigade --skill docx -a codex`. Or copy the skill folder (skills/docx in spinabot/brigade) into .agents/skills/docx in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add spinabot/brigade --skill docx -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docx, .gemini/skills/docx, .github/skills/docx and .opencode/skills/docx in your project.
Going by SKILL.md and its folder, Word Document Builder needs the command-line tools its instructions call (pandoc and soffice). Our summary lists: The Brigade agent runtime with its make_document, edit_document and exec-node tools; pandoc, optional, for template-based Markdown conversion.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Word Document Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Word Document Builder: Word Document Reader and Writer (HKUDS/DeepTutor, 41k stars), BiSheng DOCX Builder (dataelement/bisheng, 12k stars), Pandoc DOCX Template (Achuan-2/pandoc_docx_template, 1.1k stars) and DOCX Toolkit (XiaomiMiMo/MiMo-Code, 14k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
spinabot (a GitHub organization) maintains it in spinabot/brigade, which has 11,276 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 3, 2026.
Source: spinabot/brigade on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.