md-unpack

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

A tool that converts a Word manuscript into Markdown, a plain-text document format, while preserving citations, figures, tables, cross-references, equations, and footnotes.

In plain words
What is it for?
Use it to ingest a .docx manuscript, match citations to Better BibTeX keys, and prepare manuscript.md for the later md-swarm and md-build stages.
Why use it?
It creates a single editable source that can later be compiled into Word with active Zotero citations, instead of editing the generated document directly.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ⛔ **路由铁律**:本 skill 属**第三代 `md-*`**(Markdown 真源 → pandoc 生成)。它产出的 `manuscript.md` 是后续所有改稿的**唯一真源**,最终由 `/md-build` 编译成 Word。要在既有 docx 上做带修订痕迹的外科小改,那是第二代 `docx-*`.

Good fit Use it to ingest a .docx manuscript, match citations to Better BibTeX keys, and prepare manuscript.md for the later md-swarm and md-build stages.

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-unpack

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-unpack

README.md
[![agentmods](https://agentmods.dev/badge/skills/pwya/md-paper/md-unpack.svg)](https://agentmods.dev/skills/pwya/md-paper/md-unpack)
Your own site
<a href="https://agentmods.dev/skills/pwya/md-paper/md-unpack"><img src="https://agentmods.dev/badge/skills/pwya/md-paper/md-unpack.svg" alt="Measured on agentmods" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,545 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00135 $0.01545
Opus 5 $0.00068 $0.00772
Sonnet 5 $0.00027 $0.00309
Haiku 4.5 $0.00014 $0.00154

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

Security

Grade A, and why

md-unpack 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 13 executable files (_recon.py, _test_t21_fixes.py, ingest_manuscript.ps1, …), 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-unpack/SKILL.md · 53 lines

How it starts

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

md-unpack — 原稿 docx → pandoc Markdown 真源(第三代·摄取)

路由铁律:本 skill 属第三代 md-*(Markdown 真源 → pandoc 生成)。它产出的 manuscript.md 是后续所有改稿的唯一真源,最终由 /md-build 编译成 Word。要在既有 docx 上做带修订痕迹的外科小改,那是第二代 docx-*,别用本套。完整工作流与限制见 ../md-技能套件·用户完全手册.md

第 0 步 · 前置检查

新项目默认保存原 Word 格式

先建立空项目目录(-WorkDir 必须已经存在),新项目使用:

powershell -ExecutionPolicy Bypass -File "<本 skill>\unpack.ps1" -WorkDir "<项目目录>" -SourceDocx "<原稿.docx>"

默认 -Layout preserve,直接读取 Word 的真实样式、直接格式及原生部件,产出 manuscript.mdformat_names.mdformat_capture_report.mdreferences.jsonmanifest/ 格式档案。中文稿默认中文格式名,英文稿默认英文格式名;中英混合无法确定时用 -LabelLanguage zh|en 指定。后续修改不会重选语言。

不传 -Title;原稿的标题本来就在正文中,按原有格式摄取。禁止猜测第一页是不是标题页。读取检查报告,使用格式标记和对象标记保存明确结构;未编辑部件按当前内容精确匹配,已编辑文字按当前 Markdown 构建。

已有 manuscript.md 时拒绝覆盖。只有用户明确要求旧转换流程才用 -Layout legacy。以下旧流程、citemap 对账及项目马甲说明均不适用于新的格式档案项目。原有引用保留捕获的数据;新文献使用实际 Zotero citekey 并选 live 构建。

默认入口同时读取 Word 批注到 swarm/comments_raw.json。脚注/尾注、图片/表格原生部件保留;具体可编辑范围及尚未覆盖的类型见读取报告,不把“保留原部件”说成“所有类型均可自由编辑”。

单幅普通图片会导出到 media/ 并在 Markdown 中显示带原生对象 ID 的图片写法。多行图片说明使用数值实体保留;写入项目前校验整个语法树往返一致,防止标记泄漏成正文。替换方式和 SmartArt 等限制见 ../md-build/image_editing.md

规则矩形且每格一个普通段落的表格使用紧凑 Markdown 表,保留 data-cell 和实际格式名称;有合并、多段等复杂结构的表格保留展开单元格。每表判断及原因记录于格式档案的 table_report。完整摄取往返校验同时覆盖两种写法;不得为缩短 Markdown 而强行压平复杂表格。操作范围见 ../md-build/table_editing.md

摄取后交棒

向用户回显以下产物的绝对路径和用途:manuscript.md(当前真源)、format_names.md(本稿中英文格式对照)、format_capture_report.md(读取范围与未支持项)、references.json(捕获的文献数据)、manifest/(格式定义和原稿快照)。有批注时同时给出 swarm/comments_raw.json

manuscript.md 中能看见 ::: {custom-style="正文"}::: {custom-style="body text"},以及局部文字的“特殊格式1 / special format 1”。名称来自同一份 ../md-build/formatting/names.json;同名但实际格式不同的原段落有明确的变体,不会合并成同一格式。

保持当前语言与格式范围。普通改字、同格式范围内拆段或合段,经 /md-iterate/md-swarm 的受保护入口执行。图表/分节/注释等对象有独立身份;不能因为要改周围文字就删除、复制或重编号标记。新引用必须有真实 key,不能模仿捕获的临时 key 自造。

实际 Word 大纲级别一至九均保留。一级至六级使用带 sec: 目标 ID 的 Markdown 标题;七级至九级使用带 data-heading 的原段落格式范围。原生 REF/PAGEREF 若指向这些标题的书签,会捕获为对应的章节引用。目标 ID 不等于显示编号,说明见 ../md-build/heading_references.md

Read the full file on GitHub · 53 lines

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 · -23 lines · -138 tokens per session e23fcd6d5447
  2. 8d ago First seen · 76 lines · 273 tokens per session scan A 70bee9f98cbe

Subscribe to this mod's changes

md-unpack is a skill published in the GitHub repository pwya/md-paper (10 stars, last pushed 2d ago), licensed Apache-2.0. It adds 135 tokens to every session and 1,545 once invoked, about $0.0007 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

pandoc-docx-template

Use this skill when converting Markdown to Word DOCX or DOCX back to Markdown with Pandoc, especially when the output should use the bundled Chinese Word reference templates, heading numbering variants, list indentation variants, SCI paper templates, and Lua filters for HTML tags, image captions, font color, and…

Achuan-2/pandoc_docx_template · 69 tokens

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

processing-markdown

Processes Markdown files using mq, a jq-like query language for Markdown. Use when the user mentions Markdown processing, content extraction, document transformation, or mq queries.

harehare/mq · 36 tokens

data-management-plan

Draft a funder-compliant Data Management Plan (NSF DMP, NIH DMS Policy 2023, ERC, Horizon Europe) by composing the confidential-data and environment-capture primitives. Sections cover data description, formats/metadata, storage/backup, access/sharing, preservation/archiving, and roles. Use when user says "data…

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

new-diagram

Scaffold a new TikZ diagram from the snippet gallery with prevention rules pre-applied (explicit node dimensions, coordinate map, directional edge labels). Compiles standalone, invokes tikz-reviewer with citations from tikz-measurement.md, and loops on revisions until APPROVED.

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