一键导入
latex-template
Use when you need to compare a project's LaTeX preamble against the working paper template.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you need to compare a project's LaTeX preamble against the working paper template.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when you need to compare a project .bib against a Paperpile project/topic folder to find uncited papers or unfiled entries.
Use when you need to extract citations from a PDF and generate a validated .bib file. Reads the PDF, identifies all referenced works, constructs BibTeX entries with metadata verification, then runs bib-validate.
Use when you need to check a LaTeX submission against a PDF assessment brief.
Use when you need to replicate a quantitative analysis in a second language (R↔Python↔Stata↔Julia) to verify correctness. Level 1 of the verification hierarchy.
Use when you need to challenge research assumptions or stress-test arguments.
Review user-facing documentation for accuracy, consistency, and completeness across private, public, nested repos, and the user manual. Use when docs feel stale, after major changes, or before sharing. (Replaces `repo-doc-audit`)
| name | latex-template |
| description | Use when you need to compare a project's LaTeX preamble against the working paper template. |
| allowed-tools | ["Read","Glob","Grep","Edit","Write","Bash(ls*)","Bash(latexmk*)","Bash(lualatex*)","Bash(biber*)","AskUserQuestion","Skill"] |
| argument-hint | [project-path] [--apply] |
| skill-dependencies | ["bib-validate","latex","retarget-journal"] |
Compare a research project's LaTeX preamble against the working-paper template bundled with the installed
latexskill. Classify every difference, produce a scored report, and optionally apply changes interactively.
system-auditinit-project-research workflow
copies the template; this skill audits an existing projectlatex first, then run this--apply. Default mode is report-only. Without --apply, the skill produces a report and exits.the available structured-question mechanism.--apply makes any changes, always verify with latex.Resolve the project path. Accept as argument or use CWD. Resolve to absolute path.
Find the project's preamble files. The canonical location is the Overleaf document, accessed via the paper/ symlink in the project directory. Search in this order:
.sty files): paper/your-template.sty + paper/your-bib-template.sty (Overleaf symlink — preferred)paper/settings.tex (Overleaf symlink)paper/ symlink exists, check the project root for your-template.sty (or settings.tex)your-template.sty + your-bib-template.sty or settings.tex (for local-only projects without Overleaf)\input{settings} or \usepackage{your-template} in main.tex pointing elsewhereNEVER check settings/style files in subdirectories like docs/, to-sort/, docs/venues/, or any non-paper location. Only the main paper's preamble is relevant.
If no preamble files are found, report error and exit.
Read the template. Resolve the sibling installed skill path, then use
../latex/templates/working-paper/ relative to this skill. Compare the two
.sty files there, with settings.tex as a legacy fallback when present.
If no template files are found, report "Bundled working-paper template not
found — reinstall or repair the latex skill" and exit.
Parse both files into semantic blocks:
| Block | What to extract |
|---|---|
| Packages | Package name + options (e.g., [dvipsnames]{xcolor}) |
| Hyperref | All \hypersetup{} key-value pairs + \urlstyle |
| Bibliography | System (biblatex/natbib), all options, \addbibresource, source mappings, field clearing (\AtEveryBibitem), possessive citation commands |
| Custom commands | All \newcommand, \renewcommand, \DeclareMathOperator, \newcolumntype |
| Theorem environments | All \newtheorem declarations with their styles and counters |
| Build config | .latexmkrc content (engine, output dir, PDF copy-back) |
For packages, normalise options: \usepackage[a,b]{pkg} and \usepackage[b,a]{pkg} are equivalent.
For each semantic block, compare the project against the template. Detailed check tables for each block: references/comparison-checklist.md
Blocks to compare: Packages (missing, extra, options, load order, duplicates) · Hyperref (missing keys, different values, urlstyle, cleveref ordering) · Bibliography (system mismatch, options, source mappings, field clearing, possessive citations) · Custom Commands (missing, different definitions, column types, math commands) · Theorem Environments (missing, different styles/counters, numberwithin) · Build Config (.latexmkrc existence, engine, output dir, PDF copy-back)
Label every difference with: Adopt (missing from project, safe to add) · Keep (project-specific, informational) · Conflict (needs human judgement, always ask) · Drop (redundant/superseded).
Full classification rules and when-to-use-each-label guidance: references/comparison-checklist.md
Check main.tex (preamble loading, documentclass, printbibliography, no stale bibliography commands) and .latexmkrc (exists, engine, output dir, PDF copy-back).
Full check tables: references/comparison-checklist.md
Produce a structured compliance report. Full format: references/report-format.md
Apply numeric quality scoring using the shared framework: ../shared/quality-scoring.md
Start at 100 and deduct per issue:
| Tier | Deduction | Examples |
|---|---|---|
| Critical | -15 to -25 | Missing .latexmkrc, natbib vs biblatex conflict, missing hyperref, hyperref/cleveref load order wrong |
| Major | -5 to -14 | Missing common packages (booktabs, microtype, enumitem), missing dvipsnames, duplicate package loads, missing custom commands (\todo, \red, \blue), missing source mappings, missing field clearing, missing cleveref |
| Minor | -1 to -4 | Missing optional packages, different hyperref colours, missing theorem environments, missing math operators, missing \numberwithin |
| Score | Verdict | Meaning |
|---|---|---|
| 95-100 | Ship | Fully aligned with template |
| 90-94 | Ship with notes | Minor gaps, acceptable to proceed |
| 80-89 | Revise | Meaningful gaps — fix before submission |
| 60-79 | Revise (major) | Significant drift — several features missing |
| 0-59 | Blocked | Major conflicts or missing infrastructure — consider full resync |
If --apply is not set, end with:
Run `latex-template <path> --apply` to interactively apply changes.
Apply changes in dependency order to avoid compilation breakage:
dvipsnames to xcolor)\hypersetup{} block)the available structured-question mechanism for system changes).latexmkrc (create or update)the available structured-question mechanism with the template version, project version, and context.After applying changes:
latex. This handles any secondary issues the changes might introduce.main.tex structure. Only checks \input{settings} and bibliography commands.proofread workflow covers
prose quality when that additional review is wanted..bib files. Use bib-validate for bibliography key issues.retarget-journal for that."latex-template ~/papers/costly-voice"
Produces a compliance report without making any changes.
"latex-template ~/papers/costly-voice --apply"
Produces the report, then interactively applies Adopt and Drop changes with user confirmation.
"Check my template compliance"
Runs on the current working directory in report-only mode.
"I updated the template — check all my papers"
Run on each project individually. This skill checks one project at a time.
../latex/templates/working-paper/ — the bundled template this skill compares againstlatex — used in Phase 7 to verify compilation after applying changesaudit-project-research — complementary: checks directory structure, this checks LaTeX preamblebib-validate — complementary: checks citation keys, this checks bibliography system configinit-project-research — creates projects from the template; this skill
verifies ongoing complianceretarget-journal — handles journal-specific formatting (different concern)