agentsclimarketplace

Ingest youtube

Skill allanbian1017/skills/skills/personal/ingest-youtube

Transcribe a YouTube video using yt2doc CLI and produce a summary report in the configured output language (defaulting to English), then mark the Google Task as completed. Use when the user provides a YouTube URL to transcribe, says 'transcribe this YouTube video', 'get the content of this YouTube video', or any request involving a youtube.com or youtu.be URL where the goal is readable content. Always prefer this skill over manual browser-based approaches.From its SKILL.md

Install
npx -y skills add allanbian1017/skills --skill ingest-youtube

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 3 commands, including `yt2doc --video "<YouTube URL>" --output ./reports/YouTube_YYYY_MM_DD/<video_id>.md --whisper-model <model> --add-table-of-contents` and 2 more.

SKILL.md

4.4 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

ingest-youtube

Full lifecycle for a single YouTube task: launch transcription → poll → summarise → write report → append suggestion → mark done.

Prerequisites: yt2doc must be installed locally. For Google Tasks API calls, refer to ../gws-tasks/SKILL.md.

Parameters

ParameterRequiredDescription
YOUTUBE_URLYesThe YouTube video URL to transcribe.
TASK_IDYesGoogle Tasks task ID to mark as completed.
DELEGATE_LIST_IDYesGoogle Tasks tasklist ID for the Delegate list.
SuggestionOutputPathOptionalWhen provided by daily-workflow, pass through to suggestion_log.md to write to a per-subagent file instead of the default location.

Procedure

Step 1 — Determine Whisper model (Video Strategist)

Video DurationWhisper ModelEst. TimeMin Local RAM
< 30 minmedium5–10 min4 GB
30–60 minsmall10–20 min6 GB
1–2 hourssmall35–55 min8 GB
> 2 hoursbase50–80 min10 GB

If duration is unknown, look it up via web search or yt-dlp --print duration_string. Default to the conservative path when uncertain.

Step 2 — Launch transcription

mkdir -p reports/YouTube_YYYY_MM_DD

yt2doc \
  --video "<YouTube URL>" \
  --output ./reports/YouTube_YYYY_MM_DD/<video_id>.md \
  --whisper-model <model> \
  --add-table-of-contents

Use run_command with WaitMsBeforeAsync=5000, then poll with command_status.

Tell the user: "Launching yt2doc for <url> using the <model> model (~X–Y minutes)."

yt2doc not found? Tell the user to install it via uv tool install yt2doc.

Step 3 — Poll for completion

command_status(command_id, WaitDurationSeconds=60)  # repeat until DONE

Periodically report elapsed time: "Still transcribing <title>… (N minutes elapsed)."

On completion, check exit code:

  • Exit 0 → proceed to Step 4
  • Exit 137 / 9 (Killed/OOM) → report: "⚠️ FAILED: Process was killed, likely ran out of memory. Ensure you have enough free memory (8 GB minimum, 12 GB recommended)." Do not mark task done.
  • Other non-zero → show last 20 lines of stderr. Do not mark task done.

Step 4 — Generate summary

Once the output file is confirmed non-empty:

📄 Read ../content-summary/references/summarise.md

Extract: video title (first # heading), chapter count, approximate character count. Generate summary in the configured output language.

Step 5 — Write the report

📄 Read ../content-summary/references/filename_rules.md

📄 Read ../content-summary/references/output_template.md

Confirm the file is written before proceeding.

Step 6 — Append suggestion to pending backlog

📄 Read ../content-summary/references/ai_analysis.md

📄 Follow ../content-summary/references/suggestion_log.md

{SourceType} = YouTube

If SuggestionOutputPath was provided by the caller, pass it through to suggestion_log.md.

Step 7 — Mark the task as completed and cleanup

# Mark as completed
gws tasks tasks patch \
  --params '{"tasklist": "<DELEGATE_LIST_ID>", "task": "<TASK_ID>"}' \
  --json '{"status": "completed"}'

# Remove intermediate raw transcription file
rm "reports/YouTube_YYYY_MM_DD/<video_id>.md"

Log: "✅ Task '<title>' marked as completed. Report saved to reports/YouTube_YYYY_MM_DD/<filename>.md. Intermediate file removed."


Troubleshooting

Exit code 137 / 9 (Killed/OOM): Ensure you have enough free memory. Retry with --whisper-model base if RAM is constrained.

LLMModelNotSpecified error: Do NOT use --segment-unchaptered without a local Ollama running. Remove that flag.

ChunkedEncodingError: Network interruption during model download — retry; it resumes from cache.

URL contains & in shell: Always wrap URLs in quotes.

What ships with it: 1 file

4.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.