agentleFS
EyanJinEyanJin/youtube-translator/SKILL.md

translate-video

Skill0 starsChanged 6 months agoMITView on GitHub

Translate English YouTube videos to Chinese with subtitles and AI dubbing. Downloads video, restructures fragmented captions into natural sentences, detects multiple speakers, translates via LLM, generates Chinese TTS dubbing, and composes the final video. Supports checkpoint/resume.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. aviz85/claude-skills-library★ 49same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify config.yaml exists in the tool directory:

    line 76
  2. Distinctive:

    After completion, report to the user:

    line 116
  3. Distinctive:

    If interrupted, re-running the same command resumes from checkpoint

    line 123
  4. Distinctive:

    If ffmpeg/yt-dlp not found: suggest installation commands for the user's platform

    line 128
  5. Very specific:

    If API key missing: point user to config.yaml and provide signup links

    line 129
  6. Distinctive:

    If network error: suggest checking proxy settings

    line 130
  7. Distinctive:

    If interrupted: reassure user that re-running will resume from last checkpoint

    line 131

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YouTube Video Translator Skill

Translate English YouTube videos to Chinese (subtitles + AI dubbing).

Prerequisites

This skill requires the youtube-translator tool to be installed. If not installed:

pip install -r requirements.txt

Also requires: ffmpeg, yt-dlp, Node.js

Parameters

Extract from user message:

  • URL (required): YouTube video URL
  • MODE: Output mode — subtitle, dub, or both (default: both)
  • OUTPUT_DIR: Output directory (default: ./yt_output)
  • TTS_ENGINE: TTS engine — edge (default, free) or cosyvoice (voice cloning)

Workflow

Step 1: Locate the tool

Find translate_video.py in the project:

# Check common locations
TOOL_DIR=""
for dir in "." "./youtube-translator" "../youtube-translator" "$HOME/youtube-translator"; do
  if [ -f "$dir/translate_video.py" ]; then
    TOOL_DIR="$dir"
    break
  fi
done

if [ -z "$TOOL_DIR" ]; then
  echo "youtube-translator not found. Please install:"
  echo "  git clone https://github.com/EyanJin/youtube-translator.git"
  echo "  cd youtube-translator && pip install -r requirements.txt"
  exit 1
fi

Step 2: Check configuration

Verify config.yaml exists in the tool directory:

if [ ! -f "$TOOL_DIR/config.yaml" ]; then
  echo "config.yaml not found. Creating from template..."
  cp "$TOOL_DIR/config.example.yaml" "$TOOL_DIR/config.yaml"
  echo ""
  echo "Please edit $TOOL_DIR/config.yaml and add your API keys:"
  echo "  - translate.api_key (required) — get one at https://platform.deepseek.com"
  echo "  - whisper.api_key (optional) — free at https://console.groq.com"
  exit 1
fi

Step 3: Set up proxy (if needed)

On systems that need a proxy to access YouTube:

# Only set if not already configured and proxy is in config
if [ -z "$http_proxy" ]; then
  # Let the tool handle proxy from config.yaml
  :
fi

Step 4: Run translation

cd "$TOOL_DIR"
python translate_video.py "{{URL}}" --mode {{MODE}} -o "{{OUTPUT_DIR}}" {{EXTRA_FLAGS}}

Where EXTRA_FLAGS can include:

  • --tts-engine cosyvoice if user requests voice cloning
  • --soft-sub if user requests toggleable subtitles
  • -y to skip confirmation

Step 5: Report results

After completion, report to the user:

  1. List all generated output files with their full paths
  2. Indicate which files to watch:
    • *_中文字幕.mp4 — subtitle version (original audio + Chinese subtitles)
    • *_中文配音.mp4 — dubbed version (Chinese AI voice + subtitles)
  3. Remind the user:
    • The .zh.srt file can be manually edited and re-run to regenerate video
    • If interrupted, re-running the same command resumes from checkpoint
    • Glossary terms can be added in config.yaml under glossary.terms

Error Handling

  • If ffmpeg/yt-dlp not found: suggest installation commands for the user's platform
  • If API key missing: point user to config.yaml and provide signup links
  • If network error: suggest checking proxy settings
  • If interrupted: reassure user that re-running will resume from last checkpoint

Examples

User: "translate this video https://www.youtube.com/watch?v=abc123" → Run with mode=both, default output

User: "帮我把这个视频翻译成中文字幕版 https://youtube.com/watch?v=xyz" → Run with mode=subtitle

User: "translate and dub this https://youtube.com/watch?v=xyz to ./output" → Run with mode=both, output_dir=./output

User: "用声音克隆配音这个视频 https://youtube.com/watch?v=xyz" → Run with mode=dub, tts_engine=cosyvoice

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.