Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

doc-holmes

БесплатноЗапускает вложенные скриптыНе проверен

Layout-preserving precise translation for large PDFs. Keeps formulas, figures, tables, TOC and annotations intact; outputs a bilingual side-by-side PDF plus a…

docsor1212от docsor12121 351 установка в других каталогах

Об этом скилле

doc-holmes

Precise translation of foreign-language PDFs with the original layout preserved — formulas, figures, tables, TOC and footnotes stay intact. Output: a bilingual side-by-side PDF plus a pure-translation PDF.

When to use

  • The user hands you a foreign-language PDF (paper / guideline / report) and wants it translated without wrecking the layout.
  • Phrases like: PDF translation, translate this paper, full-text translation, bilingual PDF, keep the original layout, formulas intact, document translation, oversized PDFs, batch PDF translation.
  • The user complains that other tools "destroyed all formulas / lost figures / scrambled two-column text".

Responsible use

Translations are AI-assisted. Have a human review before any formal use (submission, clinical, legal), and follow the AI-content labeling rules that apply to your venue. Tier-C (scanned) outputs additionally carry a preview-quality notice and must not be used formally.

Quick start

# 0) Pre-flight triage (zero dependencies, works before the engine is installed)
doc_holmes_cli.py triage paper.pdf --json          # tier A/B/C grading - know what you can promise
doc_holmes_cli.py estimate big.pdf                 # pages/chars/partition/time estimate (no endpoint)
python3 scripts/doc_holmes_cli.py merge a.pdf b.pdf -o merged.pdf   # merge translated parts back into one
doc_holmes_cli.py split doc.pdf --pages 1-25,26-50  # split for partitioned translation

doc_holmes_cli.py setup --base-url <endpoint> --api-key <key>   # one-command config + connectivity check (never installs packages)
doc_holmes_cli.py selfcheck                        # after engine install: env check (engine/OCR/GPU/endpoint)

# 1) Translate one file: outputs bilingual + pure-translation PDFs (into _translated/ next to input)
python3 scripts/doc_holmes_cli.py translate paper.pdf

# 2) Batch-translate a directory (resume + audit + summary report)
python3 scripts/doc_holmes_cli.py batch ~/pdfs -o ~/translated

First-time setup (no endpoint or key is bundled - you bring your own):

uv tool install --python 3.12 pdf2zh-next    # or: pip install pdf2zh-next
export DOC_HOLMES_OPENAI_BASE_URL=https://open.bigmodel.cn/api/paas/v4   # official Zhipu open platform; glm-4.5-flash tier is free
export DOC_HOLMES_OPENAI_API_KEY=<your key>                              # created by you on that platform

SiliconFlow (https://api.siliconflow.cn/v1) or any OpenAI-compatible endpoint works the same way.

⚠️ About GLM Coding Plan subscription endpoints (/api/coding/paas/v4): per the official FAQ, the plan only covers designated coding tools. Calls from other tools do NOT consume the plan quota - they are billed per-token against your account balance, and accounts shared across multiple people may face subscription restrictions. If you still want to connect your subscription, set DOC_HOLMES_ALLOW_CODING_ENDPOINT=1 (one-time confirmation).

The triage system (runs automatically before translating)

Tier Meaning Translation promise
A Clean born-digital: dense text layer (≥500 chars/page), no duplicate layers, no artifacts High fidelity — formulas/figures/TOC preserved, safe to use. Oversized PDFs (≥40 pages) are auto-partitioned (25 pages/part) and skip glossary extraction automatically. A bundled medical EN→ZH glossary of core terms is injected for consistent terminology (disable with --no-medical-glossary)
B Has a text layer but noisy: duplicated layers / watermarks / artifact tokens Translatable; span-level duplicate-layer detection (exact counts in audit) + noise report. Redaction surgery is deliberately NOT applied (overlapping glyphs make it destructive)
C Scanned / no usable text layer / encrypted Experimental (preview quality): OCR rebuilds a line-repaired invisible text layer, then an LLM proofreading pass (your configured endpoint) fixes recognition errors before translation; output carries a "preview quality" notice page — not for submission or clinical use

triage can run standalone (no translation), supports directories and --json; grading rules: references/triage.md.

Terminology consistency & page-level quality hotspots (v2.10.0)

en→zh translation injects a bundled medical glossary of core terms by default (--no-medical-glossary to disable). On top of that there is adaptive term seeding (experimental, off by default, enable with --seed-terms): high-frequency domain terms are extracted from the source document (up to 12), translated via one small request to your configured endpoint, merged with the built-in table and passed to the engine — improving term consistency across the document. Terms already covered by the built-in table are skipped; terms whose translation comes back empty or missing are never written into the glossary (empty-target rows are a known engine crasher). Seeding failures are recorded in the audit a

Полный SKILL.md на ClawHub

Установить doc-holmes в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл doc-holmes?

Layout-preserving precise translation for large PDFs. Keeps formulas, figures, tables, TOC and annotations intact; outputs a bilingual side-by-side PDF plus a pure-translation PDF. Tier-A documents also support a zero-dependency direct mode (extract, translate, apply - no engine, no API key) and one-command setup. Every file is triaged first into tier A (clean born-digital, high fidelity), tier B (noisy text layer, translated with a noise report), tier C (scanned/image-on ly, experimental OCR channel marked preview quality). Runs the BabelDOC engine (pdf2zh-next) as a subprocess on any OpenAI-compatible endpoint you configure (bring your own key; none bundled ). Batch mode ships resume, per-file timeout, audit log and rollback. Triggers include PDF tran slation, PDF to Chinese, translate paper, bilingual PDF, side-by-side translation, keep origina l layout, layout preserved, formula preservation, scanned PDF translation, medical literature t ranslation, batch PDF translate.

Как установить скилл doc-holmes?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл doc-holmes запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить doc-holmes с