为 DeepSeek Harness 提供的 LaTeX 与 BibTeX 检查工具:编译检查(自动识别 xelatex/lualatex),基于 Crossref 的 BibTeX 条目去重与字段补全,以及 \cite 键与 .bib 文件的一致性审计。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-latex-guard
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Flan246/dsh-latex-guard
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 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
链接
同类插件
tt-a1i/archify#integrations/deepseek-harness★ 84099
从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。
dream-num/dsh-univer-office★ 543
为 DeepSeek Harness 打造一个真正的办公环境。Univer Office 插件将电子表格、文档、幻灯片、画布、多维表格等汇聚到同一个运行时——数据互联、修改经过校验、变更按版本管理,并以隔离工作树支持多 Agent 协作。
PerryLink/dsh-industry-research★ 211
面向 DeepSeek Harness 的确定性行业研究报告:公司与行业研究流程基于分阶段证据产出结构化、可核验的报告。
PolinniZhong/dsh-knit★ 54
把会话工作区里已有的 Markdown 文档、源码、图片与视频列进 DSH 侧边栏,按与当前对话的相关性排序。默认的词法模式用最近几条消息在本地与标题、摘要、正文做带 IDF 加权的匹配(BM25)—— 不调用模型、没有网络出口,内容不出本机。列表来自工作区扫描,而不是「最近打开记录」,所以重启 DSH 或新开会话都不会变空。排序结果组织成主要 / 辅助 / 相关三层的阅读顺序,每一条都写明可核验的理由(命中了哪个字段、被哪一篇引用),点一行即可就地预览:Markdown 按渲染后的样子显示、相对路径图片真实渲染、源码走宿主自带的语法高亮、视频走 HTTP Range 流式播放。同一份 Context Pack 也作为 knit_docs 工具交给 agent。后续版本陆续补上读取证据与生命周期(归因在读那一刻冻结)、固定 / 排除(排除先于检索生效,且可恢复)、关系证据(引用 / 导入 / 测试,带行号)与增量索引(重启后复用)。v0.23 起还多一条可选的混合检索:默认关闭,只有你自己配好 Ollama 或 OpenAI 兼容的 embedding 服务才会生效。它生效时,发出去的是你这句查询原话加上每篇候选文件的标题与摘要 —— Markdown 的摘要取自正文首段(不超过 60 字),代码的摘要是它所在的工作区相对目录,图片 / 视频贡献的是文件名;完整正文与绝对路径都不发送,指向本机服务(loopback)时内容不出这台机器。v0.24 起还能做变更关联:用一条只读的 git status(固定 argv、不走 shell、子进程环境白名单),配合同一套引用 / 导入 / 测试 / 提及证据,指出这次改动大概率该一起看哪些文件 —— 默认关闭。语义检索的收益仍待真 provider 实测,因此不承诺召回提升。
HuanLinOTO/dsh-plugin-mineru★ 46
向模型暴露 MineRU 文档解析工具。
kw78/dsh-office-tools★ 31
面向 agent 的工作区安全 Office 工具集:创建/读取 Word、创建/读取/更新 Excel、创建/读取 PowerPoint,并支持 PNG/JPG/GIF 图片排版。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。