Agent skill

Latex Rescue

by Calix-L in Calix-L/awesome-latex-skills

Diagnose and repair LaTeX build failures in local projects or supplied logs.

MITAuto-check passedDocuments & Office

Install Latex Rescue

skills CLI
$ npx skills add Calix-L/awesome-latex-skills --skill latex-rescue -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Calix-L/awesome-latex-skills latex-rescue --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Calix-L/awesome-latex-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/latex-rescue .claude/skills/latex-rescue && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
latex-rescue
GitHub stars
181
Token cost
~1.4k tokens
SKILL.md length
717 words
Files
8 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Diagnose and repair LaTeX build failures in local projects or supplied logs.

  • Tasks that involve LaTeX
  • SKILL.md covers Purpose, Establish the failing build, Diagnose and repair and Verify and report
  • Runs Python scripts from its folder

What it does

Latex Rescue is an agent skill from Calix-L/awesome-latex-skills. Diagnose and repair LaTeX build failures in local projects or supplied logs. Make minimal source fixes, preserve scientific content and reference keys, and report actual build evidence and unresolved errors.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts and reference files (for example `agents/config.yaml`, `agents/openai.yaml` and `references/build-check.md`).

It sits in Documents & Office, covering LaTeX. It works with LaTeX. The repository describes itself as: LaTeX manuscript workflows with five agent skills, project diagnostics, reproducible builds and offline change review. The licence is MIT.

When your agent uses it

  • Tasks that involve LaTeX

Example prompts

  • “/latex-rescue”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 7c29d3c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Latex Rescue loads about 1.4k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 717 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Calix-L/awesome-latex-skills at commit 7c29d3c, republished under its MIT licence (© Calix-L). 717 words, ~1,420 tokens.

Download SKILL.mdSave it as .claude/skills/latex-rescue/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
latex-rescue
description
Diagnose and repair LaTeX build failures in local projects or supplied logs. Make minimal source fixes, preserve scientific content and reference keys, and report actual build evidence and unresolved errors.
metadata.version
1.25.0

Purpose

Repair the requested project with the smallest change that addresses the actual failure. Compilation success does not establish mathematical correctness.

Establish the failing build

  • For a pasted error, give a diagnosis using the supplied context. Request source or logs only when they are needed to distinguish plausible fixes; a project directory is not required for a useful diagnosis.
  • For a local project, identify its root document from the build command, configuration, magic comments, and \documentclass. A file named main.tex is a candidate, not proof that it is the root. Resolve ambiguous roots before editing.
  • Respect the engine, auxiliary/output directories, bibliography backend, and any custom build steps. fontspec requires XeLaTeX or LuaLaTeX. Check biblatex's backend option rather than assuming Biber in every project.
  • Reproduce the failure with the existing build command where available. Retain exit codes and the final engine/backend logs. A stale PDF is not build evidence. Missing tools or project files mean compilation remains unverified.

For manual builds, use the actual root and engine, for example:

sh
pdflatex -no-shell-escape -interaction=nonstopmode -file-line-error main.tex

Use the shell's own exit-status handling when capturing output. Bash pipelines need set -o pipefail; do not assume Bash syntax works in PowerShell. Do not enable shell escape merely to silence an error; follow the project's actual requirements and the user's execution permissions.

Diagnose and repair

Read the first causal error, its source context, and subsequent diagnostics. File-line diagnostics may appear as file.tex:line: rather than starting with !. Undefined references and overfull boxes are generally warnings, not syntax failures.

Consult only the relevant resources:

  • Error catalog: known typos, missing packages, encoding, references, and environment errors.
  • Package conflicts: option clashes or competing definitions; preserve the official template's package choices.
  • Debug workflow: cascading errors and failures that remain after an initial contextual fix.

Check whether an apparently misspelled command or environment is user-defined before replacing it. Inspect balanced argument structure rather than counting all braces or dollar signs across comments, escaped characters, and verbatim. Prefer the causal fix over patching every downstream diagnostic.

