# Anything To Skill

> Converts YouTube videos, websites, PDFs, and social media clips into executable SKILL.md files. Use when user shares a URL, file path, or content source and wants to turn the demonstrated workflow into a reusable agent skill. Supports autonomous and guided modes with visual frame analysis and multi-source synthesis. Do NOT use for video summarization, content repurposing, or code extraction.

- Skill: `ddeleon82/anything-to-skill` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add ddeleon82/anything-to-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ddeleon82/anything-to-skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ddeleon82 (https://skillmd.com/u/ddeleon82)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ddeleon82/anything-to-skill

---


# anything-to-skill

Convert any content source into a working agent skill.

## The Pipeline (14 Steps)

1. **Collect** source URL(s) from user
2. **Get metadata** — `yt-dlp --dump-json` (title, channel, date, duration)
3. **Download transcript** — `yt-dlp --write-auto-sub --sub-lang en --sub-format vtt --skip-download`
4. **Extract visual frames** — 3-tier fallback (see Video Extraction below)
5. **Analyze transcript** via subagent (methodology, tools, prompts, tips)
6. **Analyze frames** via subagent or direct Read (tool UIs, settings, prompts on screen)
7. **Cross-reference** transcript + frames (flag visual-only findings)
8. **Multi-source merge** — if multiple sources: compare methodologies, flag differences, synthesize best of both
9. **Brainstorm** skill design (clarifying questions, approach options)
10. **Write spec** + review loop
11. **RED test** — baseline without skill (what does the agent get wrong?)
12. **GREEN write** — minimal skill addressing specific baseline gaps
13. **REFACTOR test** — verify skill closes all gaps
14. **Cleanup** — delete downloaded videos, temp frames, VTT files

## 3-Tier Video Extraction

Attempted in order. Move to the next tier only on failure.

### Tier 1 — Video Download + ffmpeg (DEFAULT, most robust)

```bash
# Download at 720p max to limit file size (36-100MB typical)
yt-dlp -f "bestvideo[height<=720]+bestaudio/best[height<=720]" --merge-output-format mp4 -o "/tmp/video.mp4" "URL"

# Extract frames at 1 per 15 seconds, 1920px wide
ffmpeg -i /tmp/video.mp4 -vf "fps=1/15,scale=1920:-1" -q:v 2 /tmp/frames/frame-%03d.jpg

# ALWAYS delete video file after frame extraction
rm /tmp/video.mp4
```

- 100% reliable in testing. 88 frames from a 22min video in 28 seconds.
- Must delete video file immediately after frame extraction.
- Requires: `yt-dlp`, `ffmpeg`

### Tier 2 — Playwright Browser (FALLBACK)

```bash
node /tmp/yt-capture.mjs <videoId> <outputDir> <intervalSec> <startTime> <maxFrames>
```

- **UNRELIABLE for YouTube.** Player crashes after ~12-13 rapid seeks ("Something went wrong"). Both test videos failed identically at ~2:45.
- Useful for non-YouTube sources or when video download is blocked.
- Requires: Playwright + Chromium (`npx playwright install chromium`)
- Script at `/tmp/yt-capture.mjs` — write it fresh each time (~80 lines)

### Tier 3 — Transcript Only (LAST RESORT)

```bash
yt-dlp --write-auto-sub --sub-lang en --skip-download --sub-format vtt -o "/tmp/transcript" "URL"
```

- Always works. ~100-300KB files.
- **Misses ALL visual content** — tool UIs, generated images, settings, website results.
- Auto-generated captions have no punctuation and phonetically misspell tool names.

### Fallback Chain

```
Tier 1 → success? → extract frames → delete video → analyze
    └── fail? → Tier 2 → success? → analyze frames
                    └── fail? → Tier 3 (transcript only, warn user of reduced quality)
```

## Why Frame Analysis Is Not Optional

Transcript-only analysis misses ~30-40% of actionable detail. Proven categories of missed content:

| Category | Example |
|---|---|
| Tool UI details | Tool has 6+ models visible in dropdown — transcript only mentioned 3 |
| Post-gen features | Upscale, Enhancer, Relight, Inpaint buttons visible — never mentioned verbally |
| Exact settings | Model, Quality, Size values visible in sidebar — not spoken |
| URLs | Actual URLs visible in browser bar — never spoken |
| Prompt text on screen | Exact prompts in tool UI that were paraphrased in speech |
| Tool names | Phonetic misspelling in auto-captions vs actual name visible in UI |
| Feature discovery | Features shown in UI but barely explained verbally |

## Multi-Source Handling

When converting multiple videos on the same topic:

1. Analyze each independently via **parallel subagents**
2. Create a **comparison table** (shared techniques vs. different approaches)
3. **Flag contradictions** (different tools, different ordering, different philosophy)
4. **Synthesize** the best of each into the skill — don't average, merge the strongest parts
5. **Note the source** of each technique for attribution

## Testing Protocol (TDD for Skills)

For technique/reference skills, use RED/GREEN/REFACTOR:

1. **RED** — Run the target scenario WITHOUT the skill. Document what the agent gets wrong, misses, or doesn't know. This is the gap list.
2. **GREEN** — Write the minimal skill that addresses those specific gaps. No speculation, no "nice to haves."
3. **REFACTOR** — Run the same scenario WITH the skill. Verify every gap is closed. If new gaps appear, update and re-test.

## Cleanup Requirements

The skill MUST clean up after itself:

- **Tier 1:** Delete video file immediately after frame extraction (`rm /tmp/video.mp4`)
- **Tier 2:** Delete Playwright frame PNGs after analysis (`rm -rf /tmp/yt-frames-*`)
- **Tier 3:** VTT files are small, safe to leave or delete
- **All tiers:** All temp files go in `/tmp/`, never in the project directory
- **Frame directories:** Keep during analysis, delete when skill writing is complete

## Known Issues & Workarounds

| Issue | Detail | Workaround |
|---|---|---|
| WebFetch can't parse YouTube | JS-rendered pages return raw config | Use yt-dlp for everything |
| WebSearch can't find video IDs | `site:youtube.com` returns zero results | Use `yt-dlp --dump-json` |
| yt-dlp deno warnings | n challenge solving fails with TypeError | Cosmetic — downloads still complete |
| Playwright YouTube crash | Player errors after ~12-13 rapid seeks | Fall back to Tier 1 (download + ffmpeg) |
| Auto-captions misspell names | Phonetic approximations of tool/brand names | Frame analysis catches the real names |
| Write tool rejection | Permission prompt timeout in IDE | Retry the Write — succeeds on second attempt |

## Mode Selection

Before parsing, ask the user:
- **Autonomous** — generate skill without interruption, review after
- **Guided** — show extracted content, ask what to focus on, then generate

## Discovery Mode

Triggers automatically when source lacks full process content. Infers probable workflow, tags steps as `[demonstrated]` or `[inferred]`, assigns confidence scores. See `references/extraction-strategies.md` for detection criteria.

## Deduplication

Scans installed skills before generating. Recommends: update existing, write new, neither, or both. See `references/output-format.md` for recommendation logic.

## Self-Debugging

Each pipeline stage validates its output. 3 failures at any stage = stop and surface error. Every run produces `diagnostic.md`. See `references/extraction-strategies.md` for stage gates and red flags.

