LaTeX 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 .bib file.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-latex-guard
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Flan246/dsh-latex-guard
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
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
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 84099
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 543
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
PerryLink/dsh-industry-research★ 211
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
PolinniZhong/dsh-knit★ 54
Puts the Markdown documents, source files, images and video that already exist anywhere in the session workspace into the DSH sidebar, ranked by relevance to the current conversation. The default lexical mode matches your recent messages against title, summary and body locally with IDF weighting (BM25) — no model calls, no network, nothing leaves the machine. The list comes from scanning the workspace rather than from a recent-files list, so restarting DSH or opening a new session does not empty it. Results are organised into a three-tier reading order (primary / supporting / related) with a verifiable reason on every row — which field matched, which document cites this one — and one click opens an in-place preview: Markdown as rendered text, relative-path images actually drawn, source code with the host's own syntax highlighting, video streamed over HTTP Range. The same Context Pack is exposed to the agent as a knit_docs tool. Later versions added read evidence and lifecycle tracking (attribution is frozen at the moment of reading), pin / exclude (exclusion applies before retrieval, and is undoable), relation evidence (references / imports / tests, with line numbers) and an incremental index reused across restarts. Since v0.23 there is also an optional hybrid mode: it is off by default and only runs once you configure an Ollama or OpenAI-compatible embedding provider yourself. When it runs, what leaves the machine is your query text plus each candidate file's title and summary — a Markdown summary is an excerpt of the body's first paragraph (at most 60 characters), a code file's summary is its workspace-relative directory, and an image or video contributes its file name; full bodies and absolute paths are not sent, and a loopback provider keeps everything on this machine. Since v0.24 it also associates uncommitted changes: a read-only git status (fixed argv, no shell, whitelisted child-process environment) combined with the same reference / import / test / mention evidence shows which files a change is likely to drag along, and it is off by default. The benefit of semantic retrieval still awaits a real-provider run, so no recall improvement is claimed.
HuanLinOTO/dsh-plugin-mineru★ 46
Expose MineRU document parsing tools to the model.
kw78/dsh-office-tools★ 31
Workspace-safe Office tools for agents: create/read Word, create/read/update Excel, and create/read PowerPoint decks with PNG/JPG/GIF image placement.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.