Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when a LaTeX build fails or produces a broken PDF in Stage 07 (Writing) — undefined control sequences, missing style packages, unresolved citations or references, float placement blowing the page budget, or a build_log.txt full of errors you need to triage.
.claude/skills/tangxiangru-latex-repair/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -43% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -32% | 0% |
Stage 07's gate wants workspace/writing/main.tex, section files, a bibliography, a compiled PDF, and workspace/artifacts/build_log.txt. When the build fails, the loop to avoid is: change something, recompile, read the same error, change something else. LaTeX reports the first thing that broke, and one real cause usually generates a cascade of downstream errors.
Read build_log.txt from the top and fix in this order. Recompile after each class, not after each edit.
LaTeX Error: File 'neurips_2025.sty' not found.AutoR does not vendor official style files (templates/registry.yaml says so and carries the venue's official_url). Either fetch the style package to workspace/writing/, or fall back to a standard class and record the substitution honestly in the stage summary. Do not silently switch venue.
or a typo. Check the preamble before assuming the command is wrong.
$ / runaway argument — almost always an unescaped _, %, &or # in prose that came from a variable name or a file path. These are common when text was assembled from JSON results.
undefined. Requires a bibtex/biber pass and then two more LaTeX passes. A single compile will always report these.
the venue page limit, at which point they are a submission blocker.
A one-shot compile cannot resolve cross-references or citations. The minimum is:
pdflatex main.tex # writes .aux
bibtex main # or biber, per the venue's citation_style
pdflatex main.tex # resolves citations
pdflatex main.tex # resolves page-dependent referencesIf latexmk is available, latexmk -pdf main.tex does this correctly and is the better default. Whatever you run, tee the full output to workspace/artifacts/build_log.txt — the gate reads that file, and a log containing only the last pass hides the errors from the earlier ones.
If no LaTeX toolchain exists in the environment, say so in the stage summary and in build_log.txt, and do not fabricate a PDF. A file named main.pdf that is not a PDF fails later and more confusingly than a missing one. Check whether the run should be using --output-format markdown instead — that path has no LaTeX dependency at all.
| Log line | Actual cause | | --- | --- | | Citation 'foo2024' undefined after a full bibtex cycle | The key is not in the .bib. Use the citation-discipline skill; do not invent the entry. | | Reference 'fig:main' undefined | The figure was cited before it was written, or the label is on the wrong element. | | File 'figures/main.pdf' not found | Stage 06 wrote figures under workspace/figures/; the path in the .tex is relative to the main file, not to the workspace root. | | Page count over the venue limit | Not a LaTeX bug. Check templates/registry.yaml for page_limit and refs_in_limit, then cut content rather than shrinking margins — most venues reject the second. |
?? or [?] markers survive in the rendered text.build_log.txt contains the whole build, including the passes that succeeded.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 8,434 | 9,533 | +13% | 1 | 1 | 0% | 141 | 1,151 | +716% | 0 | 0 | — |
case-02 | fail→fail | 8,885 | 8,667 | -2% | 1 | 1 | 0% | 174 | 1,098 | +531% | 0 | 0 | — |
case-03 | fail→fail | 9,118 | 4,663 | -49% | 1 | 1 | 0% | 121 | 1,131 | +835% | 0 | 0 | — |
case-04 | pass→fail | 7,850 | 12,543 | +60% | 1 | 1 | 0% | 1,434 | 2,305 | +61% | 0 | 0 | — |
case-05 | pass→pass | 19,224 | 16,213 | -16% | 1 | 1 | 0% | 2,908 | 3,121 | +7% | 0 | 0 | — |
case-06 | pass→pass | 7,766 | 10,217 | +32% | 1 | 1 | 0% | 1,346 | 2,768 | +106% | 0 | 0 | — |
case-07 | fail→pass | 15,544 | 5,837 | -62% | 1 | 1 | 0% | 1,740 | 1,969 | +13% | 0 | 0 | — |
case-08 | pass→pass | 13,267 | 15,974 | +20% | 1 | 1 | 0% | 2,227 | 2,985 | +34% | 0 | 0 | — |
case-09 | fail→pass | 11,384 | 5,116 | -55% | 1 | 1 | 0% | 1,160 | 1,700 | +47% | 0 | 0 | — |
case-10 | pass→pass | 13,748 | 10,377 | -25% | 1 | 1 | 0% | 1,502 | 1,797 | +20% | 0 | 0 | — |
case-11 | pass→pass | 18,299 | 6,953 | -62% | 1 | 1 | 0% | 2,086 | 1,968 | -6% | 0 | 0 | — |
case-12 | fail→pass | 17,284 | 3,230 | -81% | 1 | 1 | 0% | 2,636 | 1,501 | -43% | 0 | 0 | — |
case-13 | pass→pass | 10,991 | 11,874 | +8% | 1 | 1 | 0% | 1,947 | 1,993 | +2% | 0 | 0 | — |
case-14 | pass→pass | 8,321 | 4,232 | -49% | 1 | 1 | 0% | 1,471 | 1,499 | +2% | 0 | 0 | — |
case-15 | pass→pass | 13,513 | 6,882 | -49% | 1 | 1 | 0% | 2,237 | 2,162 | -3% | 0 | 0 | — |
case-16 | pass→pass | 15,864 | 9,833 | -38% | 1 | 1 | 0% | 1,913 | 2,756 | +44% | 0 | 0 | — |
case-17 | fail→pass | 18,359 | 6,315 | -66% | 1 | 1 | 0% | 2,348 | 2,038 | -13% | 0 | 0 | — |
case-18 | pass→pass | 15,049 | 13,259 | -12% | 1 | 1 | 0% | 1,565 | 2,099 | +34% | 0 | 0 | — |
case-19 | fail→pass | 17,328 | 2,254 | -87% | 1 | 1 | 0% | 1,956 | 1,323 | -32% | 0 | 0 | — |
case-20 | fail→pass | 26,978 | 6,613 | -75% | 1 | 1 | 0% | 3,150 | 1,173 | -63% | 0 | 0 | — |
case-21 | fail→pass | 16,095 | 7,543 | -53% | 1 | 1 | 0% | 1,727 | 1,258 | -27% | 0 | 0 | — |
case-22 | pass→pass | 26,253 | 14,666 | -44% | 1 | 1 | 0% | 3,006 | 3,306 | +10% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.