paper-artifact-runtime

Persists, assembles, audits, and compiles LaTeX manuscripts into verified PDFs.

6.8k|540|Updated May 6, 2026
One-click install
npx skills add https://github.com/opensquilla/opensquilla --skill paper-artifact-runtime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: paper-artifact-runtime
Source: https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/paper-artifact-runtime
Command: npx skills add https://github.com/opensquilla/opensquilla --skill paper-artifact-runtime

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Academic paper generation workflows need a deterministic, sandboxed way to persist section drafts, assemble a manuscript, audit citations, and compile a real PDF without risking unsafe file access or corrupted artifacts.

Core Features & Use Cases

  • Artifact Persistence & Assembly: Stores generated section fragments on disk and assembles them into a run-scoped LaTeX manuscript with a references.bib file under paper/<meta_run_id>/.
  • Citation Auditing: Builds a citation provenance table classifying each reference as STRONG, OK, WEAK, INVALID, or UNUSED based on its URL, DOI, or arXiv locator.
  • Hardened PDF Compilation: Runs xelatex and bibtex with shell escape disabled, paranoid Kpathsea file access, CJK line-breaking support, page-count verification, and bounded idempotent length-expansion repairs.
  • Use Case: An orchestrator generating a research paper calls this runtime to persist seven section files, assemble paper.tex, verify every citation resolves to a credible source, and compile a page-count-verified PDF.

Quick Start

Invoke the runtime by piping a JSON payload with an operation field such as persist_sections, assemble_manuscript_tex, citation_map, or compile_pdf into scripts/run.py.

Frequently Asked Questions about paper-artifact-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile a LaTeX manuscript to PDF programmatically?

Send a JSON payload with operation compile_pdf to scripts/run.py. The runtime runs xelatex and bibtex in sequence with shell escape disabled, then verifies the real PDF page count and final LaTeX quality log before returning success markers.

How do I audit citations in a LaTeX paper?

Use the citation_map operation, which parses \\cite keys from paper.tex and entries from references.bib, then classifies each source as STRONG, OK, WEAK, INVALID, or UNUSED based on its URL, DOI, or arXiv locator.

Does xelatex compilation support Chinese or CJK text?

Yes. The runtime detects CJK characters and injects XeTeX line-break locale settings plus the NotoSansCJK font via fontspec, without requiring xeCJK, ctex, or network package installs.

Why does PDF compilation fail with a COMPILE_FAILED error?

Compilation fails when the manuscript is missing, contains TeX text-visibility controls, lacks a valid TARGET_PAGES contract, or exceeds the 110-second compile budget. Symlinked artifact roots or files are also rejected for safety.

What are the limits of automated length expansion for manuscripts?

Each repair accepts at most one body-only fragment per repair id, capped at 96 KiB and 180 substantive units. Fragments cannot contain preamble commands, citations, page breaks, or top-level sections, and insertion is idempotent.