视频转写

视频转写 is a skill for Claude Code, Codex from xiaohuailabs/xiaohu-video-translate. It costs 120 tokens per session (8,388 once invoked), scanned A, original, MIT.

A video transcription and translation tool that turns subtitles or audio into Markdown documents. For translated videos, it transcribes the audio, translates the subtitles, and burns Chinese subtitles into the video.

In plain words
What is it for?
Use it to turn videos into Markdown, transcribe local files or downloaded URLs, translate videos, and create Chinese-only or Chinese-English subtitles.
Why use it?
It removes the need to handle subtitle extraction, speech recognition, translation, and subtitle rendering as separate tasks. It can produce the original-language text and a Chinese translation for non-Chinese videos.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Good fit Use it to turn videos into Markdown, transcribe local files or downloaded URLs, translate videos, and create Chinese-only or Chinese-English subtitles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xiaohuailabs/xiaohu-video-translate --skill xiaohu-video-md
Clone the repo
git clone --depth 1 https://github.com/xiaohuailabs/xiaohu-video-translate

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for 视频转写

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md/github.svg)](https://agentmods.dev/skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md)
Your own site
<a href="https://agentmods.dev/skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md"><img src="https://agentmods.dev/badge/skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md/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.

agentmods 80×15 button for 视频转写

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md"><img src="https://agentmods.dev/badge/skills/xiaohuailabs/xiaohu-video-translate/xiaohu-video-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,388 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 169
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
  • medium Rogue Agent · line 72
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 72
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.08388
Opus 5 $0.00060 $0.04194
Sonnet 5 $0.00024 $0.01678
Haiku 4.5 $0.00012 $0.00839

Measured 13d ago against content hash 110e11d34a54, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

视频转写 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 13d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/douyin_download.py, scripts/douyin_login.py, scripts/transcribe_srt.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/xiaohu-video-md/SKILL.md · 486 lines

How it starts

The opening of the file, as written. The whole thing — 486 lines — stays where its author put it; the contents beside it link to each section on GitHub.

视频转写工具

适用/能力

  • 转写出文档:抓取字幕或音频转写 → 输出 Markdown 文档(有字幕优先)。
  • 翻译视频:转写 → 翻译 → 烧录中文字幕 → 输出带字幕的视频文件。
  • 支持精确模式(默认,large-v3-turbo,95% 精度)和快速模式(medium,90% 精度,快 81%)。
  • 双版本输出:中文内容生成中文版,非中文内容生成原文版 + 中文翻译版。

意图识别(必须严格遵守)

  • 用户说"转写""转文字""出文档" → 只生成 Markdown 文档
  • 用户说"翻译""翻译视频""配字幕""加字幕" → 必须执行完整的翻译视频管线(提取音频 → Whisper 生成 SRT → 调用 subtitle-polish 翻译 → 烧录字幕到视频 → 同时生成 Markdown 文档),不能只输出文档就结束
  • 输入是 URL → 先下载再处理
  • 输入是本地文件路径 → 直接处理

字幕类型(翻译管线必须先确认)

  • 中文字幕:只显示中文翻译
  • 中英双语字幕:中文在上,英文在下

翻译视频时,除非用户在对话中明确指定了字幕类型(说了"中文""双语""中英"等),否则必须用 AskUserQuestion 弹选项让用户选择。 ARGUMENTS 里的字幕类型不算用户指定。示例:

AskUserQuestion(
  question="选择字幕类型",
  options=["中文字幕(只显示中文)", "中英双语字幕(中文在上,英文在下)"]
)

双语字幕 SRT 格式(每条两行):

1
00:00:03,660 --> 00:00:06,360
中文翻译在上面
English original below

双语烧录走 ASS,不走 subtitles + force_style(中文大 / 英文小,形成反差):

  • subtitle-polish 翻译产出「双语 SRT」(中文在上、英文在下,时间戳一句对一句)后,调脚本转双语 ASS:
    python3 ~/.claude/skills/xiaohu-subtitle-polish/scripts/bilingual_ass.py \
      <双语SRT> --output <双语ASS> [--cn-size N] [--height 视频高度]
    
  • 再用 ass=<双语ASS> 滤镜烧录(不是 subtitles=)。完整规则见 xiaohu-subtitle-polish SKILL.md「双语字幕模式」段。
  • 字号:用户给了中文字号就传 --cn-size,英文自动按 中文 / 1.7 算;没给则脚本按分辨率选默认。中文︰英文 ≈ 1.7 是实测干净反差。

为什么不用 subtitles force_style 做双语:force_style 的 FontSize 对整条统一,做不到一条内中文大英文小;SRT 里的 inline {\fsN} 会被 ffmpeg 剥离(2026-05-31 实测三档字号 md5 全同)。只有 ASS 喂 libass 才能一条内分字号。 ⛔ ASS FontSize 是相对值不是像素:libass 已按视频分辨率自动缩放,不要按分辨率线性放大(1080p 的 17 乘 2 变 34 会让 4K 字幕占满下半屏)。2026-05-26 Jony Ive 法拉利视频踩坑根治。

强制规则(先读配置再执行)

  • 执行任何命令/写入任何文件前,必须先读取本技能目录 config.json,取 output_dir 作为 <输出根>(支持 ~ 展开)。
  • 文档中的所有 <输出根>/... 在执行前必须替换为真实绝对路径;禁止把 <输出根> 原样带到命令里执行(否则会写到当前目录,表现为“乱保存”)。
  • config.json 缺失、output_dir 为空/相对路径/不可写:立即停止并提示用户在网页面板填写,或用 --outdir <绝对路径> 覆盖。
  • 只有当用户明确给出“绝对路径输出位置”并确认时,才允许写入用户指定路径;否则默认只写 <输出根>/tmp/<输出根>/data/

建议的“输出根解析”固定前置步骤(避免手打长路径导致误写目录)

# 在本技能目录执行
OUTPUT_ROOT="$(python3 - <<'PY'
import json, os
from pathlib import Path

cfg = json.load(open("config.json", "r", encoding="utf-8"))
out = Path(os.path.expanduser(str(cfg.get("output_dir", ""))).strip())
if not out.is_absolute():
    raise SystemExit("config.json: output_dir 必须是绝对路径或以 ~ 开头")
print(str(out))
PY
)"
mkdir -p "$OUTPUT_ROOT/tmp" "$OUTPUT_ROOT/data"
echo "OUTPUT_ROOT=$OUTPUT_ROOT"

