epub-translate
Skill12 starsChanged 9 months agoMITView on GitHub
Translate EPUB (.epub) ebooks to another language by unpacking the EPUB container, extracting XHTML block-level fragments into JSONL translation units, translating them via the OpenAI Responses API (e.g. gpt-5.1 / gpt-5-mini) while preserving markup, updating language metadata, and repackaging a valid EPUB (mimetype-first and uncompressed). Use when Codex needs to translate and rebuild EPUB files.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- fcy3859/skillstheir own version, first seen Oct 9, 2026
- ai3027/skillstheir own version, first seen Jul 27, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- ai3027/skills★ 1same name
- fcy3859/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository81 other files it gives its agents.
- ab-test-setupSkill
- agent-browserSkill
- analytics-trackingSkill
- brainstormingSkill
- browser-useSkill
- c4-architectureSkill
- code-reconSkill
- competitor-alternativesSkill
- copy-editingSkill
- copywritingSkill
- crafting-effective-readmesSkill
- dflowSkill
- drift-protocolSkill
- email-sequenceSkill
- enterprise-readinessSkill
- example-skillSkill
- form-croSkill
- free-tool-strategySkill
- git-workflowSkill
- heliusSkill
- hugging-face-cliSkill
- hugging-face-tool-builderSkill
- hugging-face-evaluationSkill
- hugging-face-paper-publisherSkill
- kaminoSkill
- launch-strategySkill
- magicblockSkill
- marketing-ideasSkill
- marketing-psychologySkill
- mermaid-diagramsSkill
- meteoraSkill
- hugging-face-model-trainerSkill
- n8n-code-javascriptSkill
- n8n-code-pythonSkill
- n8n-expression-syntaxSkill
- n8n-mcp-tools-expertSkill
- n8n-node-configurationSkill
- n8n-validation-expertSkill
- n8n-workflow-patternsSkill
- obsidian-vault-managerSkill
- onboarding-croSkill
- openai-knowledgeSkill
- page-croSkill
- paid-adsSkill
- paywall-upgrade-croSkill
- pinocchio-developmentSkill
- popup-croSkill
- pricing-strategySkill
- programmatic-seoSkill
- raydiumSkill
- referral-programSkill
- remotion-best-practicesSkill
- schema-markupSkill
- seo-auditSkill
- signup-flow-croSkill
- skill-boilerplateSkill
- social-contentSkill
- solana-agent-kitSkill
- solana-kit-migrationSkill
- solana-kitSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Do not change any tags, nesting, attribute names, attribute values, URLs, IDs, or filenames.
- Very specific: line 48
Keep entities/character references as-is (e.g.
- Distinctive: line 49
If a fragment contains non-translatable text (code, formulas, URLs), leave it unchanged.
- Very specific: line 53
Keep config and registries in .skills-data/<skill-name>/ (for example: config.json, <feature>.json).
- Very specific: line 54
Use .skills-data/<skill-name>/.env for SKILL_ROOT, SKILL_DATA_DIR, and any per-skill env keys.
- Very specific: line 61
Write logs/cache/tmp under .skills-data/<skill-name>/logs, .skills-data/<skill-name>/cache, .skills-data/<skill-name>/tmp.
- Very specific: line 62
Keep automation in <skill-root>/scripts and read SKILL_DATA_DIR (default to <project_root>/.skills-data/<skill-name>/).
- Distinctive: line 63
Do not write outside <skill-root> and <project_root>/.skills-data/<skill-name>/ unless the user requests it.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
EPUB Translate
Workflow
- One-time setup (writes
.skills-data/epub-translate/.env):scripts/epub-translate setup - Extract translation units:
scripts/epub-translate extract --epub /path/book.epub - Translate via OpenAI API:
scripts/epub-translate translate --job-dir <job-dir> --target-lang <bcp47> [--fraction 0.1] - Apply + repack:
scripts/epub-translate apply --job-dir <job-dir> --translations <job-dir>/translations.jsonl --target-lang <bcp47> --out-epub /path/book.<bcp47>.epub - Optional: validate output:
scripts/epub-translate validate --epub /path/book.<bcp47>.epub
Commands
scripts/epub-translate setup:- Prompts for
OPENAI_API_KEY(saved to.skills-data/epub-translate/.env). - Prompts for default
OPENAI_MODEL(e.g.gpt-5.1,gpt-5-mini).
- Prompts for
scripts/epub-translate extract ...:- Unzips the EPUB into a per-run job dir under
.skills-data/epub-translate/tmp/. - Parses
META-INF/container.xml→ package document (.opf) → manifest/spine. - Extracts XHTML
<head><title>and leaf block-level XHTML fragments (inner HTML) in reading order intounits.jsonl. - Optional: include OPF
dc:titlevia--include-opf-title.
- Unzips the EPUB into a per-run job dir under
scripts/epub-translate translate ...:- Reads
<job-dir>/units.jsonland writes<job-dir>/translations.jsonl. - Uses the OpenAI Responses API (
https://api.openai.com/v1/responses). - Resume-safe by default: if
translations.jsonlalready contains some ids, they are skipped.
- Reads
scripts/epub-translate apply ...:- Applies translated fragments back into the unpacked XHTML files.
- Updates
dc:languagein the OPF andxml:langin the XHTML. - Repackages as a valid EPUB (writes
mimetypefirst, stored/uncompressed).
scripts/epub-translate validate ...: checks basic EPUB container invariants.
JSONL formats
units.jsonl (input to translation) has one JSON object per line, e.g.:
{"id":1,"kind":"xhtml-fragment","doc_path":"EPUB/chapter1.xhtml","xpath":"/html[1]/body[1]/p[3]","tag":"p","source_inner_html":"Hello <em>world</em>!","source_markup_hash":"..."}translations.jsonl (output from translation) must contain:
{"id":1,"translated_inner_html":"Hola <em>mundo</em>!"}Translation rules (markup-safe)
- Translate only human-readable text, not markup.
- Do not change any tags, nesting, attribute names, attribute values, URLs, IDs, or filenames.
- Keep entities/character references as-is (e.g.
&, ). - If a fragment contains non-translatable text (code, formulas, URLs), leave it unchanged.
Local data and env
- Store all mutable state under <project_root>/.skills-data/
<skill-name>/. - Keep config and registries in .skills-data/
<skill-name>/ (for example: config.json,<feature>.json). - Use .skills-data/
<skill-name>/.env for SKILL_ROOT, SKILL_DATA_DIR, and any per-skill env keys. - Install local tools into .skills-data/
<skill-name>/bin and prepend it to PATH when needed. - Install dependencies under .skills-data/
<skill-name>/venv:- Python: .skills-data/
<skill-name>/venv/python - Node: .skills-data/
<skill-name>/venv/node_modules - Go: .skills-data/
<skill-name>/venv/go (modcache, gocache) - PHP: .skills-data/
<skill-name>/venv/php (cache, vendor)
- Python: .skills-data/
- Write logs/cache/tmp under .skills-data/
<skill-name>/logs, .skills-data/<skill-name>/cache, .skills-data/<skill-name>/tmp. - Keep automation in
<skill-root>/scripts and read SKILL_DATA_DIR (default to <project_root>/.skills-data/<skill-name>/). - Do not write outside
<skill-root>and <project_root>/.skills-data/<skill-name>/ unless the user requests it.
OpenAI config keys
Stored in .skills-data/epub-translate/.env (created by scripts/epub-translate setup):
OPENAI_API_KEYOPENAI_MODEL(default:gpt-5-mini; change viasetup --model ..., editing.env, ortranslate --model ...)OPENAI_BASE_URL(default:https://api.openai.com/v1)OPENAI_REASONING_EFFORT(default:low; change viasetup --reasoning-effort ...or editing.env)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

