dsh-latex-guard
Manifest validLaTeX and BibTeX guardrails for DeepSeek Harness: compile checks with automatic xelatex/lualatex detection, BibTeX entry deduplication and field filling from Crossref, and \cite key audits against the
dsh-latex-guard
LaTeX compile check and BibTeX lint/fill/audit tools for DeepSeek Harness and any agent.
Features
- check — compile a LaTeX project with
latexmkand return a structured report of errors, warnings and undefined citations - bib-lint — dedupe entry keys, check required fields per entry type, canonicalize formatting
- bib-fill — fill missing entry fields from Crossref by DOI or title (never overwrites existing values)
- cite-audit — compare citation keys in
.texfiles against a.bibfile: cited-but-missing and never-cited entries. Recognized commands:\cite,\citep,\citet,\parencite,\textcite, and the biblatex commands\autocite,\footcite,\fullcite,\nocite(a\nocitekey counts as cited).
All commands return human-readable output by default and structured JSON with --json. Exit codes: 0 success, 1 business error, 2 usage error. A check that compiles but reports status: "failed" also exits 1; a skipped check (latexmk unavailable) exits 0, since graceful degradation is not an error.
Usage
1. As a dsh plugin
dsh plugin add dsh-latex-guard
Registers four agent tools: latex_check, bib_lint, bib_fill, cite_audit.
2. As a standalone CLI
npx dsh-latex-guard check <dir> <entry.tex> [--engine <name>] [--json]
npx dsh-latex-guard bib-lint <file.bib> [--write]
npx dsh-latex-guard bib-fill <file.bib> [--write]
npx dsh-latex-guard cite-audit <file.bib> <tex...>
--write modifies the bib in place — confirm before using it. As a safety net, both write paths refuse to write when the bib cannot be fully parsed (e.g. an entry missing its closing brace), instead of silently dropping the unparseable tail.
check --engine <name> selects the latexmk engine: auto (default), pdflatex, xelatex or lualatex. In auto mode the engine is detected from the entry tex (and a local \documentclass file): a % !TeX program = ... magic comment, \RequireXeTeX, xeCJK or {ctex select xelatex, \RequireLuaTeX selects lualatex, otherwise pdflatex. The report's engine field records the engine actually used; when a compile fails without any parseable error line, the report also carries a logTail with the last lines of the latexmk log.
Known limitations
cite-auditcounts\citekeys inside commented-out (% ...) lines as real citations.- A
passedcheck report may still carry citation warnings emitted by latexmk's intermediate passes; only the final pass reflects the true citation state.
3. As an agent skill
The skill/SKILL.md bundled in this package teaches any SKILL.md-compatible agent how to drive the CLI.
latexmk dependency
check requires a TeX installation providing latexmk on PATH (e.g. TeX Live or MiKTeX). When latexmk is not found, check degrades gracefully: it returns a report with skipped: true instead of failing, so the other three commands (pure BibTeX/text processing, no TeX needed) remain fully usable.
bib-fill is the only command that needs network access (Crossref API, 10s timeout, one retry).
License
MIT
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
| 0.1.1 | — | — |
| 0.1.2 | — | — |
| 0.1.3 | — | — |
Similar plugins
by Yu-tao-Li
DeepSeek Harness 参考文献真实性检查器 (dsh-reference-checker) — refcheck_check 工具:逐条核对论文文献(PDF/BibTeX/tex/文本)于 Crossref / OpenAlex / arXiv,给出 found/partial/not_found/error 判定与按输入样式的更正版引用 | Reference verificatio
★ 4
MIT
JavaScript
Aug 19, 2026
dsh plugin --profile web add dsh-reference-checkerby Flan246
Academic literature search, citation and BibTeX tools for DeepSeek Harness and any agent (Crossref + OpenAlex). dsh plugin + CLI + SKILL.md.
★ 3
MIT
TypeScript
Sep 14, 2026
dsh plugin --profile web add dsh-lit-searchby wp-a
DeepSeek Harness 的中文学术论文检索 Bundle:复用 Academic Paper Search MCP,支持多源检索去重、引用核验、引文图谱、MeSH、试验检索与审计导出。
★ 3
MIT
Python
Aug 29, 2026
dsh plugin --profile web add dsh-academic-paper-searchby PerryLink
Double-check before you ship: grill the requirements, test the implementation, prove the delivery. An engineering-discipline bundle for DeepSeek Harness.
★ 29
Apache-2.0
TypeScript
Sep 12, 2026
dsh plugin --profile web add dsh-doublecheckby 863683348
Academic writing toolkit for DeepSeek Harness agents: paper outlines, title/abstract skeletons, GB/T 7714 / APA / MLA citations, phrasing QA, and a pre-submission checklist
★ 3
↓ 724/wk
MIT
JavaScript
Sep 11, 2026
dsh plugin --profile web add dsh-plugin-academic-writingby PerryLink
Verifiable research-report engine for DeepSeek Harness: content-addressed evidence ledger (claim-snapshot binding, tamper-evident) plus versioned sealed reports with per-claim verification verdicts an
★ 108
Apache-2.0
TypeScript
Sep 12, 2026
dsh plugin --profile web add dsh-research-report