docx-generation

docx-generation is a skill for Claude Code, Codex from aipoch/open-science. It costs 71 tokens per session (1,012 once invoked), scanned A, original, Apache-2.0.

A workflow for creating and editing Word DOCX files from Markdown while keeping headings, lists, tables, layout, and styles structured. It also covers editing an existing DOCX without losing its formatting.

In plain words
What is it for?
Use it to turn Markdown reports into DOCX files or revise existing Word documents while preserving their structure and presentation.
Why use it?
It avoids using a basic conversion command that can discard the report template, typography, page layout, and table spacing. It gives document creation a defined process instead.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to turn Markdown reports into DOCX files or revise existing Word documents while preserving their structure and presentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aipoch/open-science/docx-generation
About the project

Open Science is a local-first, model-agnostic workbench for reproducible scientific research. Scientists use its AI agents, Python and R execution, data connectors, and traceable outputs for tasks such as literature review, analysis, simulation, and visualization across macOS, Windows, and Linux.

aipoch/open-science · 5,398 stars · on GitHub · aipoch.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aipoch/open-science --skill docx-generation
Clone the repo
git clone --depth 1 https://github.com/aipoch/open-science

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docx-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/aipoch/open-science/docx-generation/github.svg)](https://agentmods.dev/skills/aipoch/open-science/docx-generation)
Your own site
<a href="https://agentmods.dev/skills/aipoch/open-science/docx-generation"><img src="https://agentmods.dev/badge/skills/aipoch/open-science/docx-generation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docx-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/aipoch/open-science/docx-generation"><img src="https://agentmods.dev/badge/skills/aipoch/open-science/docx-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,012 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01012
Opus 5.5 $0.00028 $0.00405
Sonnet 5.5 $0.00014 $0.00202
Haiku 4.5 $0.00007 $0.00101

Measured 2d ago against content hash 519810b35cf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docx-generation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (kernel.py, scripts/build_kernel.py, scripts/build_reference.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

resources/skills/docx-generation/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DOCX generation and editing

Choose a workflow that preserves the user's requested content, structure, and presentation. User requirements take precedence over defaults. Keep tables, headings, and lists as native document structures.

Markdown to a new DOCX

For ordinary reports, use the bundled converter with an existing Pandoc 3.12.1 executable and Python 3.9 or newer. It uses a versioned reference document, separates ordinary table paragraphs from the Compact style shared by lists, and records converter/template provenance inside the DOCX. It does not install software. Run this converter rather than a bare pandoc source.md -o output.docx command: that command bypasses the report template and its typography, page geometry, table spacing, and provenance.

In Open Science, first prepare the workflow through the registered Notebook helper:

{
  "kernelSkillIds": ["docx-generation"],
  "code": "docx_workflow = prepare_docx_conversion('.')\nprint(docx_workflow)"
}

Call the function directly, without importing it. Repeat kernelSkillIds in every cell using this function. The helper writes the fixed converter and reference into a new directory inside the authorized Notebook working directory and returns script_path, reference_path, and workflow_directory. This uses the registered skill transport; the Notebook and shell cannot necessarily read the framework's skill directory.

Then run the returned script_path through the session's approved shell tool:

python "<returned-script_path>" "<source.md>" "<output.docx>"

Use the interpreter configured for the session. If the helper is unavailable, report that prerequisite through the normal execution recovery flow; do not probe or copy from the isolated framework skill directory. In environments outside Open Science that already allow reading this package, the original scripts/convert.py is also a standalone CLI.

Optional arguments:

  • --reference-doc "<template.docx>": use the user's template. Its styles and page settings take precedence; the bundled TableBody normalization is not applied.
  • --from gfm or --from markdown+pipe_tables: select the dialect that matches the source. The default is Pandoc Markdown.
  • --pandoc "<absolute-executable-path>": select an existing executable.

Read the full file on GitHub · 55 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 55 lines · 71 tokens per session scan A 519810b35cf8

Subscribe to this mod's changes

docx-generation is a skill published in the GitHub repository aipoch/open-science (5,398 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 1,012 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-28.

Related

Other skills, from other repositories

word-zotero-citations

Build, audit, authorize, recover, or finalize dynamic Zotero citations and bibliographies in Microsoft Word DOCX files with a protected-source, digest-bound workflow. Use for Word–Zotero citation conversion, static OOXML citation audits, mocked/offline validation, Refresh authorization/report review, UI-evidence…

xuzhougeng/wisp-science · 90 tokens

pdf-explore

Use this skill when the user has attached a PDF, paper, report, or other document and the answer needs its content: summarize a section, compare sections, read specific pages, check the table of contents, or read a value off a figure. The read tool cannot parse PDF binary — python is the extraction path. Provides…

xuzhougeng/wisp-science · 137 tokens

distill-concept-books

A workflow for turning books about concepts, theories, or analysis methods into reusable task instructions. It scans document images, links claims to evidence, and checks the result through human review.

xuzhougeng/wisp-science · 210 tokens

figure-style

Correctness and legibility checklist for publication figures, plus a matplotlib sidecar. Load before plotting anything and call applyfigurestyle() (role-mapped font ladder, outward ticks, frameless legends, 300-dpi saves, CJK-safe fonts). Covers data fidelity, label budgets, axis/colour/type rules, chart choice by…

xuzhougeng/wisp-science · 163 tokens

journal-club-ppt

Instructions for turning a scientific paper PDF into a journal-club presentation or literature report. They require reconstructing the paper's scientific logic before creating the slides.

xuzhougeng/wisp-science · 154 tokens

pixi-environment-builder

Use when creating, migrating, or debugging pixi environments, especially for scientific Python, bioinformatics, single-cell analysis, CUDA/PyTorch, Jupyter/VS Code kernels, conda-to-pixi migration, or conda + PyPI mixed dependency issues.

xuzhougeng/wisp-science · 59 tokens