Preserve equation meaning, table cells, citation and label keys, bibliography records, file paths, metadata, comments, and literal/code environments. Syntax repairs inside an equation are possible when their meaning is unambiguous; flag alternative mathematical interpretations instead of choosing one to compile. Never delete or disable content, invent a missing reference, or edit an official .sty, .cls, or .bst file to make the build pass.

Use a temporary copy for diagnostic isolation. Keep a reviewable source diff so an unsuccessful edit can be reverted without discarding the author's other work.

Show full SKILL.md (301 more words)Show less

Verify and report

Rebuild after a meaningful repair batch. Prefer the configured latexmk mode when available; otherwise run the selected engine, required BibTeX/Biber step after auxiliary files exist, and further engine passes to settle references. Do not invoke a bibliography backend on projects that do not use one.

For a conventional root document without custom build steps, the bundled build checker records fresh-output evidence across engine/backend passes. Run scripts/check_build.py with the actual root, selected engine/backend, and a new --output directory. Preserve configured build systems for projects beyond that helper's scope. Its default job name follows the root file. Use --until-stable for bounded auxiliary settling and --require-resolved when unresolved references must fail the check; these flags do not decide missing reference targets for the author. The report retains recorder-based local input fingerprints and identifies the failed engine/backend step. These observations do not freeze project inputs or cover every bibliography/system resource; inspect the guide's provenance limits. When local backend resources need consistency checks, select them explicitly with repeated --watch-input options as described in that guide; selection does not establish which resources the backend actually read.

Read the final logs and inspect the resulting PDF when rendering tools are available. Report build failure separately from unresolved references, duplicate labels, and layout warnings. If a change introduces regressions, revert that change; if the same failure repeats, change the diagnosis. After three repair attempts without progress, report the blocker and the evidence needed to proceed.

Deliver the changed files and concise reasons, engine/backend/build command, observed exit result, log/PDF locations, visual-check status, remaining warnings, and unresolved author decisions. For Overleaf-only material, distinguish a proposed repair from one verified through a fresh Overleaf or local build.

Use latex-polish or latex-fmt only if the user also needs prose editing or a format conversion and the corresponding skill is available.

© Calix-L, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in latex-rescue of Calix-L/awesome-latex-skills.

  • SKILL.md
  • agents/config.yaml
  • agents/openai.yaml
  • references/build-check.md
  • references/debug-workflow.md
  • references/error-catalog.md
  • references/package-conflicts.md
  • scripts/check_build.py

Open the folder on GitHubat commit 7c29d3c

Compare with similar skills

Latex Rescue next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Latex Rescue compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Latex Rescue this skillCalix-L/awesome-latex-skills181—~1.4kAutomated safety check: PassMIT
Research Writingalfonso0512/research-writing-skill4901 repos~818Automated safety check: PassMIT
Paper WritingMLNLP-World/Paper-Writing-Tips4.7k—~630Automated safety check: PassNone
Evomath TaoEvoScientist/EvoSkills4782 repos~3.8kAutomated safety check: PassApache-2.0
PaperjurySpark-To-Paper-Skills/paperjury1.2k—~5.3kAutomated safety check: PassMIT
PDFzai-org/ZCode7.7k—~18kAutomated safety check: NotesProprietary

