# kimi-docx

Generates and edits Word documents (.docx) using C# and direct XML manipulation in Python. Useful for creating formatted reports with covers, charts, and track changes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 506 installs · ★ 240
- Author: thvroyal
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thvroyal/kimi-skills/tree/HEAD/skills/kimi-docx/SKILL.md
- Updated: 2026-03-28
- HTML: https://affpapa.org/en/nevibecode/skills/kimi-docx

## What it does

The skill separates Word workflows into document creation and editing. New files are compiled via the C# SDK and a `Program.cs` template. Existing documents are modified using Python and `lxml` to preserve original styles. Libraries like `python-docx` and `docx-js` are avoided because direct XML manipulation yields cleaner formatting.

Operations run through `./scripts/docx`. The build step compiles .NET code, generates the document, fixes XML tag ordering, and runs an OpenXML binary validator. Final text content and revision markers are verified using `pandoc`.

The setup requires `dotnet` and `python3`, with optional dependencies like `pandoc` and `matplotlib` for specialized charts. Note that the workflow relies on fixed paths such as `/app/.kimi/skills/kimi-docx/` and `/mnt/okcomputer/output/`, which will fail if executed outside this directory structure.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thvroyal/kimi-skills --skill kimi-docx -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/kimi-docx/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/kimi-docx/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thvroyal/kimi-skills --skill kimi-docx -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/kimi-docx/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thvroyal/kimi-skills --skill kimi-docx -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/kimi-docx/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thvroyal/kimi-skills kimi-docx
```

2. **Manually: put the files in place**
- File: `.github/skills/kimi-docx/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thvroyal/kimi-skills --skill kimi-docx -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thvroyal/kimi-skills --path skills/kimi-docx
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/kimi-docx/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thvroyal/kimi-skills --skill kimi-docx -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thvroyal/kimi-skills/tree/HEAD/skills/kimi-docx/SKILL.md

## When to use it
- generate new .docx files from scratch using the C# OpenXML SDK
- modify existing Word documents with lxml while preserving formatting
- add covers, headers, footers, and revision marks to reports
- convert legacy .doc files to .docx using headless LibreOffice
- validate document structure with the built-in OpenXML validator

## Example prompts
- Create a quarterly financial report in .docx format with a title page and numbered footers
- Review uploaded/contract.docx and add tracked changes preserving the original styles
- Validate and repair the XML structure of /mnt/okcomputer/output/report.docx

## Similar
- [minimax-docx](https://affpapa.org/en/nevibecode/skills/minimax-docx.md) — skill · 4500 installs
- [docx](https://affpapa.org/en/nevibecode/skills/appautomaton-docx.md) — skill · 1300 installs
- [docx-manipulation](https://affpapa.org/en/nevibecode/skills/docx-manipulation.md) — skill · 6100 installs
- [docx-generator](https://affpapa.org/en/nevibecode/skills/docx-generator.md) — skill · 734 installs
- [word-document](https://affpapa.org/en/nevibecode/skills/word-document.md) — skill · 790 installs
- [pdf-to-docx](https://affpapa.org/en/nevibecode/skills/pdf-to-docx.md) — skill · 6000 installs

From the same set: [thvroyal/kimi-skills](https://affpapa.org/en/nevibecode/by/thvroyal/kimi-skills.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
