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.
git clone --depth 1 https://github.com/pwya/md-papernpx agentmods add skills/pwya/md-paper/md-buildWrote 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.
[](https://agentmods.dev/skills/pwya/md-paper/md-build)<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>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.
| Model | Per session | Once 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 |
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.
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.
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 表头、列宽、合并关系仍来自原表。当前不支持增删或移动行列及改变合并关系。
等标准 Markdown 实体表示原 Word 的不换行空格/连接字符,构建程序会恢复它们。旧格式项目的当前稿需要空格编码迁移时,用 ../md-swarm/apply_formatted_changeset.py --encode-whitespace --manuscript <路径>,先 dry-run;不要重新摄取而丢失已修改内容。
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.
- .gitignore 564 B
- build.ps1 25 KB runs code
- bundled-lua/locator.lua 3.3 KB
- bundled-lua/lunajson.lua 380 B
- bundled-lua/lunajson/decoder.lua 12 KB
- bundled-lua/lunajson/encoder.lua 3.4 KB
- bundled-lua/lunajson/sax.lua 16 KB
- bundled-lua/pandoc-zotero-live-citemarkers.lua 14 KB
- bundled-lua/THIRD_PARTY_NOTICES.md 3.7 KB
- bundled-lua/utils.lua 1.6 KB
- bundled-lua/zotero.lua 1.5 KB
- dedup_crossref_prefix.lua 4.2 KB
- format_docx.py 7.2 KB runs code
- format_requirements.txt 12 B
- format_settings.md 5.4 KB
- formatting/__init__.py 90 B runs code
- formatting/ast.py 13 KB runs code
- formatting/caption_build.py 21 KB runs code
- formatting/captions.py 13 KB runs code
- formatting/citation_items.lua 659 B
- formatting/citations.py 4.7 KB runs code
- formatting/core.py 16 KB runs code
- formatting/editing.py 2.9 KB runs code
- formatting/fieldcodes.py 13 KB runs code
- formatting/headings.py 9.6 KB runs code
- formatting/images.py 13 KB runs code
- formatting/live_citations.py 6.4 KB runs code
- formatting/names.json 899 B
- formatting/reader.py 22 KB runs code
- formatting/reporting.py 6.7 KB runs code
- formatting/run_format.py 3.2 KB runs code
- formatting/static_fields.py 5.3 KB runs code
- formatting/style_settings.py 13 KB runs code
- formatting/table_view.py 7.1 KB runs code
- formatting/text_references.py 4.0 KB runs code
- formatting/whitespace.py 2.0 KB runs code
- formatting/word_fields.ps1 7.4 KB runs code
- formatting/word_fields.py 3.9 KB runs code
- formatting/word_process.py 5.9 KB runs code
- formatting/writer.py 26 KB runs code
- heading_references.md 3.1 KB
- image_editing.md 2.9 KB
- legacy_workflow.md 16 KB
- make_reference_cn.py 17 KB runs code
- postprocess_layout.py 17 KB runs code
- reference-cn.docx 11 KB
- setup_md_tools.ps1 9.2 KB runs code
- table_editing.md 2.4 KB
- tests/test_atomic_save.py 2.6 KB runs code
- tests/test_caption_edit_scope.py 2.7 KB runs code
- tests/test_captions.py 13 KB runs code
- tests/test_cjk_citations.py 6.9 KB runs code
- tests/test_entrypoints.py 4.3 KB runs code
- tests/test_fieldcodes.py 8.3 KB runs code
- tests/test_formatting.py 14 KB runs code
- tests/test_heading_references.py 15 KB runs code
- tests/test_images.py 14 KB runs code
- tests/test_live_citations.py 7.2 KB runs code
- tests/test_native_formats.py 12 KB runs code
- tests/test_output_paths.py 2.7 KB runs code
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.
- yesterday Changed · -46 lines · -138 tokens per session 78e014815a4a
- 7d ago First seen · 106 lines · 257 tokens per session scan A bf849db82a51
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.
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.
Генерация 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.
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.
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…
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…
pdf-design
Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.