基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/flonat/claude-research --skill latex-template命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Use when you need to audit a research project against the init-project-research template.
Use when you need to validate a paper's bibliography — cross-references \cite{} keys against .bib files or embedded \bibitem entries, finds missing/unused/typo'd keys, and checks every key against the Paperpile library via the local resolver. Deep verification mode spawns parallel agents for DOI/metadata validation at scale. Fix mode rekeys drifted keys to canonical and stages missing entries for Paperpile.
Use when you need to bootstrap a full research project with directory scaffold and Overleaf symlink.
| 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] |
Compare a research project's LaTeX preamble against the working paper template (
templates/latex-wp/your-template.sty+your-bib-template.sty). Classify every difference, produce a scored report, and optionally apply changes interactively.
/system-audit/init-project-research instead (it copies the template)/latex first, then run this--apply. Default mode is report-only. Without --apply, the skill produces a report and exits.AskUserQuestion.--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. The canonical location is templates/latex-wp/ in Task Management:
$TASK_MGMT/templates/latex-wp/your-template.sty + your-bib-template.sty (canonical source)settings.tex in the same locationIf no template files are found, report "Template not found — cannot compare. Verify that templates/latex-wp/ exists in Task Management." 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 + |
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)AskUserQuestion for system changes).latexmkrc (create or update)AskUserQuestion 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 for that..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.
templates/latex-wp/your-template.sty + your-bib-template.sty — the canonical template this skill compares against/latex — used in Phase 7 to verify compilation after applying changes/audit-project-research — complementary: checks directory structure, this checks LaTeX preamble/bib-validate — complementary: checks citation keys, this checks bibliography system config/init-project-research — creates projects from the template; this skill verifies ongoing compliance/retarget-journal — handles journal-specific formatting (different concern)\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.