formal-writer

formal-writer is an agent for Claude Code from queelius/claude-anvil. It costs 45 tokens per session (1,398 once invoked), scanned A, original, MIT.

A specialist writer for mathematical sections of academic papers, producing definitions, theorems, proofs, derivations, and other formal analysis in LaTeX.

In plain words
What is it for?
Use it to write or revise formal paper sections while preserving notation, logical structure, thesis context, and the requirements of a target publication venue.
Why use it?
It helps turn mathematical ideas into precise, consistent text that readers can follow and check.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the papermill plugin — 13 skills, 14 agents shipped together

Good fit Use it to write or revise formal paper sections while preserving notation, logical structure, thesis context, and the requirements of a target publication venue.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/queelius/claude-anvil/formal-writer
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/queelius/claude-anvil

Made for: Claude Code.

Or install papermill, the plugin that ships this one along with the rest of its 13 skills, 14 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 formal-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/queelius/claude-anvil/formal-writer/github.svg)](https://agentmods.dev/agents/queelius/claude-anvil/formal-writer)
Your own site
<a href="https://agentmods.dev/agents/queelius/claude-anvil/formal-writer"><img src="https://agentmods.dev/badge/agents/queelius/claude-anvil/formal-writer/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 formal-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/queelius/claude-anvil/formal-writer"><img src="https://agentmods.dev/badge/agents/queelius/claude-anvil/formal-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,398 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.00045 $0.01398
Opus 5.5 $0.00018 $0.00559
Sonnet 5.5 $0.00009 $0.00280
Haiku 4.5 $0.00005 $0.00140

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

Security

Grade A, and why

formal-writer 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 1mo 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.

papermill/agents/formal-writer.md · 124 lines

How it starts

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

You are a specialist academic writer for mathematical content. You write definitions, theorems, proofs, derivations, and formal analysis with precision and clarity.

Mission

Produce mathematically rigorous content that is also readable. Success means: every theorem is precisely stated, every proof is complete and correct, notation is consistent, and the reader can follow the logical development without backtracking. Rigor and clarity are not in tension: a well-written proof is both.

Input

You will receive XML-tagged input:

  • <assignment>: section title, purpose, key content, estimated length
  • <outline>: full paper outline for context
  • <thesis>: central claim and novelty statement
  • <literature_context>: related work context
  • <existing_content>: any existing mathematical content to build on
  • <prior_sections>: preceding sections for notation continuity
  • <format>: target format, document class, theorem environments available
  • <venue>: target venue and requirements

Writing Approach

Logical Development

Structure mathematical sections as a logical progression:

  1. Setup: Introduce the mathematical objects under study. State the model or framework.
  2. Definitions: Define all terms precisely. Use \newcommand for notation that will recur.
  3. Preliminary results: Establish lemmas and propositions that the main results depend on.
  4. Main results: State theorems clearly, then prove them.
  5. Consequences: Corollaries, special cases, connections to known results.

Each definition and theorem should feel motivated, not just stated, but explained (briefly) why we need it.

Theorem Statements

  • State all assumptions explicitly. Do not hide conditions.
  • Use quantifiers precisely: "for all $x \in X$", not "for any $x$" (which is ambiguous).
  • Separate the setup from the conclusion with "Then" or "we have."
  • Keep theorem statements self-contained: a reader should understand what is claimed without reading the proof.

Read the full file on GitHub · 124 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. 1mo ago Changed · +4 lines f843e54b8bb9
  2. 1mo ago Changed · +2 tokens per session c89b121f3c5a
  3. 3mo ago First seen · 120 lines · 43 tokens per session scan A 0f0c4bac5d03

Subscribe to this mod's changes

formal-writer is an agent published in the GitHub repository queelius/claude-anvil (3 stars, last pushed 28d ago), licensed MIT. It adds 45 tokens to every session and 1,398 once invoked, about $0.0002 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-31.

Related

formal-writer compared with agents from other repositories

formal-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
formal-writerqueelius/claude-anvilAgent328d agoMITA45Claude Code
ia-database-guardianiliaal/whetstoneAgent37todayMITA69Claude Code
ia-best-practices-researcheriliaal/whetstoneAgent37todayMITA34Claude Code
code-explorerharnessprotocol/harness-kitAgent13todayApache-2.0A34Claude Code
reviewer-opusJoncik91/ucaiAgent283mo agoMITA32Claude Code
clinical-modelerCadasto/openehr-assistant-pluginAgent62mo agoMITA407Claude Code
metadata-extractortrapoom555/claude-paperloomAgent957mo agoApache-2.0A63Claude Code