paperfit

A project rule for PaperFit, a system that improves the visual layout of LaTeX research papers. It defines how users describe tasks and how the internal workflow should run.

In plain words
What is it for?
Use it when working from a paper's project folder on layout analysis, full repair, template migration, page-budget adjustment, or visual-only inspection.
Why use it?
It keeps users focused on goals such as analysis, repair, template migration, or page-count changes instead of requiring them to know internal commands and processing steps.

Cursor rule

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 rules/openraiser/paperfit/paperfit
Clone the repo
git clone --depth 1 https://github.com/OpenRaiser/PaperFit
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 469 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.00469
Opus 5 $0.00000 $0.00234
Sonnet 5 $0.00000 $0.00094
Haiku 4.5 $0.00000 $0.00047

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

Security

Grade A, and why

paperfit 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.

config/host_assets/cursor/paperfit.mdc · 43 lines

How it starts

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

PaperFit Rule

Use PaperFit when working on a LaTeX paper that needs visual typesetting optimization.

Product Rules

  • Work from the paper project root.
  • Treat PaperFit as a natural-language agent system, not a CLI-first workflow.
  • Users should describe goals directly, such as layout analysis, full repair, template migration, page-budget adjustment, or visual-only inspection.
  • Automatically infer the closest PaperFit workflow from the user's request before asking them for low-level PaperFit command syntax.

Execution Rules

  • Use the paperfit CLI, runtime, and scripts as the internal execution layer.
  • Prefer paperfit runtime --state data/state.json run-round main.tex --template <TEMPLATE> --target-pages <N> for the main closed loop.
  • Use paperfit render and paperfit run scripts/... only for targeted debugging, staged execution, or recovery.
  • Do not require the user to manually type internal PaperFit commands in the normal product path.
  • During long PaperFit runs, report progress proactively instead of staying silent.
  • Prefer self-recovery in recoverable failures; only ask the user to act when environment, permission, or ambiguity issues block execution.
  • Keep user-facing explanations centered on results, visual defects, repair strategy, and residual risks.

Layout Rules

  • Do not use \resizebox or \scalebox as brute-force table shrinking.
  • Prefer full-width or full-column table layouts that preserve readability and alignment.
  • Do not change the template font packages or the visual font appearance of body text and tables during repair.
  • Confirm fixes against rendered page images, not source-only inspection.
  • Treat visual results as the primary acceptance signal; logs and source are supporting evidence.
  • Keep semantic edits minimal and do not alter academic claims, results, or citations.
  • Do not silently delete figures, tables, captions, or labels to improve layout.

Installed Assets

  • Global PaperFit skills live under ~/.cursor/skills/paperfit/.
  • This rule file is project-local and should live at .cursor/rules/paperfit.mdc inside the paper repository.

Read the full file on GitHub · 43 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. 3d ago First seen · 43 lines · 0 tokens per session scan A 937ea47225a9

Subscribe to this mod's changes

paperfit is a cursor rule 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 469 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.