This skill should be used when the user asks to "get a YouTube transcript", "transcribe a YouTube video", "get the transcript of this video", "transcribe this" with a YouTube URL, provides a YouTube or YouTube Shorts URL and wants its content transcribed, or mentions "youtube transcript" or "video transcript". Extracts verbatim transcripts from YouTube videos (including Shorts) using Google Gemini.
Extract verbatim transcripts from YouTube videos (including Shorts) using the Google Gemini API. The transcript is returned with YAML frontmatter containing the source URL, model used, and timestamp.
SKILL_DIR refers to this skill's directory. All varlock commands must be run from SKILL_DIR (it reads .env.schema from the current directory).
.venv (pyenv default is 3.7, too old). Set up once:
cd "${SKILL_DIR}"
/usr/local/bin/python3 -m venv .venv
.venv/bin/pip install google-genai
op-agent-skills-token) → 1Password service account (AI vault, read-only) → GEMINI_API_KEY → Gemini API.
The .env.schema in this skill directory defines all required variables — no .env files are used.gemini-api-key-transcript (password field). Obtain a key at https://ai.google.devRun the script from the skill directory via varlock run to securely inject secrets:
cd "${SKILL_DIR}" && varlock run -- .venv/bin/python3 scripts/get_transcript.py "YOUTUBE_URL"
| Flag | Description |
|---|---|
--model MODEL | Gemini model to use (default: gemini-2.5-flash or GEMINI_MODEL env var) |
-o FILE, --output FILE | Save transcript to a specific file path |
--stdout | Print transcript to stdout instead of saving to file |
When neither --output nor --stdout is specified, the transcript is auto-saved to:
~/CascadeProjects/semantechs/transcripts/YYYYMMDD_VIDEOID.md
The output directory is configurable via the TRANSCRIPT_OUTPUT_DIR env var in .env.schema.
Auto-save transcript to default directory:
cd "${SKILL_DIR}" && varlock run -- .venv/bin/python3 scripts/get_transcript.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
Print transcript to stdout:
cd "${SKILL_DIR}" && varlock run -- .venv/bin/python3 scripts/get_transcript.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --stdout
The script outputs the transcript with YAML frontmatter:
---