LaunchKit · 2026
Back to Skills

subtitle-translate-skill

Translate SRT subtitle files using LLM APIs with OpenAI-compatible format.

0
363 downloads
by @thetail001

Setup & Installation

openclaw skills install @thetail001/subtitle-translate-skill

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install subtitle-translate-skill

Version History

v0.1.1Feb 25, 2026 - Version note by skill developer:

- Default batch size for translation reduced from 250 to 50 sentences (configurable). - Added script: scripts/validate_srt.py for validating SRT file format. - Updated documentation with security considerations and best practices for storing API keys. - Expanded configuration options: now supports environment variables and command line arguments (recommended over config files). - Improved documentation for quick start, validation usage, and workflow steps.

What This Skill Does

Translates SRT subtitle files from one language to another using any OpenAI-compatible LLM API. Preserves all timestamps exactly. Outputs either a single translated language or bilingual format with the translation displayed above the original text.

Unlike pasting subtitle text into a general translation tool, this processes SRT files directly in batches and reconstructs the file with original timecodes intact, skipping manual reformatting entirely.

When to use it

  • Translating foreign film subtitles for personal viewing
  • Creating bilingual subtitles for language learning
  • Localizing YouTube video captions for international audiences
  • Adding translated subtitles to conference or lecture recordings
  • Preparing multilingual subtitles for video course distribution

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: translate video.srt from English to Chinese with bilingual output

AGENT
  1. 1Parse the SRT file to extract subtitle indexes, timecodes, and text
  2. 2Validate the input file format
  3. 3Send text in batches of 50 sentences to the configured OpenAI-compatible API
  4. 4Verify that the returned sentence count matches the input
  5. 5Reconstruct the SRT file combining original timecodes with translated text
OUTPUT

video_bilingual.srt with Chinese translation on the line above each original English subtitle, all timestamps preserved

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

API key for an OpenAI-compatible LLM service (e.g., SUBTITLE_API_KEY environment variable)OpenAI-compatible API endpoint URL (e.g., SUBTITLE_API_URL environment variable)