Логотип Pdf Translate

Pdf Translate

Сообщество
L27z18328742
pdf-translate

Translate English PDF documents (especially academic papers) into Chinese using PDFMathTranslate-next (pdf2zh), producing a monolingual Chinese PDF and a bilingual side-by-side PDF with formulas, figures, and layout preserved. Automatically installs the pdf2zh_next environment via uv and reuses the model/API the user already configured in Codex or Claude Code (any OpenAI-compatible gateway), falling back to the free SiliconFlow service when no key is present. Use this skill whenever the user wants to translate a PDF to Chinese (or another language), translate a paper/论文, produce a bilingual PDF, or mentions pdf2zh / PDFMathTranslate — even if they don't name the tool explicitly. Proactively invoke this skill (do not translate manually) whenever a PDF translation task appears.

Обзор

ИздательL27z18328742
Репозиторийpdf-translate
Название навыкаpdf-translate
Звёзды
73
Форки
6
Файлы в комплекте
4
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 4

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — L27z18328742. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Pdf Translate в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/L27z18328742/pdf-translate/tree/main
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/L27z18328742/pdf-translate.git \
  .claude/skills/pdf-translate
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Pdf Translate в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Pdf Translate, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Pdf Translate не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

PDF Translate (English → Chinese)

This skill translates PDF documents using PDFMathTranslate-next (pdf2zh_next), the BabelDOC-based translator that preserves formulas, charts, table of contents, and page layout. It produces two files per input:

  • *-mono.pdf — monolingual translated PDF (Chinese only)
  • *-dual.pdf — bilingual PDF (original + translation, side by side or alternating)

Why this skill exists

Translating an academic PDF well requires preserving math, figures, and layout — something plain LLM translation can't do. pdf2zh_next handles that, but it has a non-trivial install (Python 3.12, model assets) and many engine options. This skill automates the environment setup and picks a translation engine that reuses credentials the user already has, so translation "just works" without manual configuration.

Workflow

Run the setup script first (installs pdf2zh_next if missing, verifies it), then the translate script (detects the best engine and runs the translation). Both scripts are idempotent.

Subsequent runs are fast. Once pdf2zh_next is installed and the model assets are downloaded (after the first successful translation), setup.sh becomes a silent sub-second no-op — it detects the install and the ~/.cache/babeldoc/models cache and returns immediately without spawning a Python import or re-downloading anything. Re-running it on every invocation is cheap and safe; you do not need to track whether setup has happened before.

Step 1 — Ensure the environment is ready

bash
bash ~/.claude/skills/pdf-translate/scripts/setup.sh

This installs pdf2zh_next via uv tool install --python 3.12 pdf2zh-next (the project requires Python ≥3.10,<3.14; 3.12 is the documented recommendation) and confirms it is on PATH. It is fast and safe to re-run. The first real translation downloads layout/translation model assets (DocLayout-YOLO + fonts, ~hundreds of MB) into ~/.cache/babeldoc/ — tell the user the first run is slow because of this one-time download. The setup and translate scripts detect this cache and skip the "slow first run" messaging once the models are present.

Step 2 — Translate

bash
bash ~/.claude/skills/pdf-translate/scripts/translate.sh "<input.pdf>" [options]

The script auto-detects a translation engine:

  1. ClaudeCode (default when claude CLI is available) — detects if the user is running from Claude Code by checking for the claude CLI on PATH. Uses the exact model Claude Code is configured to use (resolved via ANTHROPIC_DEFAULT_SONNET_MODEL, etc.). This is the default when working in Claude Code, so the translation uses the same model ecosystem the user is already in. Note: it spawns one claude -p subprocess per text segment, so it is slower than the OpenAI engine.
  2. OpenAI-compatible (fallback when API key exists) — used when claude CLI is not found but OPENAI_API_KEY is set. Reuses the model configured for Codex: reads base_url + model from ~/.codex/config.toml and the API key from OPENAI_API_KEY. Fast (HTTP, high concurrency), ideal for full papers.
  3. SiliconFlowFree (zero-config fallback) — used when neither claude CLI nor API key is detectable. The project's free GLM-4-9B service; needs no key. Note: file content is forwarded through the project maintainer's server.

Override detection with flags: --engine openai|siliconflowfree|claudecode, --model <name>, --base-url <url>, --api-key <key>.

Common options:

  • --output <dir> — output directory (default: an output/ folder next to the input PDF)
  • --pages "1-5,8" — translate only some pages
  • --lang-in en --lang-out zh-CN — language codes (defaults: en → zh-CN)
  • --qps N --pool-max-workers N — concurrency tuning (see references/advanced.md)
  • --no-dual / --no-mono — suppress one of the two outputs
  • Pass any other pdf2zh_next flag through with -- <flag> <value>

