float-optimizer

float-optimizer is a skill for Claude Code from OpenRaiser/PaperFit. It costs 0 tokens per session (3,873 once invoked), scanned A, original, MIT.

A document-layout helper for LaTeX, the system commonly used to typeset research papers. It adjusts how figures and tables are placed near the text that refers to them.

In plain words
What is it for?
Use it to correct figure and table placement, size, and spacing in one- or two-column papers, using source files, layout reports, and page images for verification.
Why use it?
It helps fix figures that appear far from their first mention, do not fit the column, pile up together, or split across pages.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the paperfit plugin — 8 skills, 9 commands shipped together

Good fit Use it to correct figure and table placement, size, and spacing in one- or two-column papers, using source files, layout reports, and page images for verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openraiser/paperfit/float-optimizer
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.

Any agent
npx skills add OpenRaiser/PaperFit --skill float-optimizer
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.

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 float-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/openraiser/paperfit/float-optimizer/github.svg)](https://agentmods.dev/skills/openraiser/paperfit/float-optimizer)
Your own site
<a href="https://agentmods.dev/skills/openraiser/paperfit/float-optimizer"><img src="https://agentmods.dev/badge/skills/openraiser/paperfit/float-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for float-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/openraiser/paperfit/float-optimizer"><img src="https://agentmods.dev/badge/skills/openraiser/paperfit/float-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,873 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.00000 $0.03873
Opus 5.5 $0.00000 $0.01549
Sonnet 5.5 $0.00000 $0.00775
Haiku 4.5 $0.00000 $0.00387

Measured 21d ago against content hash c260da288e4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

float-optimizer 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 21d 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.

skills/float-optimizer/SKILL.md · 324 lines

How it starts

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

Float Optimizer Skill

概述

本技能专门处理 Category B:浮动体缺陷,包括:

  • B1:浮动体远离首次引用(Float-Reference Distance)
  • B2:浮动体大小不适配栏宽(Float Width Mismatch)
  • B3:连续多个浮动体堆叠无正文间隔(Float Clustering)
  • B4:浮动体跨页分裂(Float Page Orphaning)

该技能由 code-surgeon-agent 调用,通过对浮动体位置参数、尺寸设置和周围正文结构的精确调整,实现图表与正文的和谐共处。浮动体优化是视觉排版中最具挑战性的环节之一,必须结合页图反馈迭代验证。


适用场景

当 layout-detective-agent 报告中出现以下缺陷 ID 时,路由至本技能:

缺陷 ID 描述 优先级
B1 浮动体远离首次引用 High
B2 浮动体大小不适配栏宽 High
B3 浮动体连续堆叠 Medium
B4 浮动体跨页分裂 Medium

输入规范

输入项 来源 说明
主 .tex 文件路径 项目上下文 需修改的源文件
排版侦探报告 layout-detective-agent 输出 包含缺陷对象(图表标签)、页码、描述
源码交叉引用报告 extract_crossrefs.py 输出 (data/crossrefs.json) 提供每个图表的首次引用行号、定义行号、行距离、节距离
当前 PDF 页图 visual-inspector 输出 用于验证修复后视觉效果
模板类型 用户上下文或 templates.yaml 单栏/双栏,影响浮动体宽度策略

输入使用说明:

  • 从 crossrefs.json 的 distances[] 数组中提取 ref_line 和 figure_line,计算源码距离
  • 若源码距离近(line_distance < 50 且 section_distance = 0)但视觉距离远 → 典型 LaTeX 浮动体放置问题,使用本技能的浮动体参数调整策略
  • 若源码距离本身远 → 优先建议移动源码位置(策略 3),而非调整浮动体参数

输出规范

修改完成后,必须返回以下信息:

{
  "skill": "float-optimizer",
  "status": "success | partial | failed",
  "modified_files": ["main.tex"],
  "changes": [
    {
      "defect_id": "B1",
      "object": "Figure 3",
      "action": "调整浮动体位置参数为 [ht]",
      "before": "\\begin{figure}[t]",
      "after": "\\begin{figure}[ht]"
    },
    {
      "defect_id": "B2",
      "object": "Table 1",
      "action": "将 tabular 宽度设为 \\linewidth",
      "before": "\\begin{tabular}{|l|c|c|}",
      "after": "\\begin{tabularx}{\\linewidth}{|l|X|X|}"
    }
  ],
  "unresolved": []
}

修复策略

通用原则

  1. 浮动体是“浮动”的:LaTeX 的浮动体放置算法具有不确定性,同一份源码在不同编译中可能产生不同输出。因此,修复后必须多次编译以验证稳定性。
  2. 最小侵入:优先调整位置参数 [ht],其次调整尺寸,最后才考虑移动浮动体在源码中的位置。
  3. Endmatter 硬约束:正文浮动体不得进入 Acknowledgements、References、Bibliography 所在页;若发生,按失败处理,并优先在 endmatter 前插入 \FloatBarrier。
  4. 视觉验证必须:浮动体修复的效果必须在页图上肉眼确认,不能仅凭日志判断。

Read the full file on GitHub · 324 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. 21d ago Changed · +14 lines c260da288e4b
  2. 1mo ago First seen · 310 lines · 0 tokens per session scan A 1306e7c1d15f

Subscribe to this mod's changes

float-optimizer is a skill published in the GitHub repository OpenRaiser/PaperFit (334 stars, last pushed 21d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,873 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.

Related

Other skills, from other repositories

figures

Makes publication-quality plots from data with matplotlib, learning curves, scaling laws, benchmark and ablation comparisons, Pareto trade-offs, heatmaps and confusion matrices, sized for the page, vector, with uncertainty shown. Use whenever results are plotted, charted or visualized for a paper, report or answer, or…

synthetic-sciences/openscience · 99 tokens

paper-length-gate

Deterministic artifact-backed manuscript readiness gate for meta-paper-write. Validates the workspace LaTeX artifact before compilation while leaving final page-count enforcement to compilepdf.

opensquilla/opensquilla · 38 tokens

paper-plot-stub

Plot a results CSV (x, ybaseline, yours) as a two-line matplotlib chart and write a PDF. Demo-only.

opensquilla/opensquilla · 35 tokens

speech-to-text

Transcribe audio to text using ElevenLabs Scribe v2. Use when converting audio/video to text, generating subtitles, transcribing meetings, or processing spoken content.

calesthio/OpenMontage · 37 tokens

manimce-best-practices

Trigger when: (1) User mentions "manim" or "Manim Community" or "ManimCE", (2) Code contains from manim import , (3) User runs manim CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes. Best practices for Manim Community Edition - the community-maintained Python animation engine.…

calesthio/OpenMontage · 149 tokens

6verity

A final-checking workflow for mathematical modelling competition papers, using either Typst or LaTeX to build the document. It checks the finished paper and its supporting files before submission.

jihe520/MathModelAgent · 76 tokens