Agent skill

Subtitle Translator

by MaKTaiL in MaKTaiL/gemini-srt-translator

Translates SRT and ASS subtitle files, or subtitles embedded in video, into another language using the gst agent CLI and the assistant's own translation.

MITAuto-check passedMedia & Creative

Install Subtitle Translator

skills CLI
$ npx skills add MaKTaiL/gemini-srt-translator --skill subtitle-translator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MaKTaiL/gemini-srt-translator subtitle-translator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MaKTaiL/gemini-srt-translator.git skills-src && mkdir -p .claude/skills && cp -r skills-src/gemini_srt_translator .claude/skills/subtitle-translator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
subtitle-translator
GitHub stars
357
Token cost
~1.4k tokens
SKILL.md length
591 words
Files
12
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Translates SRT and ASS subtitle files, or subtitles embedded in video, into another language using the gst agent CLI and the assistant's own translation.

  • Works in 4 steps: Start a Translation Session → Translate In-Context & Commit Translated… → Repeat Until Complete → …
  • Translating an .srt or .ass subtitle file into another language
  • SKILL.md covers 🎯 Role & Agent Protocol…, When to Use, Subtitle Translation Protocol and Translation Rules
  • Runs Python scripts from its folder; calls uv and poetry

What it does

The agent itself performs the translation inside its own context, and no API key is needed because the `gst agent` protocol runs locally. It opens a session with `gst agent start`, given an input file (.srt, .ass, or a video such as .mp4 or .mkv whose embedded subtitles are extracted automatically) and a target language, then works through the subtitle lines batch by batch.

Options set the batch size (100 lines by default), how many preceding lines go into the context fields, a custom output path, a description with background notes such as a series name or character tone, and whether to resume earlier progress. Context-aware translation keeps tone and gender agreement consistent across multi-part dialogue. If gst is not on the path, the skill points to the project's virtual environment or to uv run and poetry run. External translation scripts are not to be used.

When your agent uses it

  • Translating an .srt or .ass subtitle file into another language
  • Translating subtitles embedded in an .mp4 or .mkv video
  • Keeping character tone and gender agreement consistent across dialogue
  • Resuming an interrupted subtitle translation

Example prompts

  • “Translate movie.srt into French.”
  • “The subtitles in lecture.mkv need to be in Spanish, and it is a university physics lecture.”
  • “Translate episodes/finale.ass into German, noting that the main character speaks formally.”
  • “Restart the translation of movie.srt from scratch instead of resuming.”

Requirements

  • The gst command-line tool, installed globally or in a project virtual environment

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Start a Translation Session
  2. Translate In-Context & Commit Translated Batch
  3. Repeat Until Complete
  4. Cleanup Temporary Files

What it can do on your machine

Read from SKILL.md and the folder at commit f61bbfb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • poetry

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Subtitle Translator loads about 1.4k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 591 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MaKTaiL/gemini-srt-translator at commit f61bbfb, republished under its MIT licence (© MaKTaiL). 591 words, ~1,371 tokens.

Download SKILL.mdSave it as .claude/skills/subtitle-translator/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
subtitle-translator
description
Translate subtitle files (SRT, ASS) and video/media with embedded subtitles into any target language with high linguistic quality, sliding context window, timestamp alignment, and formatting preservation. Use when the user asks to translate a subtitle file (.srt, .ass) or video subtitles.

Subtitle Translator Skill

🎯 Role & Agent Protocol (CRITICAL)

When this skill is invoked:

  1. YOU ARE THE TRANSLATOR: You (the AI assistant) perform the translation directly in your context window using your own linguistic intelligence.
  2. NO API KEY REQUIRED: Do NOT ask the user for an API key or external credentials. The gst agent protocol runs completely locally and does not require an API key.
  3. DO NOT RUN EXTERNAL TRANSLATION SCRIPTS: Do NOT look for or execute external Python scripts. Use ONLY the gst agent CLI commands below.
  4. VIRTUAL ENVIRONMENT EXECUTION: gst may be installed in a project virtual environment (.venv or venv) rather than globally. If gst is not recognized:
    • Use the virtual environment binary: .venv/bin/gst (Linux/macOS) or .venv\Scripts\gst.exe (Windows)
    • Or use environment package runners: uv run gst ... / poetry run gst ...

When to Use

  • When the user asks to translate a subtitle file (.srt or .ass) into another language.
  • When translating multi-part dialogue requiring context awareness and consistent character tone/gender agreement.
  • When working with video files (.mp4, .mkv, etc.) that contain extractable subtitle streams.

