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.
npx agentmods add skills/pwya/md-paper/md-iteratenpx skills add pwya/md-paper --skill md-iterategit clone --depth 1 https://github.com/pwya/md-paperWrote 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-iterate)<a href="https://agentmods.dev/skills/pwya/md-paper/md-iterate"><img src="https://agentmods.dev/badge/skills/pwya/md-paper/md-iterate.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.00256 | $0.04641 |
| Opus 5 | $0.00128 | $0.02320 |
| Sonnet 5 | $0.00051 | $0.00928 |
| Haiku 4.5 | $0.00026 | $0.00464 |
Grade A, and why
md-iterate 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 today.
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 — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.
md-iterate — 单点即时修订 Markdown 真源
⛔ 路由铁律:本 skill 属第三代
md-*。它只处理一处用户点名的修改,不整理大批量意见、不并行、不做 D/E 审计、不生成 Word。大批量乱意见走md-triage → md-swarm;出稿走md-build。⛔ 单写者铁律:默认会让用户在 VS Code 里看到
manuscript.md真实变动,但绝不允许 AI 用 Edit/Write/Python/PowerShell 直接写manuscript.md。唯一写入路径是md-swarm/apply_md_changeset.py。
格式保留项目(有
manifest/format_profile.json)通过md-swarm/apply_formatted_changeset.py进入落盘流程。它先调用原 apply 引擎生成临时候选稿、校验格式和对象绑定,再调用原引擎写入真源;无格式档案的旧项目兼容转交原引擎。原apply_md_changeset.py仍是唯一写入者,人工确认钩子由入口直接复用。普通文字改稿保留custom-style、对象和分节标记;不要为消除报错自行添加--allow-format-change或--allow-structure-change,这两个参数仅用于用户已经明确要求的格式或结构变更。
定位
md-iterate 是“单处即时改稿笔”:
/md-unpack后:已有manuscript.md,可直接单点打磨。/md-swarm后:批量改稿完成后,用它补刀、去 AI 味、压缩句子。/md-build后:看 Word 发现问题,回源用它修,再重新 build。/md-triage后、md-swarm前:默认拦住,避免 triage 清单和真源不同步。
用户最佳入口
优先支持 VS Code 选区/行号。目标来源按优先级:
| 来源 | 行为 |
|---|---|
用户在 manuscript.md 选中一段并说“改选中这段…” |
若 harness 提供文件/range,视为唯一目标,直接用 |
用户给 manuscript.md:行号 或粘贴带行号的片段 |
视为唯一目标 |
| 用户粘贴原文片段 | 必须在 manuscript.md 唯一命中 |
| 用户给章节标题/一句话描述 | 主控定位;不唯一就问 |
| 用户说“继续刚才那处” | 读 swarm/iterate_history.jsonl 最近目标;没有历史就问 |
用户说 @P7 / @R1-C2 |
回查 swarm/md_triage.md、swarm/patches_applied/ 或历史;定位不唯一就问 |
若拿不到真实 VS Code selection,不许假装知道;让用户粘贴片段、给行号或给标题。
触发判断
即使用户不说 /md-iterate,满足这些条件就默认路由到本 skill:
已有 manuscript.md
+ 用户要求修改/润色/压缩/重写/去AI味
+ 目标是单处、选区、句子、段落、小节,或可唯一定位
= md-iterate
以下不走本 skill:
- “按这 30 条意见改全文” →
md-triage → md-swarm - “整理这些意见” →
md-triage - “出 Word / 生成 docx” →
md-build - “把原稿转 md” →
md-unpack - “帮我改一下论文”但没有目标 → 先问目标,不猜
总流程
0. check_state.py 状态护栏
0.5 当前会话 hook live-probe(需要时)
1. 定位目标(选区/行号/片段/标题/@ID/最近一次)
2. 判断模式:默认落地 or 预览
3. 起草单条 changeset -> swarm/iterate_last_changeset.json
4. apply dry-run
5. 默认落地:apply 写入 manuscript.md;预览模式:先回显,等用户确认再 apply
6. verify_applied + verify_refs
7. 对话框短 BEFORE/AFTER;长改动才写 swarm/iterate_last.md
0. 状态护栏(必须先跑)
py "<本skill>\check_state.py" --workdir "<项目目录>"
What ships with it
3 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.
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.
- today Changed · +12 lines 8d2c767a14b9
- 6d ago First seen · 268 lines · 256 tokens per session scan A 16a1d19fa928
md-iterate is a skill published in the GitHub repository pwya/md-paper (10 stars, last pushed today), licensed Apache-2.0. It adds 256 tokens to every session and 4,641 once invoked, about $0.0013 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
research-academic-plotting
Generates publication-quality figures for ML papers from research context. Given a paper section or description, extracts system components and relationships to generate architecture diagrams via G...
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…
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
Навык по созданию PDF-документов из Markdown с соблюдением строгих академических требований (шрифт 14 пт, межстрочный интервал 1.5, формат А4) с использованием Pandoc и пользовательского шаблона LaTeX для сохранения стилей и цветов.
latex-workflow
Write, compile, and submit LaTeX papers: IMRaD structure, key packages, bibliography management, arXiv preparation, and common error fixes.
slide-excellence
Multi-agent comprehensive slide review (visual + pedagogy + proofreading, plus TikZ / parity / substance conditionally). Use when user says "full review", "excellence pass", "comprehensive check", "review everything", "pre-release review", "slide excellence", or before teaching / shipping a deck. Fanout wrapper — for…