subtitle-translate

subtitle-translate is a skill for Claude Code, Codex from ZJU-REAL/Easel. It costs 168 tokens per session (1,547 once invoked), scanned A, original, Apache-2.0.

A subtitle translation tool for existing SRT, VTT, or ASS files. It can create translated or bilingual subtitles and optionally attach them to a video or burn them into the picture.

In plain words
What is it for?
Translate subtitles into another language, produce bilingual captions, or add the translated subtitles to a video.
Why use it?
It removes the need to translate subtitle lines manually while preserving their timing and file format.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python skills/shared/scripts/subtitle_ops.py extract -i <字幕> -o /tmp/st_lines.txt.

Good fit Translate subtitles into another language, produce bilingual captions, or add the translated subtitles to a video.

Compare 6 skills from other repositories ↓
About the project

Easel is an open-source content workspace and AI agent for managing social media from trend discovery through planning, content creation, publishing, and performance analysis. It is intended for social media creators and maintains separate account profiles, content projects, platform adaptations, and publishing records. The catalogue skills support these content and publishing workflows.

ZJU-REAL/Easel · 4,138 stars · on GitHub · zju-real.github.io

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ZJU-REAL/Easel
agentmods
npx agentmods add skills/zju-real/easel/subtitle-translate

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for subtitle-translate

README.md
[![agentmods](https://agentmods.dev/badge/skills/zju-real/easel/subtitle-translate/github.svg)](https://agentmods.dev/skills/zju-real/easel/subtitle-translate)
Your own site
<a href="https://agentmods.dev/skills/zju-real/easel/subtitle-translate"><img src="https://agentmods.dev/badge/skills/zju-real/easel/subtitle-translate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for subtitle-translate

Your own site · 80×15
<a href="https://agentmods.dev/skills/zju-real/easel/subtitle-translate"><img src="https://agentmods.dev/badge/skills/zju-real/easel/subtitle-translate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00168 $0.01547
Opus 5.5 $0.00067 $0.00619
Sonnet 5.5 $0.00034 $0.00309
Haiku 4.5 $0.00017 $0.00155

Measured 1mo ago against content hash 9e19d8a44da3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

subtitle-translate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/builtin/subtitle-translate/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

字幕翻译 / 双语字幕

把已有字幕翻译成目标语言,产出双语(原文+译文)或纯译文字幕,可选烧录进视频。 翻译交给 LLM(你自己),确定性部分(解析/合并/格式/时间轴/烧录)全交给 skills/shared/scripts/subtitle_ops.py。不要手拼 ffmpeg,也不要手改时间轴。

只做"已有字幕 → 翻译/双语/烧录"。语音识别生成字幕见 auto-subtitle; 通用视频剪辑见 video-editing。

输入

字段 必填 说明
字幕文件 是 .srt / .vtt / .ass 路径(没给就问)
目标语言 是 译成什么语言(如中文 / English / 日本語)
输出形态 否 双语(默认)/ 纯译文
原译顺序 否 双语时原文在上(默认)或译文在上
视频文件 否 给了则可烧录;软挂载(可开关)或硬烧录(烧进画面)

输出(outputs/主题名/)

  • 双语 / 纯译文字幕文件(.srt 或 .ass)
  • 若烧录:带字幕的视频(*-sub.mp4)
  • 报告:条数、目标语言、形态、输出路径

执行步骤

脚本路径(相对项目根):skills/shared/scripts/subtitle_ops.py(每个子命令支持 -h)。

1. 提取待译文本

python skills/shared/scripts/subtitle_ops.py extract -i <字幕> -o /tmp/st_lines.txt

每条字幕一行、行号与顺序固定。记住总行数 N。

2. 逐行翻译(你来做)

读 /tmp/st_lines.txt,逐行翻译成目标语言,写入 /tmp/st_trans.txt:

  • 行数必须严格等于 N,顺序一一对应,不增删空行、不合并、不拆行(脚本会校验,不一致直接报错)。
  • 一行内如原文有多句,整合成一行译文,不要拆成多行。
  • 语气/术语按内容领域走;口语内容译得自然口语,书面内容译得书面。
  • 空行原文对应空行译文(保持占位)。

3. 合并成双语 / 纯译文字幕

# 双语 SRT(原文在上,译文在下)
python skills/shared/scripts/subtitle_ops.py merge -i <字幕> --trans /tmp/st_trans.txt \
  -o outputs/主题名/<名>-bilingual.srt

# 双语 ASS(原文白色较大 / 译文黄色略小,样式更佳,推荐用于硬烧录)
python skills/shared/scripts/subtitle_ops.py merge -i <字幕> --trans /tmp/st_trans.txt \
  -o outputs/主题名/<名>-bilingual.ass --format ass

# 纯译文(不保留原文)
python skills/shared/scripts/subtitle_ops.py merge -i <字幕> --trans /tmp/st_trans.txt \
  -o outputs/主题名/<名>-<lang>.srt --trans-only

--order trans-top 可让译文在上。

4.(可选)烧录进视频

# 硬烧录(烧进画面,推荐用 .ass 保留双语样式)
python skills/shared/scripts/subtitle_ops.py burn -i <视频> \
  --sub outputs/主题名/<名>-bilingual.ass \
  -o outputs/主题名/<名>-sub.mp4

# 软挂载(可在播放器开关,不改画面;mp4→mov_text,mkv→srt)
python skills/shared/scripts/subtitle_ops.py burn -i <视频> \
  --sub outputs/主题名/<名>-bilingual.srt \
  -o outputs/主题名/<名>-sub.mp4 --soft

其它子命令

  • parse -i <字幕> [-o out.json] — 解析成 JSON(含时间轴),供程序化处理或核对。
  • build --json <cues.json> -o <字幕> — 从 JSON(cue 带 text 与可选 trans)构建,适合批量/整段翻译回填。
  • convert -i a.srt -o b.vtt — 格式互转(srt ↔ vtt ↔ ass)。

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 97 lines · 168 tokens per session scan A 9e19d8a44da3

Subscribe to this mod's changes

subtitle-translate is a skill published in the GitHub repository ZJU-REAL/Easel (4,138 stars, last pushed 3d ago), licensed Apache-2.0. It adds 168 tokens to every session and 1,547 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

text-tools

Text processing toolkit: translate, rewrite, regex, encoding/decoding, and formatting.

fuyuxiang/echo-agent · 21 tokens

humanizer-zh-next

A Chinese-language editing skill that rewrites text to sound more natural and less like it was generated by artificial intelligence.

Hyacehila/humanizer-zh-next · 102 tokens

video-translate

Translate and dub existing videos into multiple languages using HeyGen. Use when: (1) Translating a video into another language, (2) Dubbing video content with lip-sync, (3) Creating multi-language versions of existing videos, (4) Audio-only translation without lip-sync, (5) Working with HeyGen's /v2/videotranslate…

calesthio/OpenMontage · 77 tokens

iflytek-translate

A text-translation tool that uses iFlytek's machine-translation service and supports more than 70 language pairs. It can translate text supplied directly, through standard input, or from a file.

iflytek/iFly-Skills · 65 tokens

yida-i18n

A tool for managing the languages and translated text in YiDA applications, including which languages are enabled and the wording shown on pages.

openyida/openyida · 87 tokens

bmad-spec

Condense any input — an idea, brief, PRD, transcript, or mixed notes — into a short spec: one kernel file plus supporting files that downstream skills build from. Also updates and validates existing specs. Use when the user says "create a spec", "distill this into a spec", "validate this spec", or "update the spec".

alvin-reyes/better-agentic-ide · 76 tokens