yt-dlp-ingest-first
Skill2 starsChanged 8 months agoMITView on GitHub
Text-first video ingest with yt-dlp on OpenClaw-Module Android. Use when the user provides a public video URL and wants metadata, subtitle/caption discovery, subtitle fetch, or optional audio fallback for downstream ASR analysis. Prefer metadata/subtitles first; do not default to full media downloads.
In this repository47 other files it gives its agents.
- brainstormingSkill
- claude-code-termux-runbookSkill
- cli-patcherSkill
- code-review-workflowSkill
- commit-commandsSkill
- consulting-analysisSkill
- context7-cleanSkill
- data-analysisSkill
- deep-researchSkill
- edit-tool-compat-guardSkill
- env-managerSkill
- executing-plansSkill
- feature-devSkill
- firecrawlSkill
- frontend-designSkill
- gateway-device-pairingSkill
- githubSkill
- glibc-prebuilt-bundleSkill
- gogSkill
- image-generationSkill
- memory-setupSkill
- module-auditorSkill
- module-scaffoldSkill
- openclaw-config-guardianSkill
- openclaw-ollama-runtime-kbSkill
- plugin-cutover-guardianSkill
- plugin-runtime-guardianSkill
- python-env-managerSkill
- self-improving-agentSkill
- simplify-and-hardenSkill
- skill-benchSkill
- skill-creatorSkill
- skill-unificationSkill
- skill-vetterSkill
- socratic-groundingSkill
- subagent-orchestrationSkill
- systematic-debuggingSkill
- tailscale-oauth-bridgeSkill
- termux-packagerSkill
- termux-runnerSkill
- test-driven-developmentSkill
- vercel-deploy-claimableSkill
- verification-before-completionSkill
- video-generationSkill
- workspace-cleanupSkill
- writing-plansSkill
- zero-downtime-cutoverSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 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.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
if no subtitle/caption exists, return PARTIAL and ask to approve audio fallback + ASR path
- Very specific: line 48
Do not assume yt-dlp, python3, ffmpeg, or desktop paths are preconfigured.
- Very specific: line 53
If these are missing, downgrade verdict to PARTIAL and report blockers.
- Distinctive: line 58
do not write outside workspace without explicit approval
- Very specific: line 71
if subtitles fetched: PASS for text ingest
- Very specific: line 72
if no subtitles: return PARTIAL + propose Mode D
- Very specific: line 75
if ffmpeg missing: keep PARTIAL, report blocker and remediation
- Very specific: line 135
wait/backoff and retry; avoid tight loops.
- Distinctive: line 159
default to text-first / download-light
- Distinctive: line 160
do not auto-download playlists/full media
- Distinctive: line 161
do not use browser-cookie extraction as default
- Distinctive: line 162
if fallback requires new dependencies or policy changes, ask first
- Very specific: line 172
no subtitle path: mark PARTIAL, propose approved fallback
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
yt-dlp Ingest First
Standard flow for video -> text -> analysis in OpenClaw Android.
Scope
- In-scope:
- metadata probe
- subtitle/caption discovery
- subtitle fetch
- optional audio fallback (only when subtitles are unavailable/insufficient)
- Out-of-scope:
- default full-video download
- playlist batch ingestion without explicit user request
- browser-cookie/account-dependent workflows as default path
Trigger Rules
- Positive:
- user gives a public video URL and asks to analyze content
- user asks for subtitles/captions/transcript extraction
- user asks to inspect metadata before deeper analysis
- Negative:
- user explicitly asks for media download/archive workflow
- user asks for heavy ffmpeg post-processing pipeline not prepared on host
- Escalation:
- if no subtitle/caption exists, return
PARTIALand ask to approve audio fallback + ASR path
- if no subtitle/caption exists, return
Environment Contract (Android/OpenClaw)
Always use:
/data/adb/openclaw/node/bin/python -W ignore -m yt_dlp ...Operational flags for YouTube robustness (default in this skill):
--js-runtimes deno --remote-components ejs:githubDo not assume yt-dlp, python3, ffmpeg, or desktop paths are preconfigured.
Runtime preconditions for full lane:
ffmpeg+ffprobeavailable via/data/adb/openclaw/node/bin/{ffmpeg,ffprobe}denoavailable via/data/adb/openclaw/node/bin/deno- If these are missing, downgrade verdict to
PARTIALand report blockers.
Path Contract
- temp artifacts:
workspace/.ops/tmp/<task-id>/ - logs/state:
workspace/.ops/state/<task-id>/ - do not write outside workspace without explicit approval
SOP
- Input gate
- validate URL + task intent (
metadata-only | sub-first | deep-transcript)
- validate URL + task intent (
- Mode A: metadata probe
- run
--skip-download -J
- run
- Mode B: subtitle discovery
- run
--list-subs
- run
- Mode C: subtitle fetch
- try uploader subs (
--write-subs) + auto subs (--write-auto-subs) - language priority: requested ->
vi.*->en.*
- try uploader subs (
- Decision
- if subtitles fetched:
PASSfor text ingest - if no subtitles: return
PARTIAL+ propose Mode D
- if subtitles fetched:
- Mode D: audio fallback (explicitly approved)
- extract audio for downstream ASR
- if ffmpeg missing: keep
PARTIAL, report blocker and remediation
Deterministic Decision Tree
- Input gate -> Mode A (metadata)
- Mode A complete -> Mode B (list subtitles)
- Mode B result:
- subtitles/auto-captions found -> Mode C (fetch text)
- none found ->
PARTIAL+ ask approval for Mode D
- Mode D approved:
- ffmpeg available -> extract audio for ASR pipeline
- ffmpeg missing ->
PARTIALwith blocker + remediation
- Return verdict only with artifact evidence in
.ops/tmp+.ops/state
Command Recipes
Recipe 1 — Metadata only
mkdir -p ".ops/tmp/<task-id>" ".ops/state/<task-id>"
/data/adb/openclaw/node/bin/python -W ignore -m yt_dlp \
--js-runtimes deno --remote-components ejs:github \
--skip-download -J "<URL>" \
> ".ops/tmp/<task-id>/meta.json" \
2> ".ops/state/<task-id>/meta.err"Recipe 2 — Subtitle discovery
/data/adb/openclaw/node/bin/python -W ignore -m yt_dlp \
--js-runtimes deno --remote-components ejs:github \
--skip-download --list-subs "<URL>" \
> ".ops/tmp/<task-id>/list-subs.txt" \
2> ".ops/state/<task-id>/list-subs.err"Recipe 3 — Subtitle fetch (text-first default)
/data/adb/openclaw/node/bin/python -W ignore -m yt_dlp \
--js-runtimes deno --remote-components ejs:github \
--skip-download --write-subs --write-auto-subs \
--sub-langs "vi.*,en.*" \
--sub-format "vtt/srt/best" \
-o ".ops/tmp/<task-id>/%(id)s.%(ext)s" \
"<URL>" \
> ".ops/state/<task-id>/subs.out" \
2> ".ops/state/<task-id>/subs.err"Recipe 4 — Audio fallback (only when approved)
/data/adb/openclaw/node/bin/python -W ignore -m yt_dlp \
--js-runtimes deno --remote-components ejs:github \
-x --audio-format mp3 \
-o ".ops/tmp/<task-id>/%(id)s.%(ext)s" \
"<URL>" \
> ".ops/state/<task-id>/audio.out" \
2> ".ops/state/<task-id>/audio.err"Error Taxonomy -> Next Action
HTTP 429/ rate limit:- wait/backoff and retry; avoid tight loops; keep
PARTIAL
- wait/backoff and retry; avoid tight loops; keep
has no subtitles/has no automatic captions:- this is a content-state result (not a runtime failure); switch to approved audio fallback path
ffmpeg not found:- cannot complete audio fallback; return blocker + install requirement
- JS runtime / challenge-solver warning for YouTube extractor:
- enforce
--js-runtimes deno --remote-components ejs:github; if still present, markPARTIALwith reduced extraction confidence
- enforce
- auth/geo/private video errors:
- report exact extractor error; do not auto-use browser cookies
Output Contract
Must return:
- mode(s) executed
- artifact paths (
.ops/tmp,.ops/state) - findings:
- metadata summary
- subtitle availability/fetch result
- risk/blockers (429, ffmpeg, JS runtime, geo/auth)
- verdict:
PASS: got text material (subs/metadata per requested scope)PARTIAL: some data found, but transcript path incompleteFAIL: ingest path blocked with no usable output
Safety Rules
- default to text-first / download-light
- do not auto-download playlists/full media
- do not use browser-cookie extraction as default
- if fallback requires new dependencies or policy changes, ask first
Trigger Rules
- Positive: Trigger when user asks to analyze a public video URL via metadata/subtitle/transcript-first ingest.
- Negative: Do not trigger for unrelated tasks or full downloader workflows unless explicitly requested.
- Escalation: For audio fallback and any larger media workflow, confirm scope/approval before proceeding.
Error Handling
- missing tool/dependency: report exact missing component + safe remediation
- extractor/network failure: return exact error and next action
- no subtitle path: mark
PARTIAL, propose approved fallback
Output Contract
- Deliverable: concise evidence-backed ingest report with artifacts and verdict.
- Validation: include command class run + observable output.
- Failure mode: state root cause and actionable next step.
Minimal Reusable Report Template
⚡ [yt-dlp] mode=A+B+C -> metadata+subs probe complete
⚡ [artifacts] tmp=.ops/tmp/<task-id>/ ; state=.ops/state/<task-id>/
🛡️ [status] subtitles=<found|none> auto-captions=<found|none>
🛡️ [risk] <429|ffmpeg-missing|js-runtime-warning|none>
✅ Verdict: PASS | PARTIAL | FAILCompliance
- This skill standardizes a deterministic text-first ingest workflow; no completion claims without artifact evidence.
- For state-changing or long-running verification sequences, follow workspace reporting gate: send
PARTIALimmediately when verification is still pending.
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
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.

