pdf-translator
SKILL.md
PDF Translator Skill
Instructions
Follow these steps to translate a PDF file:
- Identify the PDF File: Confirm the path to the PDF file the user wants to translate. If the path is relative, resolve it to an absolute path.
- Extract Text: Use the
extract_text.pyscript located in thescriptsdirectory of this skill to extract text from the PDF.- Command:
python3 skills/pdf-translator/scripts/extract_text.py <path_to_pdf> - Note: Ensure you are using the correct python environment (e.g.,
.venv/bin/pythonif applicable, or justpython3if dependencies are installed globally).
- Command:
- Translate Content:
- Read the output from the extraction step.
- Translate the extracted text into the target language requested by the user (default to the user's primary language or English if ambiguous).
- Maintain the original structure (headings, paragraphs) as much as possible using Markdown formatting.
- Save Output:
- Write the translated content to a temporary text file (e.g.,
temp_translation.txt). - Use the
generate_md.pyscript to create the final Markdown file with metadata. - Command:
python3 skills/pdf-translator/scripts/generate_md.py <output_path> <original_filename> <temp_translation_file> - Filename format:
<original_filename>_translated.md. - Notify the user of the output file location.
- Clean up the temporary text file.
- Write the translated content to a temporary text file (e.g.,
Examples
User: "Translate the file papers/deep_learning.pdf to Chinese."
Claude:
- Locates
papers/deep_learning.pdf. - Runs:
python3 skills/pdf-translator/scripts/extract_text.py papers/deep_learning.pdf - Translates the extracted text to Chinese.
- Writes translation to
temp_translation.txt. - Runs:
python3 skills/pdf-translator/scripts/generate_md.py papers/deep_learning_translated.md deep_learning.pdf temp_translation.txt - Removes
temp_translation.txt. - Responds: "I have translated the PDF and saved it to
papers/deep_learning_translated.md."
User: "Help me read this manual.pdf"
Claude:
- Locates
manual.pdf. - Runs extraction script.
- Translates/Summarizes based on user intent.
Weekly Installs
28
Repository
forceinjection/…rmentalsGitHub Stars
924
First Seen
Jan 29, 2026
Security Audits
Installed on
opencode28
github-copilot28
codex27
kimi-cli27
gemini-cli27
amp27