Step 3 — Report results

After the script finishes, it prints the paths of the generated *-mono.pdf and *-dual.pdf. Tell the user where these files are (relative to the input), open/preview them if asked, and note the engine + model that was used. If the user wants different quality or speed, suggest overrides (see references/advanced.md).

Default behavior choices (and how to change them)

  • Source/target language: English → Simplified Chinese (en → zh-CN). Override with --lang-in / --lang-out. Full language code list is in references/advanced.md.
  • Engine: ClaudeCode when claude CLI is on PATH (default in Claude Code), else OpenAI-compatible when a key is found, else SiliconFlowFree. Use --engine openai to force the OpenAI engine even from Claude Code. The claudecode engine reuses Claude Code's configured model; the OpenAI engine reuses the model named in ~/.codex/config.toml.
  • Model: for the openai engine, the model from ~/.codex/config.toml; for claudecode, sonnet (resolved by Claude Code to the user's configured model). Reasoning models (e.g. gpt-5.5, glm-5.2) work but are slower and use more tokens; for large papers consider a lighter chat model via --model.
  • Concurrency: modest defaults (--qps 10 --pool-max-workers 30 for the OpenAI engine; --qps 4 --pool-max-workers 8 for claudecode since each segment is a subprocess). Increase for faster translation if the gateway allows it.

When something goes wrong

  • command not found: pdf2zh_next after install — the uv tool bin dir isn't on PATH. The scripts add ~/.local/bin to PATH themselves, but if the user runs pdf2zh_next directly in their own shell, they need export PATH="$HOME/.local/bin:$PATH" (Linux/macOS).
  • First translation hangs on "loading assets" / downloading — normal one-time model download. Wait it out.
  • 429 / rate-limit errors — lower --qps and --pool-max-workers.
  • Gateway returns errors for the OpenAI engine — the detected base_url may only expose the responses API, not chat-completions. Run with --engine siliconflowfree to bypass, or point --base-url at a chat-completions endpoint.
  • Out-of-memory / very large PDFs — use --pages to translate in chunks, or --max-pages-per-part 50.

For the full option reference, engine configuration details, translating to other languages, glossaries, and offline/air-gapped usage, read references/advanced.md.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Pdf Translate?

Translate English PDF documents (especially academic papers) into Chinese using PDFMathTranslate-next (pdf2zh), producing a monolingual Chinese PDF and a bilingual side-by-side PDF with formulas, figures, and layout preserved. Automatically installs the pdf2zh_next environment via uv and reuses the model/API the user already configured in Codex or Claude Code (any OpenAI-compatible gateway), falling back to the free SiliconFlow service when no key is present. Use this skill whenever the user wants to translate a PDF to Chinese (or another language), translate a paper/论文, produce a bilingual...

Зачем использовать Pdf Translate в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Pdf Translate — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Pdf Translate в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/L27z18328742/pdf-translate/tree/main. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Pdf Translate?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Pdf Translate?

С любым количеством. В TypingMind вы можете использовать Pdf Translate с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Pdf Translate?

Навык опубликован на GitHub. Издатель — L27z18328742. Условия лицензии можно найти в репозитории. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип openai

Openai Docs

openai
ОрганизацияПопулярный

Используйте этот навык для вопросов о моделях и ценах Codex, запланированных задачах, навыках, настройках, установке, устранении неполадок, персонализации, автоматизации и сведениях о самом Codex, включая вопросы со словами «вы», «ваш» и «это приложение», если…

19.9K
127.4K
Файлы: 15
Открыть
Логотип JuliusBrussee

Caveman Explore

JuliusBrussee
СообществоПопулярный

Проводник репозитория с доступом только для чтения — для первичного ознакомления, широкого поиска по файлам или случаев, когда обычный поиск не дал результата. Не используйте, если точный файл или символ уже указан. Возвращает только ссылки в формате путь:строка…

6.2K
106.3K
Файлы: 2
Открыть
Логотип paperclipai

Delegate Work

paperclipai
ОрганизацияПопулярный

Delegate user-requested work to an existing Paperclip agent, with a durable task reference and clear execution expectations.

16.9K
100.4K
Инструкции
Открыть
Логотип nexu-io

Html Ppt Zhangzara Vellum

nexu-io
ОрганизацияПопулярный

A humanities lecture: how Renaissance linear perspective reshaped early cartography — sources, argument, and evidence. Built as a decision-grade academic research deck for faculty, graduate seminar.

11.5K
98.9K
Файлы: 2
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