claude-scientific-writer: Skill for Claude Code

.claude/skills/docx/SKILL.md

docx is a skill for Claude Code from K-Dense-AI/claude-scientific-writer. It costs 184 tokens per session (1,849 once invoked), scanned A, a copy of docx, MIT.

A guide for creating, reading, editing, and formatting Word documents and templates, including `.docx` and `.dotx` files. It explains suitable methods for new documents and existing files.

In plain words
What is it for?
Use it to produce or modify Word documents, read their contents, create templates, and add structured elements such as headings, tables, or page layouts.
Why use it?
It reduces formatting problems when working with Word’s internal document structure and helps preserve professional layouts.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is K-Dense-AI/claude-scientific-writer's own configuration. It tells Claude Code how to work on claude-scientific-writer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-scientific-writer configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is (cd unpacked && rm -f ../out.docx && zip -Xr ../out.docx .).

About the project

Claude Scientific Writer is an AI-assisted research and writing tool that searches literature and produces documents such as scientific papers, reports, posters, grant proposals, and reviews with citations. Researchers and technical writers can use it as a Claude Code plugin, Python package, or command-line tool, with the catalogue entries defining agent workflows for it.

K-Dense-AI/claude-scientific-writer · 2,324 stars · on GitHub · k-dense.ai

Reuse

Borrowing it

Nothing to install: this file belongs to K-Dense-AI/claude-scientific-writer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/K-Dense-AI/claude-scientific-writer/main/.claude/skills/docx/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/K-Dense-AI/claude-scientific-writer

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/k-dense-ai/claude-scientific-writer/docx/github.svg)](https://agentmods.dev/skills/k-dense-ai/claude-scientific-writer/docx)
Your own site
<a href="https://agentmods.dev/skills/k-dense-ai/claude-scientific-writer/docx"><img src="https://agentmods.dev/badge/skills/k-dense-ai/claude-scientific-writer/docx/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/k-dense-ai/claude-scientific-writer/docx"><img src="https://agentmods.dev/badge/skills/k-dense-ai/claude-scientific-writer/docx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,849 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 100% copy Near-identical to another mod 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.00184 $0.01849
Opus 5 $0.00092 $0.00924
Sonnet 5 $0.00037 $0.00370
Haiku 4.5 $0.00018 $0.00185

Measured 11d ago against content hash 5b9ba52c1172, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

docx 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 11d ago.

The scan reads SKILL.md. This mod also ships 15 executable files (scripts/__init__.py, scripts/accept_changes.py, scripts/comment.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.

Origin

This is a copy

100% identical to docx — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/docx/SKILL.md · 100 lines

How it starts

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

DOCX creation, editing, and analysis

A .docx is a ZIP archive of XML files. Choose your approach by task:

Task Approach
Create a new document Write a docx (npm) script — see gotchas below
Edit an existing document unzip → edit word/document.xmlzip (docx-js cannot open existing files)
Read content pandoc -t markdown file.docx

Script paths below are relative to this skill's directory.

Creating with docx-js — gotchas

docx is preinstalled — do not run npm install first; write the script and require('docx') directly. Only if that require fails: npm install docx. The model knows the API; these are the footguns:

  • Page size defaults to A4. For US Letter set page: { size: { width: 12240, height: 15840 } } (DXA; 1440 = 1″).
  • Landscape: pass portrait dimensions and orientation: PageOrientation.LANDSCAPE — docx-js swaps width/height internally.
  • Tables need dual widths: set columnWidths on the table AND width on every cell, both in WidthType.DXA (PERCENTAGE breaks in Google Docs). Column widths must sum to the table width.
  • Table shading: use ShadingType.CLEAR, never SOLID (renders black).
  • Lists: never insert literally; use a numbering config with LevelFormat.BULLET.
  • ImageRun requires type: ("png", "jpg", …).
  • PageBreak must be inside a Paragraph.
  • Never use \n — use separate Paragraph elements.
  • TOC: headings must use built-in HeadingLevel.*; custom heading styles need outlineLevel set or they won't appear.
  • Don't use a table as a horizontal rule — use a paragraph bottom border instead.
  • Dot-leader / right-aligned-on-same-line: use PositionalTab (alignment: PositionalTabAlignment.RIGHT, leader: PositionalTabLeader.DOT) inside a TextRun, not literal . or space padding.

Verify the output

After writing a .docx, render it and look at it:

python scripts/office/soffice.py --headless --convert-to pdf output.docx
pdftoppm -jpeg -r 100 output.pdf page
ls page-*.jpg   # then Read the images

Read the full file on GitHub · 100 lines

Files

What ships with it

60 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. 11d ago First seen · 100 lines · 184 tokens per session scan A 5b9ba52c1172

Subscribe to this mod's changes

docx is a skill published in the GitHub repository K-Dense-AI/claude-scientific-writer (2,324 stars, last pushed 22d ago), licensed MIT. It adds 184 tokens to every session and 1,849 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to docx, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

document-processing-expert

Read, generate and modify office documents and PDFs from code: PDF extraction and forms, Word documents, Excel workbooks and PowerPoint decks. Use when the user mentions PDF, DOCX, XLSX, PPTX, Word, Excel, PowerPoint or spreadsheets, wants data extracted from documents, needs a report or invoice generated as a file…

personamanagmentlayer/pcl · 102 tokens

xlsx

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify…

frankxai/claude-skills-library · 96 tokens

pdf

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

frankxai/claude-skills-library · 50 tokens

oracle-confidentiality

Enforce confidentiality across Oracle deliverables — pre-delivery audits, codename enforcement, and content sanitization. Use before any Oracle client handoff, when sanitizing documents, or when checking deliverables for confidential leaks.

frankxai/claude-skills-library · 49 tokens

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when…

lingxling/awesome-skills-cn · 168 tokens

pptx

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks.

frankxai/claude-skills-library · 62 tokens