Subtitle Translation Protocol

Step 1: Start a Translation Session

Run the start command to initialize the session and receive the first batch of subtitle lines:

bash
gst agent start <INPUT_FILE> -l "<TARGET_LANGUAGE>" [--batch-size N] [--context-size N] [--description "<OPTIONAL_CONTEXT>"] [--pretty]

<INPUT_FILE> can be a subtitle file (.srt, .ass) or a video file (.mp4, .mkv, .avi, etc. — embedded subtitles will be automatically extracted).

CLI Options Reference
FlagDescriptionDefault
-l, --target-languageTarget language name (e.g. "French", "Spanish")Required
-b, --batch-sizeNumber of subtitle lines per batch100
--context-sizePreceding lines to include in context fields0 (agent retains chat history)
-o, --output-fileCustom output subtitle path<input>_translated.srt/.ass
-d, --descriptionBackground context notes (e.g. series name, character tone)None
--prettyPretty-print JSON responses with indentationfalse (compact JSON)
--no-resumeStart fresh without resuming previous .progressfalse

The CLI outputs a JSON response with next_batch containing:

  • batch: Array of [{"index": "0", "text": "Original text"}, ...] to translate.
  • original_context: Previous original source lines (empty by default unless --context-size > 0 is passed).
  • translated_context: Previous translated lines for continuity (empty by default unless --context-size > 0 is passed).

Optimal Batch Size Guidance (-b / --batch-size is optional, defaults to 100): As an agent, select the batch size you find most optimal for your model capabilities and the file length:

  • Recommended Default (80–120 lines): Optimal balance between narrative context, translation accuracy, and fast validation.
  • High-Capacity Models: Feel free to use 100–150 lines to translate full scenes in fewer turns.
  • Short Files / Anime Episodes (< 300 lines): 60–80 lines provides 3–4 quick, responsive turns.
  • Constrained Output / Local Models: Use 40–60 lines to guarantee the full JSON array fits comfortably within the model's output generation limits.
Show full SKILL.md (156 more words)Show less
Step 2: Translate In-Context & Commit Translated Batch
  1. Translate each item in batch into the target language, preserving the exact item count and indices.
  2. Save the translated JSON array to a temporary file (e.g. batch_1_translated.json).
  3. Commit the file:
bash
gst agent commit <INPUT_FILE> --data-file batch_1_translated.json

Commit Data Format:

json
[
  { "index": "0", "text": "Bonjour le monde !" },
  { "index": "1", "text": "Comment vas-tu aujourd'hui ?" }
]
Step 3: Repeat Until Complete

Each successful commit automatically saves progress and returns the next_batch. Repeat Step 2 until the response returns "status": "completed".

Step 4: Cleanup Temporary Files

Delete the temporary batch JSON files (e.g. batch_1_translated.json) either progressively as each batch is committed or after the entire translation session finishes, keeping the workspace clean.

Helper Commands
bash
gst agent status <INPUT_FILE> [--pretty]   # Check progress status
gst agent next <INPUT_FILE> -l "<TARGET_LANGUAGE>" [--pretty] # Re-fetch current pending batch
gst agent reset <INPUT_FILE> [--pretty]    # Reset translation progress

Translation Rules

  1. Translation Item Parity: The output JSON array must contain the exact same number of items with identical indices (index).
  2. Formatting Preservation: Preserve all newlines (\n), italic tags (<i>...</i>), and ASS styling tags ({\an8}, {\pos(...)}, etc.).
  3. Punctuation & Tone: Maintain dialogue flow, character voice, and natural target language phrasing without altering structural markers.

© MaKTaiL, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files in gemini_srt_translator of MaKTaiL/gemini-srt-translator.

  • SKILL.md
  • __init__.py
  • agent_cli.py
  • cli.py
  • ffmpeg_utils.py
  • helpers.py
  • logger.py
  • main.py
  • pricing.json
  • session.py
  • skill.py
  • utils.py

Open the folder on GitHubat commit f61bbfb

Compare with similar skills

