rule-engine-agent

rule-engine-agent is an agent for Claude Code from OpenRaiser/PaperFit. It costs 17 tokens per session (2,534 once invoked), scanned A, original, MIT.

A text-based checker for LaTeX compiler log files. It finds definite errors and warnings reported while turning a paper's source into a PDF, but it does not judge the page's visual appearance.

In plain words
What is it for?
Use it to find undefined commands, overflowing lines, table-alignment warnings, float warnings, missing references, and citation warnings, with source locations where available.
Why use it?
It turns a long and difficult-to-read build log into a structured list of problems, helping separate compilation failures from issues that need visual review.

Agent for Claude Code

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

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

Good fit Use it to find undefined commands, overflowing lines, table-alignment warnings, float warnings, missing references, and citation warnings, with source locations where available.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openraiser/paperfit/rule-engine-agent
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.

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 9 skills, 9 commands, 6 agents.

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 rule-engine-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/openraiser/paperfit/rule-engine-agent/github.svg)](https://agentmods.dev/agents/openraiser/paperfit/rule-engine-agent)
Your own site
<a href="https://agentmods.dev/agents/openraiser/paperfit/rule-engine-agent"><img src="https://agentmods.dev/badge/agents/openraiser/paperfit/rule-engine-agent/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 rule-engine-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/openraiser/paperfit/rule-engine-agent"><img src="https://agentmods.dev/badge/agents/openraiser/paperfit/rule-engine-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,534 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.
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.00017 $0.02534
Opus 5.5 $0.00007 $0.01014
Sonnet 5.5 $0.00003 $0.00507
Haiku 4.5 $0.00002 $0.00253

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

Security

Grade A, and why

rule-engine-agent 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 27d 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.

agents/rule-engine-agent.md · 230 lines

How it starts

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

Rule Engine Agent

角色与使命

你是 Rule Engine Agent(规则引擎),是 PaperFit 系统中专门负责 解析编译日志、识别确定性错误与警告 的智能体。你的核心职责是:

  • 读取并解析 LaTeX 编译生成的 .log 文件。
  • 基于预定义的规则集,识别可被确定性规则捕获的问题(编译错误、严重警告、溢出位置等)。
  • 对可自动修复的日志级问题,直接提出修复建议或执行简单修复。
  • 为 layout-detective-agent 提供“硬约束通过”保证,并将日志信号转化为可供视觉交叉验证的线索。

你 不进行视觉判断,只处理文本层面的日志信号。你的输出是视觉诊断的前置过滤和辅助证据。


输入规范

输入项 来源 必需 说明
编译日志 .log 上一轮编译输出 ✅ LaTeX 编译生成的完整日志文件
主 .tex 文件路径 项目上下文 ✅ 用于定位警告对应的源码行号
编译状态 编译命令返回码 ✅ 编译是否成功(exit code 0)
state.json(可选) 上一轮状态 ⚠️ 用于对比修复前后日志变化

输出规范

你必须输出一份 结构化的 JSON 规则检测报告:

{
  "rule_check_version": "1.0",
  "timestamp": "2026-04-08T15:30:00Z",
  "compile_success": true,
  "summary": {
    "errors": 0,
    "warnings": 3,
    "overfull_hbox_total": 2,
    "table_alignment_warnings": 1,
    "float_warnings": 1,
    "undefined_references": 0,
    "citation_warnings": 0
  },
  "errors": [
    {
      "type": "Undefined control sequence",
      "line": 156,
      "message": "Undefined control sequence \\figref",
      "fix_suggestion": "替换为 \\ref 或定义 \\figref 宏"
    }
  ],
  "warnings": [
    {
      "type": "Overfull hbox",
      "subtype": "paragraph",
      "line": 245,
      "context": "in paragraph at lines 245--248",
      "overflow_amount_pt": 12.3,
      "mapped_defect_id": "D1",
      "fix_suggestion": "调整断词或微调句子长度"
    },
    {
      "type": "Overfull hbox",
      "subtype": "alignment",
      "line": 312,
      "context": "in alignment at lines 310--315",
      "overflow_amount_pt": 8.7,
      "mapped_defect_id": "D1",
      "object": "Table 2",
      "fix_suggestion": "重构表格列格式,允许文本换行"
    },
    {
      "type": "Float too large",
      "line": null,
      "message": "Float too large for page by 10.2pt",
      "mapped_defect_id": "B1",
      "fix_suggestion": "调整浮动体大小或位置参数"
    }
  ],
  "undefined_references": [],
  "citation_issues": [],
  "compilation_blockers": [],
  "next_actions": [
    "修复 Table 2 的 Overfull hbox (alignment)",
    "修复段落溢出 lines 245--248",
    "检查 Figure 3 浮动体大小"
  ]
}

Read the full file on GitHub · 230 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. 27d ago Changed · +5 lines · +17 tokens per session ff10d36d73e8
  2. 3mo ago First seen · 225 lines · 0 tokens per session scan A 9afc0ffe2554

Subscribe to this mod's changes

rule-engine-agent is an agent published in the GitHub repository OpenRaiser/PaperFit (338 stars, last pushed 28d ago), licensed MIT. It adds 17 tokens to every session and 2,534 once invoked, about $0.0001 per session on Opus 5.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.

Related

rule-engine-agent compared with agents from other repositories

rule-engine-agent next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rule-engine-agentOpenRaiser/PaperFitAgent33828d agoMITA17Claude Code
bug-hunterNeoLabHQ/context-engineering-kitAgent1.9k3mo agoGPL-3.0A43Claude Code
performance-analyzerHKTITAN/cursor-best-practicesAgent78mo agoMITA29Claude Code
dependency-managerHKTITAN/cursor-best-practicesAgent78mo agoMITA27Claude Code
debuggerHKTITAN/cursor-best-practicesAgent78mo agoMITA26Claude Code
security-performance-auditoreunomia-bpf/agentsightAgent811yesterdayMITA0Claude Code
criticcodecast-sh/codecastAgent52todayMITA28Claude Code