md-build

md-build is a skill for Claude Code from pwya/md-paper. It costs 119 tokens per session (1,918 once invoked), scanned A, original, Apache-2.0.

A document-building tool that turns a Markdown manuscript into a Word file with citations, numbered figures and tables, cross-references, equations, and journal formatting. It can keep Zotero citations editable or make them permanent for proofreading.

In plain words
What is it for?
It is for producing a journal-ready Word manuscript from manuscript.md after revisions, with either refreshable Zotero citations or fixed citations and a bibliography.
Why use it?
It removes the need to format and update these elements manually in Word. The permanent version can be checked without Zotero running.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is 完整工作流与限制见 `../md-技能套件·用户完全手册.md`。.

Good fit It is for producing a journal-ready Word manuscript from manuscript.md after revisions, with either refreshable Zotero citations or fixed citations and a bibliography.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/pwya/md-paper
agentmods
npx agentmods add skills/pwya/md-paper/md-build

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 md-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/pwya/md-paper/md-build.svg)](https://agentmods.dev/skills/pwya/md-paper/md-build)
Your own site
<a href="https://agentmods.dev/skills/pwya/md-paper/md-build"><img src="https://agentmods.dev/badge/skills/pwya/md-paper/md-build.svg" alt="Measured on agentmods" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,918 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.00119 $0.01918
Opus 5 $0.00060 $0.00959
Sonnet 5 $0.00024 $0.00384
Haiku 4.5 $0.00012 $0.00192

Measured yesterday against content hash 78e014815a4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

md-build 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 yesterday.

The scan reads SKILL.md. This mod also ships 40 executable files (build.ps1, format_docx.py, formatting/__init__.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.

md-build/SKILL.md · 60 lines

How it starts

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

md-build — 把 manuscript.md 编译成 Word(第三代·出稿)

当前真源是 manuscript.md;构建新输出,不修改原稿。先按格式档案选择路由。 完整工作流与限制见 ../md-技能套件·用户完全手册.md

第 0 步 · 工具链(全局安装·只装一次)

格式保留项目优先入口

先检查 <项目>/manifest/format_profile.json。存在时执行本小节;后面的“项目马甲、标题档位、对账、旧过滤器”等仅适用于没有该文件的旧项目。

  • build.ps1 -WorkDir <项目> -Mode rebuild 出稿,未指定模式时也默认 rebuild。脚本自动读取格式档案;不重新检测文章语言,不自动套 reference.docx,不按标题页/摘要页等内容用途分类。
  • rebuild 保留捕获的 Zotero 活域;live 在需要新引用组时读取原 Word 的 Zotero 文档样式,按真实 key 查询本地 Better BibTeX,新域需在 Word 中 Zotero Refresh;已有引用不必改名为新 key。static 去除 Zotero 域控制代码,保留其显示文字和捕获的格式属性,供校对;解除域仍可能使 Word 重新排版。现有静态验收有两处未解决差异(一处字位置微移、一处脚注文献年份换行),不能承诺与原稿逐像素一致。保格式出稿默认使用 rebuild,不得为通过验收暗中切换模式。
  • 标记名称由 formatting/names.json 统一定义;每篇文章的 format_names.md 展示实际中英文对照。语言在摄取时固定,题注标签大小写/中英文另由格式档案控制。
  • 普通改稿必须经 md-swarm/apply_formatted_changeset.py 验证后调用原单写者;所有 Div/Span 格式范围和对象 ID 都是必要标记。不能为了通过构建而删除标记、关闭引用默认不删保护或改用旧转换器。
  • 阅读 format_capture_report.md 和构建报告。歧义、失去格式范围、缺失引用目标会明确报错。当前未支持:显式 -Reference/-Bib 的保格式导入、叙述式新引用、成组交叉引用等尚未完成,不能静默降级。

出稿与验收

powershell -ExecutionPolicy Bypass -File "<本 skill>\build.ps1" -WorkDir "<项目目录>" -Mode rebuild

产物默认是 <项目>/build/out_rebuild.docx;live/static 对应 out_live.docx/out_static.docx。用 -Out 改输出路径。原 Word 快照只读,已修改内容按当前 Markdown 重建;精确匹配的原生片段只是格式缓存,不是段落修改历史。

构建代码在开始渲染和提交输出前校验路径:输出必须为 .docx,不能位于 manifest/,不能覆盖记录的原 Word、原稿快照或与原稿字节完全一致的文件。新摄取项目记录原稿绝对路径;旧格式项目缺少路径记录时使用原稿SHA识别未改变的原稿及其副本。正常的既有构建输出可以重新生成;遇到拒写应选择新的输出路径,不能删除原稿或格式档案绕过检查。

工具需要 Python 3、lxml 和全局 Pandoc;Pandoc 缺失时运行本目录 setup_md_tools.ps1。格式档案损坏或缺失时必须恢复该项目的档案,不能改走 legacy 来绕过错误。

替换已有图片时读 图片展示与替换。图片文件位于项目 media/,保留对象 ID 并经原改稿入口修改路径;程序保留原尺寸、裁剪和定位。位图替换另需 Pillow,Python 依赖见 format_requirements.txt。SmartArt/组合图等仍按报告保留原生对象,不能称为已支持自由编辑。

修改表格文字时读 表格展示与修改。普通表格以紧凑 Markdown 表展示,复杂表格使用明确的单元格范围;必须保留对象、单元格及格式标记。Markdown 的表头分隔线只是编辑写法,Word 表头、列宽、合并关系仍来自原表。当前不支持增删或移动行列及改变合并关系。

&nbsp; 等标准 Markdown 实体表示原 Word 的不换行空格/连接字符,构建程序会恢复它们。旧格式项目的当前稿需要空格编码迁移时,用 ../md-swarm/apply_formatted_changeset.py --encode-whitespace --manuscript <路径>,先 dry-run;不要重新摄取而丢失已修改内容。

Read the full file on GitHub · 60 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. yesterday Changed · -46 lines · -138 tokens per session 78e014815a4a
  2. 7d ago First seen · 106 lines · 257 tokens per session scan A bf849db82a51

Subscribe to this mod's changes

md-build is a skill published in the GitHub repository pwya/md-paper (10 stars, last pushed yesterday), licensed Apache-2.0. It adds 119 tokens to every session and 1,918 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-08-31.

Related

Other skills, from other repositories

md-to-office

This skill enables conversion from Markdown to various Office formats using Pandoc - the universal document converter. Convert your Markdown files to professional Word documents, PowerPoint presentations, PDFs, and more while preserving formatting and structure.

claude-office-skills/skills · 5 tokens

Генерация PDF из Markdown с точным академическим форматированием через Pandoc и LaTeX

A document workflow that turns Markdown text into PDF files using Pandoc and a custom LaTeX template. It applies specified academic page settings such as 14-point text, 1.5 line spacing, and A4 paper.

ECNU-ICALK/AutoSkill · 87 tokens

compile-latex

Compile a Beamer LaTeX slide deck with XeLaTeX (3 passes + bibtex). Use when user says "compile", "build the slides", "rebuild the PDF", "run latex", "render the tex", or asks why a .tex file isn't producing a PDF. Operates on Slides/.tex.

pedrohcgs/claude-code-my-workflow · 73 tokens

ccs-submission

Use when auditing an ACM CCS submission for HotCRP readiness, dual-cycle abstract registration and full-paper deadlines, the 12-page ACM sigconf body, anonymization, the ethics considerations appendix, artifact-availability posture, dual-submission policy, per-cycle submission caps, desk-reject triggers, and…

brycewang-stanford/Awesome-Journal-Skills · 69 tokens

acmmm-camera-ready

Use when preparing the ACM MM (ACM Multimedia) camera-ready version of record — de-anonymizing safely, completing the ACM rights form and CCS concepts, meeting ACM sigconf requirements, releasing code/data/media artifacts and any earned reproducibility badge, registering, and planning the oral/poster presentation in…

brycewang-stanford/Awesome-Journal-Skills · 67 tokens

pdf-design

Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.

jamditis/claude-skills-journalism · 28 tokens