compile — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited compile (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
latexmk -interaction=nonstopmode -halt-on-error -file-line-error -pdf <main>.texThat's the answer for ~70% of documents. The rest need a different engine — detect first.
Run scripts/detect_compiler.sh <main>.tex. The script returns one of pdflatex, xelatex, lualatex. Decision precedence (deterministic):
% !TEX program = lualatex|xelatex|pdflatex → use it verbatim.\directlua, \luadirect, \usepackage{luacode}, \usepackage{luatexja} → lualatex.\usepackage{xeCJK}, \usepackage{ctex} (default xetex mode), \usepackage{bidi} → xelatex.\usepackage{fontspec}, \usepackage{polyglossia}, \usepackage{luabidi}, \setmainfont, \setsansfont, \setmonofont, \newfontfamily, \newfontface → lualatex (preferred over xelatex for broader features and stronger RTL via luabidi).\documentclass{ctexart|ctexrep|ctexbook} (default xelatex) → xelatex.pdflatex (broadest journal-template compatibility, fastest).Source: https://ctan.org/pkg/fontspec (fontspec aborts under pdftex). When uncertain on edge cases, delegate to /academic-latex:docs-lookup.
| Engine | latexmk flag |
|---|---|
| pdflatex | -pdf |
| xelatex | -pdfxe |
| lualatex | -pdflua |
Source: latexmk manual at https://mirrors.ctan.org/support/latexmk/latexmk.pdf.
ENGINE=$(scripts/detect_compiler.sh "$MAIN")
case "$ENGINE" in
pdflatex) FLAG="-pdf" ;;
xelatex) FLAG="-pdfxe" ;;
lualatex) FLAG="-pdflua";;
esac
latexmk $FLAG -interaction=nonstopmode -halt-on-error -file-line-error -synctex=1 "$MAIN"latexmk auto-detects which to run:
backend=biber produces <main>.bcf — biber runs.\bibliography{} produces <main>.aux with \bibdata — bibtex runs.$bibtex_use=2 default (run bib if requested) is correct for both. Don't override unless instructed.Source: latexmk manual §$bibtex_use and §bib_dependencies.
When the document mixes (which is wrong — bibliography and biblatex together), report and stop; refer the user to /academic-latex:bibliography.
If the user's directory has more than one .tex and no clear main:
% !TEX root = <path> magic comments in the candidates.\documentclass{...} — files with that are entry points; files without are sub-includes.\begin{document} — must be present in the main.If latexmk exit code is non-zero:
.log./academic-latex:debug with the path to <main>.log and <main>.tex. Do not attempt to fix in this skill — debug owns error classification and remediation.The compile loop with debug:
compile → fail → debug → patch (with author or docs-lookup as needed) → compileStop after 3 unsuccessful iterations and surface the residual error to the user.
After a successful build, leave aux files in place — latexmk will use them on the next incremental build. To force a clean rebuild: latexmk -C (removes everything, including the PDF) or latexmk -c (keeps the PDF, removes intermediates).
Delegate package-specific or option-specific questions (e.g., "does this microtype option work under xelatex?") to /academic-latex:docs-lookup. Do not guess — see suite README.
2026-05-09 — latexmk v4.88 (2026-03-09); fontspec docs at https://ctan.org/pkg/fontspec.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.