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 commands/openraiser/paperfit/paperfit-undogit 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/commands/openraiser/paperfit/paperfit-undo)<a href="https://agentmods.dev/commands/openraiser/paperfit/paperfit-undo"><img src="https://agentmods.dev/badge/commands/openraiser/paperfit/paperfit-undo.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.1 | $0.00000 | $0.00557 |
| Opus 5 | $0.00000 | $0.00279 |
| Sonnet 5 | $0.00000 | $0.00111 |
| Haiku 4.5 | $0.00000 | $0.00056 |
Grade A, and why
paperfit-undo 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 6d 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.
What it actually says
/paperfit-undo — 回滚最近一次源码写入
作用: 恢复最近一次 PaperFit 自动写回前的备份版本,优先回滚主 .tex,必要时一并恢复 data/state.json。
用户入口说明:
- 这是回滚入口,用户只需要表达“撤销上次自动修改”之类的意图。
- 不要要求用户手动定位备份文件再执行恢复命令。
- 回滚后的输出应解释恢复了什么、当前状态如何,而不是只给文件路径。
防呆约束:
- 不要使用
git reset --hard、git checkout --之类的破坏性命令 - 不要调用内部任务管理工具来“创建回滚任务”
- 若
data/backups/中没有匹配备份,应明确说明无法自动回滚,而不是猜测性覆盖文件
工具调用约定
在论文项目根目录内:
- 主源码备份通常位于
data/backups/<main_tex文件名>.*.bak - 状态备份通常位于
data/backups/state_*.json - 回滚后可执行
paperfit run scripts/paperfit_portrait.py refresh --main <main_tex>让画像重新对齐
用法
/paperfit-undo
也可以由自然语言触发,例如:
撤销 PaperFit 上一次自动修改
回滚到上一个安全版本
执行流程
- 读取
data/state.json,确定main_tex。 - 检查
data/backups/中最新的main_tex备份文件,以及最近一个state_*.json。 - 先向用户说明将恢复哪两个文件:
main_tex <- latest .bakdata/state.json <- latest state backup(若存在)
- 执行文件恢复。
- 若画像文件存在,执行:
paperfit run scripts/paperfit_portrait.py refresh --main <main_tex>
- 提示用户继续用:
/show-status/check-visual/fix-layout
输出结果
- 恢复的备份文件路径
- 当前主文件路径
- 是否同时恢复了
data/state.json - 是否已刷新画像
调度
- 不调用 Agent
- 直接基于
data/backups/与data/state.json执行恢复
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.
- 6d ago First seen · 66 lines · 0 tokens per session scan A 87d971c3fd43
paperfit-undo is a command published in the GitHub repository OpenRaiser/PaperFit (331 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 557 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.
Other commands, from other repositories
ingest
Ingest a local file (PDF, DOCX, TXT, MD, etc.) into Gnosys memory. Extracts text, splits into chunks, and creates atomic memories.
wtfp:export-latex
Export the manuscript and bibliography to portable LaTeX source with declared formatting.
ocr
One-shot OCR — scanned PDF to Word + WeChat HTML + audit trail.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.