# Send Subtitle Translator to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "subtitle-translate-skill",
    "name": "Subtitle Translator",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Thetail001/subtitle-translate-skill",
    "canonicalUrl": "https://clawhub.ai/Thetail001/subtitle-translate-skill",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/subtitle-translate-skill",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=subtitle-translate-skill",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/srt_format.md",
      "scripts/list_models.py",
      "scripts/translate_srt.py",
      "scripts/validate_srt.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "subtitle-translate-skill",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-09T13:56:17.593Z",
      "expiresAt": "2026-05-16T13:56:17.593Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=subtitle-translate-skill",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=subtitle-translate-skill",
        "contentDisposition": "attachment; filename=\"subtitle-translate-skill-0.1.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "subtitle-translate-skill"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/subtitle-translate-skill"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/subtitle-translate-skill",
    "downloadUrl": "https://openagent3.xyz/downloads/subtitle-translate-skill",
    "agentUrl": "https://openagent3.xyz/skills/subtitle-translate-skill/agent",
    "manifestUrl": "https://openagent3.xyz/skills/subtitle-translate-skill/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/subtitle-translate-skill/agent.md"
  }
}
```
## Documentation

### Overview

Translate SRT subtitle files using LLM APIs. Supports OpenAI-compatible API format with customizable URL, API key, and model selection. Outputs single-language or bilingual subtitles with original timestamps preserved.

### Features

Format Support: SRT subtitles
API Compatibility: OpenAI-compatible endpoints
Output Modes: Single-language or bilingual (translation above original)
Batch Processing: 50 sentences per batch (configurable) with 1-second intervals
Progress Tracking: Detailed logging of task progress and execution
Validation: Ensures sentence count consistency and timestamp preservation

### Basic Translation

python3 scripts/translate_srt.py \\
  --input video.srt \\
  --output video_zh.srt \\
  --source-lang en \\
  --target-lang zh \\
  --api-url https://api.openai.com/v1 \\
  --api-key sk-... \\
  --model gpt-4

### Bilingual Output

python3 scripts/translate_srt.py \\
  --input video.srt \\
  --output video_bilingual.srt \\
  --source-lang en \\
  --target-lang zh \\
  --bilingual \\
  --api-url https://api.openai.com/v1 \\
  --api-key sk-...

### Validate SRT File

python3 scripts/validate_srt.py input.srt

### List Available Models

python3 scripts/list_models.py \\
  --api-url https://api.openai.com/v1 \\
  --api-key sk-...

### Option 1: Environment Variables (Recommended)

export SUBTITLE_API_URL="https://api.openai.com/v1"
export SUBTITLE_API_KEY="sk-your-api-key"
export SUBTITLE_MODEL="gpt-4"

python3 scripts/translate_srt.py -i input.srt -o output.srt

### Option 2: Command Line Arguments

python3 scripts/translate_srt.py \\
  -i input.srt \\
  -o output.srt \\
  -u https://api.openai.com/v1 \\
  -k sk-your-api-key \\
  -m gpt-4

### Option 3: Config File (Less Secure)

Create ~/.openclaw/skills/subtitle-translator/config.json:

{
  "api_url": "https://api.openai.com/v1",
  "api_key": "sk-your-api-key",
  "model": "gpt-4",
  "batch_size": 50,
  "batch_interval_ms": 1000,
  "output_mode": "single",
  "log_level": "info"
}

⚠️ Security Warning: Storing API keys in plaintext config files increases risk. Prefer environment variables or command line arguments.

### Security Considerations

API Key Storage: Use environment variables or secure secret managers instead of plaintext config files
API Endpoint: Ensure you trust the API URL you provide
Proxy Environment: The scripts honor http_proxy/https_proxy environment variables. If your environment uses untrusted proxies, API keys could be captured
Network Traffic: All subtitle content is sent to the API endpoint. Do not use with sensitive/confidential content unless you control the API

### Workflow

Parse SRT: Extract index, timecodes, and text
Validate: Optional validation of input format
Batch Translation: Send 50 sentences per request (configurable)
Validate: Ensure output count matches input
Reconstruct: Combine original timecodes with translations
Output: Generate SRT file

### scripts/

translate_srt.py - Main translation script
list_models.py - List available models from API
validate_srt.py - Validate SRT file format

### references/

srt_format.md - SRT file format specification
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: Thetail001
- Version: 0.1.1
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-09T13:56:17.593Z
- Expires at: 2026-05-16T13:56:17.593Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/subtitle-translate-skill)
- [Send to Agent page](https://openagent3.xyz/skills/subtitle-translate-skill/agent)
- [JSON manifest](https://openagent3.xyz/skills/subtitle-translate-skill/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/subtitle-translate-skill/agent.md)
- [Download page](https://openagent3.xyz/downloads/subtitle-translate-skill)