后续所有命令都必须使用 $OUTPUT_ROOT/...,不要在命令里手写/粘贴完整长路径。

Read the full file on GitHub · 486 lines

Changes

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.

  1. 13d ago First seen · 486 lines · 120 tokens per session scan A 110e11d34a54

Subscribe to this mod's changes

视频转写 is a skill published in the GitHub repository xiaohuailabs/xiaohu-video-translate (646 stars, last pushed 3mo ago), licensed MIT. It adds 120 tokens to every session and 8,388 once invoked, about $0.0006 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-08-30.

Related

Other skills, from other repositories

chinese-documentation

A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.

jnMetaCode/superpowers-zh · 62 tokens

azure-ai-translation-text-py

Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup. Use for translating text content in applications. Triggers: "text translation", "translator", "translate text", "transliterate", "TextTranslationClient".

microsoft/skills · 60 tokens

harden

Improve interface resilience through better error handling, i18n support, text overflow handling, and edge case management. Makes interfaces robust and production-ready. Use when the user asks to harden, make production-ready, handle edge cases, add error states, or fix overflow and i18n issues.

fengshao1227/ccg-workflow · 62 tokens

seedance-vocab-ja

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

Emily2040/seedance-2.0 · 50 tokens

asc-subscription-localization

Bulk-localize subscription, subscription-group, and in-app purchase display names across App Store locales using asc, including API 4.4.1 version-scoped v2 resources. Use when filling or updating subscription/IAP names and descriptions without App Store Connect UI work.

rorkai/app-store-connect-cli-skills · 60 tokens

i18n-helper

A helper for adding internationalization, which lets software show different languages and regional text. It finds user-visible text written directly in code and moves it into language files.

laolaoshiren/claude-code-skills-zh · 33 tokens