Sandbox
@appautomaton/latex-arxiv-SKILL

Gated LaTeX workflow for Claude Code and Codex

This repo packages a workflow that guides an agent from topic selection to a compiled IEEEtran PDF. It adds a plan gate, an issues CSV as the execution contract, citation verification, prose refinement, and LaTeX compilation checks.

427 stars37 forksTeXUpdated 7d ago
Who it's for

Builders who want their agent to research and write review papers in a controlled LaTeX workflow.

What it delivers

You can turn a topic into a compiling review paper with verified citations instead of rewriting and checking everything by hand.

What it does

Plan gate before writing

The agent creates a plan and waits for approval before it writes prose into `main.tex`.

Issue-driven execution

Work is tracked in `issues/*.csv`, so each section has acceptance criteria and visible progress.

Verified citations

Every `\cite{}` is checked against a live source before it is added to `ref.bib`.

LaTeX compile checks

The workflow requires a clean `pdflatex` and `bibtex` build with no undefined citation warnings.

Portable skill bundles

The skill files are built to work in both Claude Code and OpenAI Codex.

Example paper runs

The `example/` folder shows complete generated papers, plans, sources, and PDFs.

How to get it

  1. 1Prompt 1 (start the paper)
    write a review article for arxiv that is about SOTA generative image models
  2. 2Prompt 2 (delegate the decisions and proceed)
    I will let you choose the best title and the topics and inclusion of material that you see the best fit

README

arXiv Review Paper Harness

CI GitHub stars Claude Code OpenAI Codex Agent Skill LaTeX License: MIT

An agentic harness, packaged as a portable Agent Skill for Claude Code and Codex. It turns a topic into an arXiv-ready ML/AI review paper that is gated, issue-driven, and verified citation by citation.

arXiv Review Paper Harness is an agentic harness for writing machine-learning and AI review papers in LaTeX. You give your coding agent a topic, and the harness drives it through a disciplined pipeline: literature discovery, a human approval gate, an issue-by-issue writing loop, citation verification, prose refinement, and compilation. The result is a two-column IEEEtran project that compiles to a PDF. Its skills and scripts follow the portable Agent Skills standard, so the same files run in OpenAI Codex and Anthropic Claude Code.


How it works

flowchart TD
    A([Topic]) --> B[Research snapshot<br/>10 to 20 papers, no prose]
    B --> C[Scaffold IEEEtran project<br/>plus draft plan and candidate titles]
    C --> D{Approval gate}
    D -- revise --> C
    D -- approved --> E[Issues CSV<br/><i>execution contract</i>]
    E --> F[Per-issue writing loop<br/>research, write, <b>verify every citation</b>]
    F --> G[Rhythm refinement<br/>vary sentence and paragraph length]
    G --> H[QA and compile<br/>fix overfull boxes, zero undefined cites]
    H --> I([main.pdf and ref.bib])

    style D fill:#f5b400,stroke:#333,color:#000
    style I fill:#3da639,stroke:#333,color:#fff

The agent cannot write a single paragraph into main.tex until two conditions hold. First, you approve the plan. Second, the issues CSV exists. From there, every section is a tracked issue with target citations and acceptance criteria, and every citation is checked against a live source before it enters ref.bib.

Why it's different

  • Hard quality gates, not vibes: no prose before plan approval, and nothing marked DONE until acceptance criteria are met.
  • Verified citations only: every \cite{} is web-checked against its source before being added, so there are no hallucinated references.
  • Issue-driven execution: an issues/*.csv file is the single source of truth for progress, and the agent splits or inserts issues as scope grows instead of doing untracked work.
  • Deterministic where it matters: scaffolding, plan and issue generation, arXiv discovery (with a local SQLite cache), validation, and compilation are Python scripts, so they behave the same on every run.
  • Dual-runtime: one skill bundle that runs in both Claude Code and Codex.
  • Compiles or it is not done: delivery requires a clean pdflatex and bibtex build with no undefined-citation warnings.

Quickstart

The example/v0-single-SKILL paper was generated by activating the arxiv-paper-writer skill with two prompts.

Prompt 1 (start the paper):

write a review article for arxiv that is about SOTA generative image models

The agent does an initial literature pass, drafts a section framework, proposes candidate titles, and writes a plan/<timestamp>-<slug>.md with clarification questions.

[!TIP] Open the generated plan/ file and answer the clarification questions to steer scope, title, and coverage.

Prompt 2 (delegate the decisions and proceed):

I will let you choose the best title and the topics and inclusion of material that you see the best fit

This second prompt is intentionally vague, and the plan questions were ignored. The harness still makes best-effort choices and produces a complete, compiling LaTeX project. See main.tex, ref.bib, and main.pdf.

What's in the box

ComponentWhat it is
arxiv-paper-writerThe primary harness. The gated workflow, guardrails, and success criteria.
scripts/Deterministic Python helpers: scaffolding, plan and issue generation, CSV validation, LaTeX compile, and arxiv_registry.py (arXiv Atom-API discovery and BibTeX with a local SQLite cache).
latex-rhythm-refinerPost-processes prose for readable sentence and paragraph rhythm while preserving every citation.
collaborating-with-claude · -geminiBridges to delegate sub-tasks or get a second opinion from another model.
agent-skills-standard.mdThe repo's spec for authoring portable SKILL.md bundles across Codex and Claude Code.
example/Two fully generated papers, with plans, issue CSVs, sources, and compiled PDFs.

Examples

PaperCitationsNotes
v0: Generative image models review55 verifiedSingle-skill run, the 2-prompt quickstart above.
v0.5: Video world simulators (3D/4D) review81 verifiedMulti-skill run with the SQLite arXiv registry and BibTeX cache.

Requirements

[!IMPORTANT] A working LaTeX environment is required: pdflatex and bibtex, or latexmk.

  • Agent runtime: OpenAI Codex or Anthropic Claude Code, with skills enabled.
  • Python 3.8+ for the helper scripts.
  • Web search and browsing for citation verification.
  • Tested on macOS with GPT-5.2 (Extra High).

FAQ

How does it prevent hallucinated or invented citations? Guardrails, built into the workflow. Every citation is verified against a live source before it enters ref.bib, and any claim without evidence becomes a TODO rather than a fabricated reference.

Can I use it on an existing LaTeX project? Yes. Point it at your project and a citation-validation pass audits and repairs ref.bib without re-scaffolding anything.

Can it write original or experimental research papers, not just reviews? Yes, with a little tailoring. Review and survey articles are its sweet spot out of the box, but nothing locks it there. Shape the plan and inputs to your goal, and the same gated workflow extends to original or experimental work.

Credits

The issue-driven workflow is inspired by "issue-driven development" as demonstrated by appautomaton/agent-designer.

License

MIT.

Files in the repo

Repository payload11 top-level entries
  • .codex
  • .github
  • docs
  • example
  • tests
  • .claude
  • .gitignore
  • agent-skills-standard.md
  • AGENTS.md
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More harnesses

The job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.

42k
holaboss-ai/
holaOS

Open-source agentic workspace enterprises can make their own. Connect the systems you already run — 100+ integrations, MCP, chat tools, apps, browser, local files — with shared memory. Any agent (Claude Code, Codex), any model, or BYOK. Set up in clicks, not months. Local-first: your data never leaves your machines.

11k
backnotprop/
plannotator

Annotate and review coding agent plans and code diffs visually, share with your team, send feedback to agents with one click.

8.6k
rpamis/cometHarnesses

Comet: agent skill harness for turning ideas into evaluated workflows

3k