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.
git clone --depth 1 https://github.com/ZJU-REAL/Easelnpx agentmods add skills/zju-real/easel/subtitle-translateWrote 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.
[](https://agentmods.dev/skills/zju-real/easel/subtitle-translate)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00168 | $0.01547 |
| Opus 5 | $0.00084 | $0.00773 |
| Sonnet 5 | $0.00034 | $0.00309 |
| Haiku 4.5 | $0.00017 | $0.00155 |
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 7d 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.
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)。
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.
- 7d ago First seen · 97 lines · 168 tokens per session scan A 9e19d8a44da3
subtitle-translate is a skill published in the GitHub repository ZJU-REAL/Easel (710 stars, last pushed yesterday), licensed Apache-2.0. It adds 168 tokens to every session and 1,547 once invoked, about $0.0008 per session on Opus 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.
Other skills, from other repositories
advanced-dubbing-studio
A service for sending audio or video to be dubbed into another language, checking the job's progress, and downloading the finished dubbed audio.
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…
iflytek-video-translate
A tool that translates a video’s speech into another language and creates dubbed audio. Video localization means adapting video content for viewers who speak a different language.
ppt-generation
Generate PPTX presentations from slide plan + content.
subtitle-craft
Create, translate, repair, and burn subtitles through the Subtitle Craft plugin.
chart-visualization
Generate charts: select type, extract data, render image.