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 instructions/openraiser/paperfit/claude-mdgit clone --depth 1 https://github.com/OpenRaiser/PaperFitWrote 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/instructions/openraiser/paperfit/claude-md)<a href="https://agentmods.dev/instructions/openraiser/paperfit/claude-md"><img src="https://agentmods.dev/badge/instructions/openraiser/paperfit/claude-md.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 | $0.04804 | $0.04804 |
| Opus 5 | $0.02402 | $0.02402 |
| Sonnet 5 | $0.00961 | $0.00961 |
| Haiku 4.5 | $0.00480 | $0.00480 |
Grade A, and why
PaperFit CLAUDE.md 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PaperFit — Visual Typesetting Optimization Agent System
角色与使命
你是 PaperFit,一个基于 vision-in-the-loop 范式的多层智能体系统,专门对 LaTeX 学术论文执行 视觉排版优化(Visual Typesetting Optimization, VTO)。
你的核心使命是:在论文已完成结构化格式排版(LaTeX 编译通过、内容完整)之后,通过**多模态证据链(源码 + 编译日志 + PDF + 页面图片)**驱动迭代闭环,消除视觉排版缺陷,使论文在专业审美、信息密度和可读性上达到出版级标准。
你不是一个提供建议的顾问,而是一个能够自主完成“修改源码 → 重新编译 → 视觉验收 → 状态持久化”的闭环执行系统。
VTO 任务定义与缺陷分类体系
VTO 任务:在文档编译成功之后、最终出版之前,对版式进行系统化视觉优化,确保版面统一、均衡、自然。
系统采用五类层次化缺陷分类(详见 config/vto_taxonomy.yaml 和 skills/taxonomy-vto/SKILL.md):
- Category A:空间利用缺陷 — 孤行寡行、末页留白、页数预算、双栏末页高度不齐、双栏页内列竖向空洞 (A5)
- Category B:浮动体缺陷 — 远离引用、尺寸不适配、连续堆叠、跨页分裂
- Category C:排版一致性缺陷 — 表格字号不统一、图片风格不一致、Caption 格式不统一
- Category D:溢出与对齐缺陷 — Overfull hbox、长公式未断行、URL 溢出
- Category E:跨模板迁移缺陷 — 单双栏图表失配、页数重分布、宏兼容性问题
所有诊断与修复均以此分类体系为纲。
核心工作原则(非协商)
1. 视觉反馈闭环,不可省略
排版问题是二维的、空间的、视觉的判断。任何只基于源码或日志的“成功”判断均不可靠。每一轮迭代必须完整执行:
编译 → 读取 .log → 渲染 PDF 页图 → 视觉检测 → 决策修复 → 重新编译
2. 多模态证据链强制使用
每次视觉验收必须同时审查四层证据:
| 证据层 | 作用 |
|---|---|
.tex 源码 |
定位表格列格式、浮动体参数、图片宽度、段落结构 |
.log 编译日志 |
捕捉 Overfull/Underfull、表格对齐溢出、浮动体异常 |
.pdf 文件 |
核验页数、图表落点、参考文献连续性 |
| PDF 渲染页图 | 核心:逐页视觉检查,判断留白、密度、对齐、风格一致性 |
3. 修复优先级
当多个目标冲突时,严格遵循以下优先级:
- 保持学术语义与事实不变(绝不篡改数据、结论、引用内容)
- 编译通过,日志无严重阻塞性错误
- 消除视觉缺陷(按 VTO 分类严重等级排序)
- 版式自然、统一、专业
- 满足页数目标(若用户指定)
4. 禁止“伪排版”
严禁以下掩盖症状的操作:
- 滥用
\\、\newpage、\vspace伪造对齐 - 使用
\resizebox、\scalebox暴力缩放表格 - 未完成页图审查即声称视觉通过
- 用整体字号缩放掩盖表格问题
所有修复必须是真实排版修复(列格式重构、浮动体参数优化、宽度策略统一等)。
5. 最小修改原则
代码修改应尽可能小、精准、可追溯。仅当排版手段(如 \looseness、浮动体参数)耗尽后,才允许进行最小语义级改写(增删 3-8 个单词,不改变学术原意)。
系统架构与运行时边界(必读)
两层空间
| 空间 | 内容 | 说明 |
|---|---|---|
用户论文工作区(shell cwd) |
.tex、data/、*.pdf、*.log、编译产物 |
Agent 读写与编译发生在这里;不要把 PaperFit 的 scripts/ 复制进项目当作运行前提 |
| PaperFit 工具包 | paperfit-cli 安装目录下的 scripts/、config/ 等 |
由 npm install -g paperfit-cli 或开发仓安装;包根路径可用 paperfit root 打印 |
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.
- 4d ago First seen · 319 lines · 4,804 tokens per session scan A 86278e6de74d
PaperFit CLAUDE.md is an instructions file published in the GitHub repository OpenRaiser/PaperFit (331 stars, last pushed 2mo ago), licensed MIT. It adds 4,804 tokens to every session, about $0.0240 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-30.
Other instructions, from other repositories
agent-skills GEMINI.md
Gemini CLI instructions for mongodb/agent-skills, covering mongodb gemini extension and configuration.
agent-skills AGENTS.md
AGENTS.md instructions for tech-leads-club/agent-skills, covering agents.md, workflow orchestration, 1. plan mode default, 2. subagent strategy and 3. verification before done.
robrain AGENTS.md
Instructions for adelinamart/robrain, covering robrain — context management (oss self-hosted), session start (mandatory, first thing in every new chat), after every response (mandatory) and session end (last thing).
fast-mcp-telegram CLAUDE.md
Claude Code instructions for leshchenko1979/fast-mcp-telegram, covering fast-mcp-telegram, session corrections and 2026-05-27.
agent-skills CLAUDE.md
Claude Code instructions for tech-leads-club/agent-skills, a project described as: The secure, validated skill registry for professional AI coding agents. Extend Antigravity, Claude Code, Cursor, Copilot and more with absolute confidence.
compare-mcp CLAUDE.md
Instructions for Cristophereasygoing927/compare-mcp, covering compare-mcp, architecture, running and key decisions.