migrate-template

A command for moving a research paper from one document template to another, such as from an AAAI format to an ICLR format. It adjusts the document setup, figures, page count, and incompatible macros while checking the rendered pages.

In plain words
What is it for?
Use it when submitting the same paper to a conference or venue with different formatting rules and when you need to verify the final page images.
Why use it?
Changing templates by hand can break layout, figure sizes, page limits, or reusable LaTeX definitions. This command organizes those changes and reports the result.

Command for Claude Code

Part of the PaperFit plugin — 8 skills, 9 commands, 6 agents shipped together

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.

agentmods
npx agentmods add commands/openraiser/paperfit/migrate-template
Clone the repo
git clone --depth 1 https://github.com/OpenRaiser/PaperFit

Made for: Claude Code.

Or install PaperFit, the plugin that ships this one along with the rest of its 8 skills, 9 commands, 6 agents.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 400 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00400
Opus 5 $0.00000 $0.00200
Sonnet 5 $0.00000 $0.00080
Haiku 4.5 $0.00000 $0.00040

Measured 3d ago against content hash 559c0d2af3fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate-template 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.

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.

.claude/commands/migrate-template.md · 41 lines

What it actually says

/migrate-template — 跨模板排版迁移

作用: 将论文从原模板迁移至目标模板,自动处理图表尺寸、页数、宏兼容性等问题。它是专家快捷入口;普通自然语言如“把这篇论文迁移到 CVPR 模板”也应能触发同类任务。

用户入口说明:

  • 用户只需要描述迁移目标,不需要手动编排内部 CLI。
  • CLI、runtime、scripts 是 Agent 的内部执行层。
  • 模板迁移完成后,必须回到视觉闭环重新验收。

工具调用约定

闭环中的编译与页图渲染使用 paperfit run scripts/compile.sh(或 latexmk)与 paperfit render,见 CLAUDE.md 运行时边界一节。

用法

/migrate-template

也可以由自然语言触发,例如:

用 PaperFit 把这篇论文迁移到 CVPR 模板
把当前论文从 AAAI 模板迁到 ICLR,并尽量保持版面稳定

执行流程

  1. 识别当前模板与目标模板,必要时补充最少量澄清
  2. 加载模板配置(config/templates.yaml
  3. 替换 \documentclass 和宏包
  4. 调用 template-migrator 处理图表和兼容性
  5. 启动 VTO 闭环(Category E 优先)
  6. 输出迁移报告与视觉验收结果

调度

  • 执行器:agents/orchestrator-agent.md
  • 技能:skills/template-migrator/SKILL.md
  • 任务类型:template_migration
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 · 41 lines · 0 tokens per session scan A 559c0d2af3fc

Subscribe to this mod's changes

migrate-template is a command published in the GitHub repository OpenRaiser/PaperFit (330 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 400 tokens. 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-30.