Cleans and fixes .tex files: strips comments, verifies %% BEGIN/END section markers, and resolves common LaTeX compilation errors like missing packages and undefined references.
Ships in ai-asset-pricing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The "clean room" skill. Run to get a .tex file into a consistent, compilable state with verified section markers.
/latex-doctor -- full cleanup of the main .tex file/latex-doctor comments -- only strip comments/latex-doctor markers -- only verify section markers/latex-doctor compile -- only fix compilation issues/latex-doctor path/to/file.tex -- clean a specific filetools/bootstrap.py audit, or a repo-root compatibility shim if present):
cd {latex_dir} && pdflatex -interaction=nonstopmode {file} && bibtex {stem} && pdflatex -interaction=nonstopmode {file} && pdflatex -interaction=nonstopmode {file}
Scan the .tex file and remove unnecessary comments:
REMOVE:
% some old note)% comment part)% \begin{table}...% \end{table})PRESERVE (never touch):
%% BEGIN key and %% END key section markers% !TeX directives% inside \url{}, \verb||, or verbatim environments%% NOTE: or similar)Report: "Removed N comment lines (K characters saved)"
Verify %% BEGIN/END markers for consistency.
.tex file for all %% BEGIN key and %% END key markersCLAUDE.md defines registered section keys, cross-reference against them\section{} commands without %% BEGIN/END pairs%% BEGIN key without matching %% END key (or vice versa)%% END key appears before the next %% BEGIN keyReport: "Verified N markers. M issues found."
Address common compilation errors:
Missing packages:
\usepackage{X} is missing but commands from package X are used, add the \usepackage to the preambleUndefined references:
\ref{label} where \label{label} does not existMissing bibliography:
.bib file exists and is referenced\cite{} not in .bib)Orphaned labels:
\label{...}) but are never referenced (\ref{...})Address common warnings:
Overfull \hbox:
\allowbreak, adjust column width, \resizebox)Underfull \hbox:
Missing references:
Report: "Addressed N warnings. Reduced from M to K remaining."
LATEX DOCTOR REPORT
====================
File: [filename]
COMMENTS:
Removed: N lines (K characters)
Preserved: M marker/directive lines
SECTION MARKERS:
Verified: N markers
Issues: M issues found [list if any]
COMPILATION:
Before: E errors, W warnings
After: E' errors, W' warnings
Fixed: [list of fixes applied]
REMAINING ISSUES:
- [list of issues that need human attention]
STATUS: [CLEAN COMPILE / N ISSUES REMAINING]
What SKILL.md sets; muted values are Claude Code's defaults
/ai-asset-pricing:latex-doctorfrom ai-asset-pricing
ai-asset-pricing@fin-skills is listed by howard-lynn-ye/fin-rsi — review the source before installing
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin ai-asset-pricing38 skills in this plugin
/bond-dataReference for the Dickerson corporate bond dataset: column mappings between WRDS and PyBondLab, rating encoding, return definitions, signal clusters, and data gotchas. Auto-apply when loading bond data for PyBondLab analysis.Other plugins' skills for the same job