docx-from-sample

docx-from-sample is a skill for Claude Code from Desko77/claude-code-skills-1c. It costs 115 tokens per session (2,387 once invoked), scanned A, original, MIT.

A document-generation tool that creates a new DOCX file using an existing Word document as its formatting template. DOCX is the standard editable Microsoft Word document format.

In plain words
What is it for?
Use it to produce reports, specifications, procedures, or other documents with the same layout as a supplied example.
Why use it?
It preserves the sample document’s styles, numbering, tables, page settings, and headers without rebuilding the design by hand.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it to produce reports, specifications, procedures, or other documents with the same layout as a supplied example.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/desko77/claude-code-skills-1c/docx-from-sample
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 Desko77/claude-code-skills-1c --skill docx-from-sample
Clone the repo
git clone --depth 1 https://github.com/Desko77/claude-code-skills-1c

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-from-sample

README.md
[![agentmods](https://agentmods.dev/badge/skills/desko77/claude-code-skills-1c/docx-from-sample.svg)](https://agentmods.dev/skills/desko77/claude-code-skills-1c/docx-from-sample)
Your own site
<a href="https://agentmods.dev/skills/desko77/claude-code-skills-1c/docx-from-sample"><img src="https://agentmods.dev/badge/skills/desko77/claude-code-skills-1c/docx-from-sample.svg" alt="Measured on agentmods" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,387 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.00115 $0.02387
Opus 5 $0.00057 $0.01193
Sonnet 5 $0.00023 $0.00477
Haiku 4.5 $0.00012 $0.00239

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

Security

Grade A, and why

docx-from-sample 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 3d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (references/build-example.py, scripts/docx_builder.py, scripts/inspect_sample.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.

skills/docx-from-sample/SKILL.md · 178 lines

How it starts

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

/docx-from-sample - новый документ в оформлении образца

Берет готовый DOCX как источник оформления и собирает новый документ с тем же видом, но с другим содержанием. Оформление не воспроизводится вручную, а наследуется: образец открывается как документ, его тело очищается, а стили, нумерация, темы и параметры страницы остаются родными.

Когда применять

  • "сделай такой же документ, но по другой теме", "в формате как в примере"
  • заказчик прислал образец отчета, ТЗ, ПМИ, регламента - нужен свой документ в том же виде
  • документов несколько и они должны выглядеть одинаково
  • документ уже сделан, но оформление не совпадает с эталоном - пересобрать

Не для этого скила: правка существующего документа без смены оформления (штатные средства работы с DOCX), markdown в DOCX без образца (скил md-to-docx), таблицы и презентации (xlsx, pptx).

Зависимости

python -m pip install python-docx pymupdf

pymupdf нужен для картинок страниц, Word - для сборки оглавления и экспорта в PDF (на Windows через COM). Без Word документ соберется, но оглавление останется незаполненным.

Образец не зашит в скил

Скил глобальный и не привязан ни к одному шаблону. Образец задается профилем: ключ sample в JSON либо флаг --sample при запуске. Для каждого нового шаблона делается свой профиль, старые не трогаются.

Ситуация Что делать
Первый документ по этому шаблону inspect_sample.py на образце, довести профиль, собрать
Еще один документ по тому же шаблону взять готовый профиль, поменять только материал
Другой заказчик, другой бланк новый профиль на новый образец
Профиль есть, образец переехал --sample с новым путем либо поправить sample в профиле

Путь к образцу может быть относительным: он ищется рядом с профилем, потом в текущей папке. Так профиль и образец переносятся между машинами вместе.

Где хранить профили - profiles/README.md. Коротко: профиль конкретного проекта живет рядом с документами проекта или в ~/.claude/plans/<проект>/, а профиль шаблона, нужного из разных проектов, кладется в profiles/ внутри скила.

Read the full file on GitHub · 178 lines

Files

What ships with it

8 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. 3d ago First seen · 178 lines · 115 tokens per session scan A 2d339c1afcef

Subscribe to this mod's changes

docx-from-sample is a skill published in the GitHub repository Desko77/claude-code-skills-1c (55 stars, last pushed 4d ago), licensed MIT. It adds 115 tokens to every session and 2,387 once invoked, about $0.0006 per session on Opus 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-09-03.