papyrus-diagnose-compilation

papyrus-diagnose-compilation is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 60 tokens per session (992 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for LaTeX compilation, the process that turns LaTeX source into a PDF. It finds the first meaningful error and applies a small fix instead of rewriting the document.

In plain words
What is it for?
Use it to diagnose failed or stale PDF builds, compiler errors, missing braces or environments, escaped characters, and citation or reference build cycles.
Why use it?
LaTeX errors often trigger a chain of later errors, so fixing the final message can hide the original problem or damage working source.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to diagnose failed or stale PDF builds, compiler errors, missing braces or environments, escaped characters, and citation or reference build cycles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kirodotdev/kirocrew/papyrus-diagnose-compilation
About the project

Kiro Crew is a persistent development workspace where agents continue multi-step software work across sessions, schedules, and connected interfaces. Developers use it locally or remotely through a desktop app, web dashboard, CLI, Slack, or Discord, with unattended tasks and recurring jobs. The catalogue contains skills and instructions for working with this workspace.

kirodotdev/KiroCrew · 4,574 stars · on GitHub · kiro.dev

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.

Any agent
npx skills add kirodotdev/KiroCrew --skill papyrus-diagnose-compilation
Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew

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 papyrus-diagnose-compilation

README.md
[![agentmods](https://agentmods.dev/badge/skills/kirodotdev/kirocrew/papyrus-diagnose-compilation/github.svg)](https://agentmods.dev/skills/kirodotdev/kirocrew/papyrus-diagnose-compilation)
Your own site
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/papyrus-diagnose-compilation"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/papyrus-diagnose-compilation/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 papyrus-diagnose-compilation

Your own site · 80×15
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/papyrus-diagnose-compilation"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/papyrus-diagnose-compilation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 992 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.00060 $0.00992
Opus 5.5 $0.00024 $0.00397
Sonnet 5.5 $0.00012 $0.00198
Haiku 4.5 $0.00006 $0.00099

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

Security

Grade A, and why

papyrus-diagnose-compilation 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 5d 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.

src/kiro_crew/builtin_skills/papyrus-diagnose-compilation/SKILL.md · 66 lines

How it starts

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

Diagnose LaTeX Compilation

Turn a failed build into a located, classified, minimally-fixed error. Never mass-rewrite the source to "make it compile" — find the one thing that broke.

In Papyrus the app owns compilation (Cmd+S / Ctrl+S) and shows the AUTHOR a clickable diagnostics list. You cannot see that list: read the compiler log the app leaves in the project's top-level directory (<main>.log, named after the main .tex), or ask the author to paste the error. Do not run the compiler yourself in Papyrus (see papyrus-writing). Running the compiler directly applies only outside the app.

Step 1 — Read the FIRST real error

Work from the first error, not the last: LaTeX errors cascade, and the tail of the log is usually damage from the head. The app's list is grouped by kind (file:line errors, then ! errors, then warnings, then boxes), not log order, and is parsed from only the last 20,000 characters of the final pass, so its top row may not be the first error; the .log on disk is complete. In a raw log, the first file:line: message (or ! …) line is the one to fix.

-file-line-error makes a compiler print file:line: message. If citations/refs are wrong (not the compile itself), the full cycle is pdflatex → bibtex/biber → pdflatex → pdflatex; Tectonic runs that cycle itself. In Papyrus, when the app compiles with pdflatex it runs the bibtex cycle for you if the document cites anything, but never biber: a biblatex document on the biber backend will not resolve its citations there — tell the author rather than editing around it.

Step 2 — Classify and fix at the source line

Common cause → fix:

  • Unescaped special char (_ % & # $ in text) → escape it (\_, \%, …).
  • Unbalanced brace / missing } or \end{env} → match the environment.
  • Undefined control sequence → missing \usepackage, or a typo'd/renamed macro.
  • File 'x.sty' not found → package not installed in this TeX distribution; prefer a package the document already loads over telling the author to install one.
  • File not found (graphic/\input) → wrong path or extension; confirm the file exists.
  • Missing $ inserted → math symbol (_, ^, \alpha) used outside math mode; wrap in $…$ or an equation env.
  • Missing \begin{document} → a stray character before the preamble ended.
  • Bib: Citation 'key' undefined / stale .bbl → add the entry to the .bib (don't remove the \cite), then recompile (in Papyrus the app's compile runs bibtex and the extra passes; outside it, run bibtex/biber and two more pdflatex passes).
  • There's no line here to end → a \\ on an otherwise-empty line.
  • Overfull \hbox, Underfull, most Warning: lines are WARNINGS, not errors — do NOT "fix" them by hacking spacing (see papyrus-writing: never hack margins).

Read the full file on GitHub · 66 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. 5d ago Changed · +1 lines 2cfd02b10fc0
  2. 14d ago Changed · +3 lines 38eee42647d8
  3. 18d ago Changed · +11 lines e4d17a28247c
  4. 1mo ago First seen · 51 lines · 60 tokens per session scan A 4ea3b4d5acde

Subscribe to this mod's changes

papyrus-diagnose-compilation is a skill published in the GitHub repository kirodotdev/KiroCrew (4,574 stars, last pushed today), licensed Apache-2.0. It adds 60 tokens to every session and 992 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-09-09.

Related

Other skills, from other repositories

document-processor

Guidance for processing documents, extracting content, and transforming structured information. Use when the user asks to process, parse, extract, or transform document content such as PDFs, Word files, or spreadsheets.

vixues/LeAgent · 44 tokens

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…

awslabs/agentcore-samples · 92 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens

surfsense-documents

Make or change a Word document (.docx), a PDF, a PowerPoint deck (.pptx) or an Excel workbook (.xlsx) by writing a Python script that surfsenserenderdocument runs, optionally starting from a source's own Word or PowerPoint file. Load it whenever the user asks for one of these, or for a change to one you made.

MODSetter/SurfSense · 80 tokens

surfsense-pdf

Work on PDFs the user has, or PDFs in Studio, without changing them - merge, take out, split, turn or reorder pages, add a watermark, page numbers, a header or a footer, and list or fill a form's fields. Load it whenever the user asks for one of these on a PDF.

MODSetter/SurfSense · 70 tokens

pdf

Use when tasks involve reading, creating, or reviewing PDF files where rendering and layout matter; prefer visual checks by rendering pages (Poppler) and use Python tools such as reportlab, pdfplumber, and pypdf for generation and extraction.

MemTensor/memmy-agent · 56 tokens