Subtitle Translator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Subtitle Translator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Subtitle Translator this skillMaKTaiL/gemini-srt-translator357—~1.4kAutomated safety check: PassMIT
Adaptationdanjdewhurst/story-skills2831 repos~3.5kAutomated safety check: NotesMIT
Animejsboraoztunc/skills3972 repos~828Automated safety check: PassApache-2.0
Youtube PublishAndonywang123/Epost197—~3.4kAutomated safety check: WarnNone
Vocab Lessonreceptron/mulmocast-cli475—~3.1kAutomated safety check: NotesNone
Video Translatecalesthio/OpenMontage66k—~2.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Adaptation

    danjdewhurst/story-skills

    This skill should be used when the user asks to "make an audiobook", "narration script", "narrator", "ACX", "Findaway", "pronunciation guide", "how long is the audiobook", "adapt to a screenplay"…

    283 GitHub starsUsed in 1 repo~3.5k tokens
    Media & CreativeAuto-check: notes
  • Animejs

    boraoztunc/skills

    Anime.js adapter patterns for HyperFrames. An agent skill from boraoztunc/skills.

    397 GitHub starsUsed in 2 repos~828 tokens
    Media & CreativeAuto-check passed
  • Youtube Publish

    Andonywang123/Epost

    Prepare an English YouTube release with local Chinese-to-English translation, subtitles and cover localization, then use a deterministic script connected to dedicated Chrome and YouTube Studio to…

    197 GitHub stars~3.4k tokensUpdated 1 mo ago
    Media & CreativeAuto-check: warnings
  • Vocab Lesson

    receptron/mulmocast-cli

    Create a vocabulary learning lesson MulmoScript with multi-section structure (word display, examples with voiceover, explanation, review with translation).

    475 GitHub stars~3.1k tokensUpdated today
    Media & CreativeAuto-check: notes
  • Video Translate

    calesthio/OpenMontage

    Translate and dub existing videos into multiple languages using HeyGen.

    66k GitHub stars~2.7k tokensUpdated 6 days ago
    Media & CreativeAuto-check passed
  • Seedance Vocab Es

    Emily2040/seedance-2.0

    This skill should be used when the user asks for Spanish Seedance 2.0 prompt wording, Spanish cinematic vocabulary, or translation of camera, lighting, action, VFX, audio, and production terms into…

    7.6k GitHub starsUsed in 1 repo~1.1k tokens
    Media & CreativeAuto-check passed

Questions about Subtitle Translator

What does Subtitle Translator do?

Translates SRT and ASS subtitle files, or subtitles embedded in video, into another language using the gst agent CLI and the assistant's own translation. The agent itself performs the translation inside its own context, and no API key is needed because the `gst agent` protocol runs locally.mkv whose embedded subtitles are extracted automatically) and a target language, then works through the subtitle lines batch by batch.

When should I use Subtitle Translator?

Subtitle Translator fits situations like: translating an .srt or .ass subtitle file into another language; translating subtitles embedded in an .mp4 or .mkv video; keeping character tone and gender agreement consistent across dialogue; resuming an interrupted subtitle translation.

How do I install Subtitle Translator in Claude Code?

Run `npx skills add MaKTaiL/gemini-srt-translator --skill subtitle-translator -a claude-code`. Or copy the skill folder (gemini_srt_translator in MaKTaiL/gemini-srt-translator) into .claude/skills/subtitle-translator in your project. Claude Code loads it when a task matches its description.

How do I install Subtitle Translator in Codex?

Run `npx skills add MaKTaiL/gemini-srt-translator --skill subtitle-translator -a codex`. Or copy the skill folder (gemini_srt_translator in MaKTaiL/gemini-srt-translator) into .agents/skills/subtitle-translator in your project. Codex loads it when a task matches its description.

Can I use Subtitle Translator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MaKTaiL/gemini-srt-translator --skill subtitle-translator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/subtitle-translator, .gemini/skills/subtitle-translator, .github/skills/subtitle-translator and .opencode/skills/subtitle-translator in your project.

What does Subtitle Translator need to run?

Going by SKILL.md and its folder, Subtitle Translator needs Python for the scripts in its folder and the command-line tools its instructions call (uv and poetry). Our summary lists: The gst command-line tool, installed globally or in a project virtual environment.

Does Subtitle Translator access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Subtitle Translator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Subtitle Translator use?

Subtitle Translator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Subtitle Translator use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Subtitle Translator?

Skills that share tags, products or a category with Subtitle Translator: Adaptation (danjdewhurst/story-skills, 283 stars), Animejs (boraoztunc/skills, 397 stars), Youtube Publish (Andonywang123/Epost, 197 stars) and Vocab Lesson (receptron/mulmocast-cli, 475 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Subtitle Translator?

MaKTaiL (a GitHub user) maintains it in MaKTaiL/gemini-srt-translator, which has 357 GitHub stars. The repository was last updated on September 1, 2026.

Source: MaKTaiL/gemini-srt-translator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.