Similar skills

  • Research Writing

    alfonso0512/research-writing-skill

    科研论文写作助手,提供 30 个 Prompt 模板覆盖论文写作全流程. An agent skill from alfonso0512/research-writing-skill.

    490 GitHub starsUsed in 1 repo~818 tokens
    Documents & OfficeAuto-check passed
  • Paper Writing

    MLNLP-World/Paper-Writing-Tips

    学术论文写作检查与优化助手。基于 MLNLP-World 社区整理的论文写作技巧,帮助检查和优化学术论文。Use when: (1) 检查论文 LaTeX 格式和排版, (2) 优化公式符号使用, (3) 改进图表设计, (4) 润色英文学术表达, (5) 检查参考文献格式, (6) 投稿前终稿检查, (7) 用户询问论文写作技巧或规范。

    4.7k GitHub stars~630 tokensUpdated 15 days ago
    Documents & OfficeAuto-check passed
  • Evomath Tao

    EvoScientist/EvoSkills

    A skill your agent uses whenever the user submits a non-trivial mathematical claim that needs a rigorous proof or audit.

    478 GitHub starsUsed in 2 repos~3.8k tokens
    Documents & OfficeAuto-check passed
  • Paperjury

    Spark-To-Paper-Skills/paperjury

    Three modes for CS-conference papers (CVPR/ICCV/ECCV vision, ACL/EMNLP/NAACL NLP, ICLR/NeurIPS/ICML/AAAI ML).

    1.2k GitHub stars~5.3k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • PDF

    zai-org/ZCode

    Professional PDF toolkit covering four production workflows: reports, creative visuals, academic LaTeX, and existing PDF processing.

    7.7k GitHub stars~18k tokensUpdated yesterday
    Documents & OfficeAuto-check: notes
  • Thesis Defense PPTX Builder

    zouchenzhen/thesis-defense-pptx-skill

    Builds an editable thesis defense PowerPoint from a thesis PDF or LaTeX project while preserving a supplied university or lab template, then runs a visual quality check.

    266 GitHub stars~2.4k tokensUpdated 4 mo ago
    Documents & OfficeAuto-check passed

More from Calix-L/awesome-latex-skills

  • Pdf2tex

    Calix-L/awesome-latex-skills

    Reconstruct editable LaTeX from PDF content using page-aware extraction and visual comparison.

    181 GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Latex Fmt

    Calix-L/awesome-latex-skills

    Reformat LaTeX papers for a specified venue, year, track, and submission stage.

    181 GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Latex Polish

    Calix-L/awesome-latex-skills

    Edit academic prose in LaTeX manuscripts or supplied text at light, moderate, or strict intensity.

    181 GitHub stars~981 tokensUpdated 3 days ago
    Auto-check passed
  • Paper Read

    Calix-L/awesome-latex-skills

    Summarize and critically analyze academic papers supplied as PDFs, text, arXiv links, or journal URLs.

    181 GitHub stars~1.1k tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Latex Rescue

What does Latex Rescue do?

Diagnose and repair LaTeX build failures in local projects or supplied logs. Latex Rescue is an agent skill from Calix-L/awesome-latex-skills. Diagnose and repair LaTeX build failures in local projects or supplied logs.

When should I use Latex Rescue?

Latex Rescue fits situations like: tasks that involve LaTeX.

How do I install Latex Rescue in Claude Code?

Run `npx skills add Calix-L/awesome-latex-skills --skill latex-rescue -a claude-code`. Or copy the skill folder (latex-rescue in Calix-L/awesome-latex-skills) into .claude/skills/latex-rescue in your project. Claude Code loads it when a task matches its description.

How do I install Latex Rescue in Codex?

Run `npx skills add Calix-L/awesome-latex-skills --skill latex-rescue -a codex`. Or copy the skill folder (latex-rescue in Calix-L/awesome-latex-skills) into .agents/skills/latex-rescue in your project. Codex loads it when a task matches its description.

Can I use Latex Rescue in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Calix-L/awesome-latex-skills --skill latex-rescue -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/latex-rescue, .gemini/skills/latex-rescue, .github/skills/latex-rescue and .opencode/skills/latex-rescue in your project.

What does Latex Rescue need to run?

Going by SKILL.md and its folder, Latex Rescue needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Latex Rescue access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Latex Rescue safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Latex Rescue use?

Latex Rescue is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Latex Rescue use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.7k tokens, read only when the agent opens those files.

What are the alternatives to Latex Rescue?

Skills that share tags, products or a category with Latex Rescue: Research Writing (alfonso0512/research-writing-skill, 490 stars), Paper Writing (MLNLP-World/Paper-Writing-Tips, 4.7k stars), Evomath Tao (EvoScientist/EvoSkills, 478 stars) and Paperjury (Spark-To-Paper-Skills/paperjury, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Latex Rescue?

Calix-L (a GitHub user) maintains it in Calix-L/awesome-latex-skills, which has 181 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: Calix-L/awesome-latex-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.