Install any skill in seconds. Free to start, no credit card required.
Get Started Free →本技能专门处理 **Category E:跨模板迁移缺陷**,包括:
.claude/skills/openraiser-template-migrator-skill/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 77% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 163% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 3249% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 174% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 202% | 0% |
本技能专门处理 Category E:跨模板迁移缺陷,包括:
该技能由 code-surgeon-agent 在 /migrate-template 命令触发时调用,负责将一篇论文从原模板平滑迁移至目标模板,并自动适配图表尺寸、页数预算和宏包兼容性。这是 PaperFit 最具差异化价值的能力,直接解决了科研工作者切换会议投稿时的真实痛点。
| 缺陷 ID | 描述 | 优先级 | 是否允许语义修改 | |---------|------|--------|-----------------| | E1 | 单栏↔双栏图表尺寸失配 | Critical | 否 | | E2 | 页数预算不匹配 | Critical | 是(最后手段) | | E3 | 模板特定宏兼容性 | Critical | 否 |
| 输入项 | 来源 | 说明 | |--------|------|------| | 主 .tex 文件路径 | 项目上下文 | 需修改的源文件 | | 目标模板名称 | 用户命令参数 | 如 ECCV2024、ICLR2025 | | 模板配置 | config/templates.yaml | 包含目标模板的栏数、默认字号、页宽、预期页数等 | | 原模板信息 | 自动检测或用户指定 | 当前 \documentclass 及主要宏包 | | 排版侦探报告 | layout-detective-agent | 迁移后首次编译的 E 类缺陷列表 |
json{ "skill": "template-migrator", "status": "success | partial | failed", "modified_files": ["main.tex", "figures/fig1.tex"], "changes": [ { "defect_id": "E1", "object": "Figure 1", "action": "单栏图改为跨栏图", "before": "\\begin{figure}\n\\includegraphics[width=\\linewidth]{fig1.pdf}\n\\end{figure}", "after": "\\begin{figure*}\n\\includegraphics[width=\\textwidth]{fig1.pdf}\n\\end{figure*}" } ], "macro_fixes": [ { "issue": "\\theoremstyle undefined in ECCV", "fix": "改用 \\newtheorem 直接定义" } ], "unresolved": [], "page_budget_status": { "current_pages": 9, "target_pages": 14, "gap": 5, "action_taken": "触发 adjust-length 子流程" } }
config/templates.yaml 读取目标模板的完整配置。documentclass:如 \documentclass[10pt,twocolumn]{article} 或 \documentclass{iclr2025}column_type:single 或 doubledefault_figure_width:\linewidth 或 \textwidthexpected_pages:该会议/期刊的典型页数(如 ICLR 9 页,ECCV 14 页)forbidden_packages:与新模板冲突的宏包列表required_packages:新模板必须加载的宏包示例配置(config/templates.yaml 片段):
yamlECCV2024: documentclass: "\documentclass[10pt,twocolumn]{article}" column_type: double default_figure_width: "\linewidth" expected_pages: 14 forbidden_packages: ["amsthm", "algorithm2e"] required_packages: ["graphicx", "amsmath", "amssymb"] float_behavior: "figures may use figure* for wide content"
.tex 文件的 \documentclass 声明。\usepackage{...})。\documentclass 自动推断。写入约束(强制):
scripts/transactional_patch.py 的 atomic_write_text(...) 一次性提交。documentclass / 宏包,一边把半成品状态暴露给后续 agent 或编译轮次。\documentclass将原 \documentclass 替换为目标模板的声明。
latex% 修改前(ICLR 2025 单栏) \documentclass{iclr2025} % 修改后(ECCV 2024 双栏) \documentclass[10pt,twocolumn]{article}
注意:若目标模板有多个可选参数(如 review、final),询问用户偏好或使用默认值。
forbidden_packages。\usepackage 行。algorithm2e → algorithmic)。\ifdefined 等实现跨模板兼容。latex% 修改前(含 amsthm,与新模板冲突) \usepackage{amsthm} \newtheorem{theorem}{Theorem} % 修改后(改用 LaTeX 原生定义) % \usepackage{amsthm} % removed for template compatibility \newtheorem{theorem}{Theorem}
若目标模板要求特定宏包(如 graphicx),确保导言区已加载。若缺失,添加之。
latex% 确保必需宏包存在 \usepackage{graphicx} \usepackage{amsmath}
这是跨模板迁移中最关键、最易出错的环节。
| 原模板 | 目标模板 | 处理策略 | |--------|----------|----------| | 单栏 | 双栏 | 所有图表默认改为单栏宽(\columnwidth),宽图改为跨栏(figure*) | | 双栏 | 单栏 | 所有跨栏图(figure*)改为普通图(figure),宽度改为 \linewidth | | 双栏 | 双栏 | 保持原策略,仅检查宽度是否适配新模板的栏宽 | | 单栏 | 单栏 | 基本不变,仅检查页宽是否变化 |
对于原单栏中的全宽图,在双栏中若仍用单栏会显得过小。需根据图片宽高比智能决策:
figure*。figure,但宽度设为 \columnwidth。latex% 原单栏全宽图(宽度 = \linewidth) \begin{figure} \includegraphics[width=\linewidth]{wide_arch.pdf} \end{figure} % 迁移后(宽高比大,改为跨栏) \begin{figure*} \includegraphics[width=\textwidth]{wide_arch.pdf} \end{figure*}
\columnwidth。tabularx{\linewidth},改为 tabularx{\columnwidth}。table* 并使用 \textwidth。latex% 修改前(单栏宽表) \begin{table} \begin{tabularx}{\linewidth}{|l|X|X|} ... \end{tabularx} \end{table} % 修改后(双栏单栏宽表) \begin{table} \begin{tabularx}{\columnwidth}{|l|X|X|} ... \end{tabularx} \end{table}
equation 改为 multline 或 align 并手动断行。figure*。Undefined control sequence 等错误(E3),返回第三步修正宏包冲突。layout-detective-agent 检测 E1/E2 缺陷。expected_pages 对比,计算偏差。space-util-fixer)。--keep-content,触发 adjust-length 子流程进行语义扩写。输出一份 Markdown 迁移报告,包含:
双栏模板的排版行为与单栏有本质不同:
figure* 和 table* 仅支持 [t] 或 [p] 参数,无法使用 [h] 或 [b]。这意味着跨栏图必然出现在下一页顶部,可能拉大引用距离(B1 缺陷)。这是 LaTeX 的限制,无法完全消除,需在报告中说明。\FloatBarrier 或调整源码位置。迁移成功的判定标准:
Template Migrator Skill 就绪。
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | pass→pass | 13,194 | 14,548 | +10% | 1 | 1 | 0% | 2,241 | 5,334 | +138% | 0 | 0 | — |
case-04 | fail→pass | 12,356 | 3,505 | -72% | 1 | 1 | 0% | 1,941 | 3,434 | +77% | 0 | 0 | — |
case-05 | pass→pass | 16,217 | 5,393 | -67% | 1 | 1 | 0% | 2,465 | 3,661 | +49% | 0 | 0 | — |
case-06 | fail→pass | 9,084 | 6,296 | -31% | 1 | 1 | 0% | 1,482 | 3,899 | +163% | 0 | 0 | — |
case-07 | pass→pass | 9,908 | 7,529 | -24% | 1 | 1 | 0% | 1,786 | 4,167 | +133% | 0 | 0 | — |
case-01 | fail→fail | 13,377 | 9,620 | -28% | 1 | 1 | 0% | 2,711 | 4,724 | +74% | 0 | 0 | — |
case-02 | fail→pass | 3,557 | 12,107 | +240% | 1 | 1 | 0% | 157 | 5,258 | +3249% | 0 | 0 | — |
case-03 | fail→pass | 9,613 | 9,712 | +1% | 1 | 1 | 0% | 1,699 | 4,656 | +174% | 0 | 0 | — |
case-09 | fail→pass | 7,007 | 4,585 | -35% | 1 | 1 | 0% | 1,182 | 3,565 | +202% | 0 | 0 | — |
case-10 | fail→fail | 9,642 | 7,821 | -19% | 1 | 1 | 0% | 1,620 | 4,092 | +153% | 0 | 0 | — |
case-11 | fail→pass | 9,200 | 6,787 | -26% | 1 | 1 | 0% | 1,536 | 3,995 | +160% | 0 | 0 | — |
case-12 | pass→pass | 12,989 | 9,655 | -26% | 1 | 1 | 0% | 2,321 | 4,481 | +93% | 0 | 0 | — |
case-22 | fail→fail | 1,911 | 7,603 | +298% | 1 | 1 | 0% | 306 | 3,942 | +1188% | 0 | 0 | — |
case-13 | pass→pass | 15,250 | 8,744 | -43% | 1 | 1 | 0% | 2,305 | 4,244 | +84% | 0 | 0 | — |
case-14 | fail→pass | 12,497 | 9,116 | -27% | 1 | 1 | 0% | 1,900 | 4,270 | +125% | 0 | 0 | — |
case-15 | pass→pass | 11,036 | 9,518 | -14% | 1 | 1 | 0% | 1,746 | 4,324 | +148% | 0 | 0 | — |
case-16 | pass→pass | 2,707 | 2,940 | +9% | 1 | 1 | 0% | 447 | 3,296 | +637% | 0 | 0 | — |
case-17 | fail→pass | 32,033 | 2,857 | -91% | 1 | 1 | 0% | 1,900 | 3,351 | +76% | 0 | 0 | — |
case-18 | fail→pass | 17,077 | 3,505 | -79% | 1 | 1 | 0% | 2,736 | 3,320 | +21% | 0 | 0 | — |
case-19 | fail→pass | 10,871 | 7,888 | -27% | 1 | 1 | 0% | 1,899 | 4,140 | +118% | 0 | 0 | — |
case-20 | fail→fail | 14,942 | 14,485 | -3% | 1 | 1 | 0% | 2,293 | 5,219 | +128% | 0 | 0 | — |
case-21 | fail→fail | 2,996 | 6,576 | +119% | 1 | 1 | 0% | 208 | 3,975 | +1811% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.