write-paper

write-paper is a skill for Claude Code, Codex from frenzymath/Danus. It costs 106 tokens per session (17,578 once invoked), scanned A, original, Apache-2.0.

A workflow that turns a verified collection of mathematical facts into a LaTeX research paper and compiled PDF. LaTeX is a text-based system commonly used to typeset academic mathematics, and arXiv is a public research-paper archive.

In plain words
What is it for?
Use it to write, compile, audit citations, verify references online, and revise a paper in a configurable `amsart` style.
Why use it?
It helps produce a paper with checked references and a consistent format once the main theorem has been established.

Skill for Claude CodeCodex

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 skills/frenzymath/danus/write-paper
Any agent
npx skills add frenzymath/Danus --skill write-paper
Clone the repo
git clone --depth 1 https://github.com/frenzymath/Danus

Made for: Claude Code, Codex.

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 write-paper

README.md
[![agentmods](https://agentmods.dev/badge/skills/frenzymath/danus/write-paper.svg)](https://agentmods.dev/skills/frenzymath/danus/write-paper)
Your own site
<a href="https://agentmods.dev/skills/frenzymath/danus/write-paper"><img src="https://agentmods.dev/badge/skills/frenzymath/danus/write-paper.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 17,578 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.00106 $0.17578
Opus 5 $0.00053 $0.08789
Sonnet 5 $0.00021 $0.03516
Haiku 4.5 $0.00011 $0.01758

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

Security

Grade A, and why

write-paper 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.

The scan reads SKILL.md. This mod also ships 4 executable files (driver/anchors_stale.sh, driver/compile_verify.sh, driver/latex_git_push.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/skills/write-paper/SKILL.md · 1,087 lines

How it starts

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

write-paper — fact graph → publishable paper

You are the main agent. This skill turns a project's verified fact graph into a publishable LaTeX paper in a configurable house style: a standalone \documentclass{amsart} .tex with a real manual bibliography, compiled to a clean PDF, ready for arXiv / an Overleaf (or other) LaTeX git repo. It is the publication sibling of human-summary (a reader-facing progress report with no bibliography).

The heavy LaTeX work is delegated to a local codex at extra-high (xhigh) reasoning — the same codex machinery the workers and the verify service already use. The writer, auditor, verifier, and reviser roles are wrapped behind the write-paper MCP service (tools paper_write / reference_audit / reference_verify / paper_revise): you call them with structured args, the tool assembles each role's prompt internally (so the style guide and fact-graph bytes never enter your context) and drives the codex with each role isolated by construction. The reference chain is auditor (offline, flags) → verifier (online, checks) → reviser (edits). You orchestrate the stages, call these tools, gate on compilation, and surface the one or two real decisions to the operator.

When to use

  • A project's target theorem is established in the fact graph and the operator wants the paper.
  • The operator asks to write, revise, audit references for, or push the paper for a project.

Do not use it for the progress report (human-summary) or the internal strategy synthesis (elaboration).

Source of content: the fact graph (never your memory)

Build the mathematics from the project's verified facts (<project>/fact_graph/facts/*.md) and the verbatim goal in <project>/PROBLEM.md — exactly as human-summary does, but for publication:

  • Each fact's ## statement is fully-quantified and self-contained → render into the paper's theorems/propositions (clean LaTeX, do not paraphrase loosely). Its ## proof is the argument; ## intuition feeds a proof sketch where useful.
  • Load-bearing facts first: high dependency depth (headline results) and high in-degree (key lemmas). predecessors give you the internal Theorem~\ref{} cross-reference structure with zero invention.
  • Citations come structured, from the source. Each fact's external_refs (key / authors / title / arxiv / year / cited_for) records the published results its proof cited. driver/seed_ledger.py aggregates them across the project into the starting REFERENCE_LEDGER.md. Do not re-mine citations from prose — that is the #1 failure mode (hallucinated references).
  • Preserve all mathematics. Invent nothing — no assumptions, lemmas, citations, theorem labels, or definitions that are not in the fact graph. If a step is unclear, flag [GAP: ...], do not smooth it over.

Read the full file on GitHub · 1,087 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 1,087 lines · 106 tokens per session scan A 5d7dbb9339aa

Subscribe to this mod's changes

write-paper is a skill published in the GitHub repository frenzymath/Danus (387 stars, last pushed 7d ago), licensed Apache-2.0. It adds 106 tokens to every session and 17,578 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

jupyter-notebook

Iterative Python via live Jupyter kernel (hamelnb).

NousResearch/hermes-agent · 18 tokens

annotating-variants

Annotates VCF variants and normalizes HGVS nomenclature with public, license-free annotators (Ensembl VEP REST, VEP/SnpEff/ANNOVAR offline) and links variants to gnomAD population frequencies and the clinical context OpenMed extracts. Use when the user wants to predict variant consequences, map HGVS to genomic…

maziyarpanahi/openmed · 179 tokens

batch-processing-clinical-text

Run large-scale batch NER, PII extraction, or de-identification over many clinical notes on-device with OpenMed, with sharding, checkpointing, resumability, and append-only JSONL output. Use when the user needs to process a corpus or folder of notes, de-identify a dataset, run NER over thousands of documents, build a…

maziyarpanahi/openmed · 161 tokens

evaluating-with-leakage-gates

Evaluate an OpenMed de-identification or clinical NER model against the leakage-first release gates G1a through G8, which gate releases on residual PHI leakage rather than on F1. Use when the user wants to run the OpenMed eval harness on a synthetic golden set, decide whether a de-id model is RELEASABLE or…

maziyarpanahi/openmed · 158 tokens

mapping-loinc

Maps laboratory and clinical observation names extracted by OpenMed to LOINC codes using the public Regenstrief LOINC and FHIR terminology APIs. Use when the user wants to code lab tests, vital signs, or observations to LOINC, resolve a test name plus specimen and method to the correct LOINC part-model code, attach…

maziyarpanahi/openmed · 197 tokens

parsing-ccda-documents

Parses C-CDA / CCD XML clinical documents to extract human-readable section narrative plus coded entries, keyed by section LOINC codes and templateIds. Use before OpenMed processing when ingesting C-CDA R2.1 documents (CCD, Discharge Summary, H&P, Consultation Note) exported from an EHR and you need the narrative…

maziyarpanahi/openmed · 152 tokens