What problem does it solve? LaTeX papers fail to compile for dozens of cryptic reasons—undefined citations, missing bibliographystyle, misplaced \bottomrule, incompatible packages—and error messages often mislead about the true root cause. This Skill provides a field-tested diagnostic playbook that maps each error signature to its verified fix, preventing destructive mistakes like accidentally deleting source files. ## Core Features & Use Cases - Error-to-Fix Mapping: Diagnoses common failures including natbib undefined citations, 'I found no \bibstyle command', algorithmic/enumitem package conflicts, and table \bottomrule cascade errors, each with a concrete repair procedure. - BibTeX Debugging Workflow: Distinguishes between genuinely missing entries and .bib file structural corruption (unbalanced braces) using brace counting and isolated minimal-compile testing. - Safety Guardrails: Enforces timestamped backups before any batch edit and bans wildcard deletion patterns like rm -f paper.* that can wipe out source files. - Use Case: Your elsarticle paper shows 'Citation undefined' warnings after the first pdflatex run. The Skill walks you through the full pdflatex → bibtex → pdflatex → pdflatex chain, verifies paper.bbl is non-empty, and confirms zero remaining errors in the log. ## Quick Start Ask the assistant to diagnose why my paper.tex fails to compile and fix the undefined citation warnings using this LaTeX troubleshooting skill.