Skip to content
Back to skills

analyze-video

ASecurity

Analyze video URLs and local files into timestamped Word reports and Open Filmmaker Toolkit project files. Also handle caption downloads and best-quality local video or audio copies. Triggers include "analyze this video", "make a report from this video", "download the captions", "get the subtitles", "export this analysis as an Open Filmmaker Toolkit project", "download this video", "get me a local copy", "best quality copy", "save this YouTube video", "just the audio", and "rip the audio".

  • 5 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 19, 2026
ai-agentsjavascriptpythongojavashellbashnodeexpressgitapi

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 15, 2026

npx -y skills add evillollive/Analyze-Video-Skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of analyze-video?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for analyze-video
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/evillollive-analyze-video/badge)](https://www.skillsdirectory.com/skills/evillollive-analyze-video)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: analyze-video
description: >-
  Analyze video URLs and local files into timestamped Word reports and
  Open Filmmaker Toolkit project files. Also handle caption downloads and
  best-quality local video or audio copies. Triggers include
  "analyze this video", "make a report from this video", "download the captions",
  "get the subtitles", "export this analysis as an Open Filmmaker Toolkit project",
  "download this video", "get me a local copy", "best quality copy",
  "save this YouTube video", "just the audio", and "rip the audio".
allowed-tools: Bash, Read, Write, AskUserQuestion
homepage: https://github.com/evillollive/Analyze-Video-Skill
repository: https://github.com/evillollive/Analyze-Video-Skill
license: AGPL-3.0
user-invocable: true
---

# analyze-video

Self-contained pipeline: it gets one or more videos locally, extracts frames, uses captions or Whisper for a transcript, tiles frames into contact sheets for cheap review, and builds a Word document with timestamped analysis. It can also download caption files, save a best-quality local copy, and export the analysis as an Open Filmmaker Toolkit project file.

The skill works with any agent that can run shell commands, on macOS, Linux or Windows. Two conventions used below:

- **Ask the user** means use your environment's question tool if it has one, otherwise ask in plain text.
- **Deliver** means give the user the absolute path of the file, as a clickable file link if your environment supports them.

## Reference files

Read these only when the situation calls for them. They live in `${SKILL_DIR}/references/`.

| File | Read it when |
|---|---|
| `downloads.md` | A download fails or comes back degraded, the user wants a best-quality copy, or you need the full caption options |
| `environments.md` | Commands time out, setup and processing run in different places, a download is blocked only from this machine, tools are installed but not found, or you are on Windows |
| `docx-spec.md` | You need layouts, appendices, a PDF, standalone files, cleanup, or the `docx` module cannot be found |
| `pipeline-options.md` | A run was interrupted, or you need output files, manifest fields, caching, parallelism or promo trimming |
| `oft-export.md` | The user wants an Open Filmmaker Toolkit project file |
| `lenses.md` | The analysis has a purpose beyond a general write-up: a filmmaker breakdown, a content summary, or a review of a reference or competitor video |

## Safety and privacy boundary

This skill runs `yt-dlp`, `ffmpeg`, and `ffprobe` locally. Source video files, frames, contact sheets, manifests, and the final `.docx` stay on the user's machine. Extracted audio is sent to Groq or OpenAI only when no native captions are available and a Whisper key is configured.

Do not try to bypass platform bot detection or access controls. If a site blocks unauthenticated downloads, the safe fallback is explicit user authorization: ask whether the user wants to use their own browser session via `--cookies-from-browser <browser>` or a cookies file via `--cookies <path>`. Do not spoof watch sessions, forge tokens, automate hidden playback to trick a site, or use unrelated hosting/services as an evasion layer.

## Choose the mode

- **Analysis** (default): the user wants a written document about one or more videos. Follow Steps 0 to 8.
- **Captions only**: the user wants subtitle or transcript files and no analysis. Follow "Captions-only mode" and stop.
- **Download only**: the user wants a local copy of the video, or only its audio, and no analysis. Follow "Download-only mode" and stop.

In every mode, first resolve the skill directory as shown in Step 0.

## Captions-only mode

Skip the report pipeline: no setup preflight, frame questions, `process.py`, or `.docx`. Only `yt-dlp` is needed; if it is missing, `captions.py` prints install guidance (or run `setup.py`).

```bash
python3 "${SKILL_DIR}/scripts/captions.py" \
  --source "<url>" [--source "<url2>" ...] \
  --out-dir "<absolute output dir>" \
  [--langs en] [--format srt] [--no-auto] [--list]
```

Defaults are English and SRT. `--format` also takes `vtt`, `txt`, a comma list, or `all`; `--list` shows the available languages without downloading. Full options and the output format are in `references/downloads.md`.

`--source` also takes a local video: its subtitle files (`clip.srt`, `clip.en.vtt`) are converted; with none, the audio goes to Whisper if a key is set, so ask first (`--no-whisper` stops it). Do not offer cleanup or PDF steps. Report the file paths and stop.

## Download-only mode

Skip setup of the docx stack, frame extraction, contact sheets, and the report pipeline. Check saved defaults as in Step 2 (`download.container`, `download.subs`, `download_folder`). Before downloading, ask only for the choices the user has not already made:

1. Deliverable: video file only, or video file plus analysis.
2. Container: MKV (any compatible source codec), edit-friendly MP4 (H.264 video + AAC audio), or both. If the user wants only the audio, use `--container audio` (the original audio track, no re-encode); use `--container mp3` only when they ask for mp3, since converting loses quality.
3. Captions: none, SRT, or SRT plus a timestamped transcript.
4. Destination folder.

The script needs only yt-dlp, ffprobe, and ffmpeg:

```bash
python3 "${SKILL_DIR}/scripts/download.py" --best \
  --source "<url>" --out-dir "<destination>" \
  --container mkv --audio-lang original --subs none \
  --temp-dir "<a local folder that is not synced by a cloud service>"
```

Rules that always apply:

- Write final files to the destination the user chose. Never assume one.
- If the best available stream is below 720p, stop and ask whether the user accepts it; only then retry with `--allow-low-quality`. This check does not apply to audio-only downloads.
- After downloading, report the actual codecs, resolution, fps and video bitrate the script measured, plus the decode-test result. For audio-only, report the audio codec, bitrate, sample rate and channels instead.
- Say whether a Premium stream was used (`premium_stream`) and pass along `playback_note` (no re-encode needed; which players open it).
- After using an exported cookies file, say it gives access to the account and offer to delete it.
- Stopped for disk space: re-run with `--temp-dir` on a bigger drive. Cut off by a time limit: re-run the same command to resume.
- If the user also wants analysis, download first, then run the normal flow against the local file. Do not analyze or build a `.docx` when the user asked for the file only.

Audio language, MP4 behavior and failure handling are in `references/downloads.md`.

## Step 0: Setup preflight

Set `SKILL_DIR` to the absolute path of the folder this `SKILL.md` lives in. Some agents expose it as an environment variable (for example `CLAUDE_SKILL_DIR` or `COPILOT_SKILL_DIR`). No particular agent is required: if none is set, fill in the path you loaded this file from. Then check it, because a wrong value makes every later command fail with "file not found":

```bash
SKILL_DIR="${SKILL_DIR:-${CLAUDE_SKILL_DIR:-${COPILOT_SKILL_DIR:-}}}"
# If that is empty, set it yourself:
#   SKILL_DIR="/absolute/path/to/analyze-video"
# or locate it once:
#   SKILL_DIR=$(dirname "$(find / -name SKILL.md -path '*analyze-video*' 2>/dev/null | head -1)")
test -f "$SKILL_DIR/scripts/process.py" && echo "skill dir ok" || echo "SKILL_DIR is wrong: '$SKILL_DIR'"
```

Shells that start fresh on every command do not remember the variable; set it again at the start of each command.

Use `"$SKILL_DIR/scripts/..."` consistently. Never hardcode `~/.cache/analyze-video/scripts/...`.

Run once per session, on the machine where processing will run:

```bash
python3 "${SKILL_DIR}/scripts/setup.py" --check
```

Exit code `0` means local dependencies are ready. Treat any non-zero exit as "not ready" and run the installer:

```bash
python3 "${SKILL_DIR}/scripts/setup.py"
```

The installer adds what it can without administrator rights and prints exact install commands for the rest:

- macOS with Homebrew: installs missing `ffmpeg`, `yt-dlp`, Node.js, Deno and the `docx` npm module.
- Linux: installs `yt-dlp`, Deno and the `docx` npm module without sudo; prints commands for `ffmpeg` and Node.js.
- Windows: installs `yt-dlp` with pip and missing `ffmpeg`, Node.js and Deno with winget, plus the `docx` npm module; prints commands for anything that fails.

If setup prints `export PATH=...` lines, apply them before running the pipeline. On Windows, newly installed tools are found by the scripts right away, but need a new terminal before you can call them by name. If `--check` notes that yt-dlp is more than 45 days old, `setup.py --update-ytdlp` updates it.

A Whisper API key is optional. Without one, videos with native captions still get transcript analysis and captionless videos are processed frames-only. If the user wants transcripts for captionless videos, ask whether they have a Groq key (preferred) or an OpenAI key, then store it:

```bash
python3 "${SKILL_DIR}/scripts/setup.py" --set-key groq "<KEY>"
# or:
python3 "${SKILL_DIR}/scripts/setup.py" --set-key openai "<KEY>"
```

Setup state belongs to the machine it ran on. If setup and processing happen in different places, or commands are cut off by a time limit, read `references/environments.md`.

## Step 1: Parse the request

Extract:
- One or more video sources: HTTP(S) URLs or local video paths.
- Optional focus range, such as "2:30 to 3:15" or "the demo section at 1:30".
- Optional speed/quality intent. If the user asks for a quick scan, use `--quick`.

Infer focus ranges from the request and pass them with `--start` and `--end`. Do not ask about focus unless the request is ambiguous enough that processing the full video would likely waste time or tokens.

## Step 2: Ask the user only when needed

First run `python3 "${SKILL_DIR}/scripts/defaults.py" --show`. If it has saved answers, read its `summary` back and ask once whether to use them; then ask only what they don't cover (here and in Step 7). With none, ask as below and offer once at the end to save the answers. Details: `pipeline-options.md`.

Ask the user once for the batch:

1. **Frames per video** if the user did not specify. This is a required question unless the user explicitly says "pick for me" or equivalent. Suggest:
   - Under 2 min: 6 to 8
   - 2 to 5 min: 8 to 12
   - 5 to 15 min: 12 to 20
   - Over 15 min: 16 to 25, or a focused range
   If the user delegates the choice, use the middle of the range for the video's length (20 for videos over 15 minutes) and say which number you used.
   If you do not know the video's length yet, you may ask this after Step 3, when `manifest_lite.json` gives the duration. The count is not needed until Step 5.
2. **Output format** only for 2+ videos:
   - One combined `.docx` (default)
   - Separate `.docx` per video
3. **Where to save the document**, if the user has not said and your environment has no standard place for deliverables.
4. **Kind of analysis**, only if the request leaves it unclear and the answer would change the document: a general write-up, a filmmaker breakdown (how it was made), a content summary (what it says), or a reference review (what a competitor or example video is doing). Infer it from the request when you can.

If a URL failed because the site requires login/bot verification and the user is authorized to view it, ask whether they want to retry with their own browser cookies. Do not ask for cookies proactively before a failure.

## Step 3: Process each video

Create one numbered output directory per video inside the working folder for this job (the folder the user chose, or your environment's output folder):

```bash
OUT_DIR="<absolute path to the working folder>"
VIDEO_DIR="$OUT_DIR/video_1"

python3 "${SKILL_DIR}/scripts/process.py" \
  --source "<url-or-path>" \
  --out-dir "$VIDEO_DIR"
```

Add flags as the request calls for them:

- `--start 2:30 --end 3:15`: process only a focus range.
- `--quick`: a faster, cheaper pass with a smaller frame budget.
- `--source-url "<original-url>"`: when `--source` is a local file that was downloaded from a URL, so the real title and captions can be recovered.
- `--force`: ignore cached output and redo everything.

`process.py` prints the path to `manifest_lite.json` on stdout. Progress and warnings go to stderr.

A video downloaded from a URL is kept in a shared cache (`~/.cache/analyze-video/downloads/`), not in the out-dir, so later runs do not download it again. Add `--no-download-cache` if the user wants the video file kept with the other working files.

Process videos one at a time. Do not run several videos in parallel; a single run already uses the machine fully.

If a run is interrupted, re-run the exact same command. It resumes instead of starting over. If a download is blocked, explain the specific access problem and read `references/downloads.md` before retrying. Offer the user's own browser cookies only after a failure, and only with their agreement.

## Step 4: Read the manifest and preview visuals

Do not read every frame. The pipeline produces contact sheets and a lightweight manifest so you can preview the video at low cost:

1. Read `manifest_lite.json` first. It has chunk metadata, timestamps, contact-sheet paths, `docx_image_dimensions`, `suggested_docx_name`, `transcript_path` and quick-mode flags, but no transcript text or per-frame arrays.
2. If `quick_mode` is true, skip contact-sheet preview unless the user asked for detailed visual analysis.
3. Otherwise read each relevant contact sheet from `manifest_lite.chunks[].contact_sheet.absolute_path`. Each tile is labeled with its tile number and its time in the video. For very long videos, read only the chunks that match the user's focus.
4. Read the full `manifest.json` only when you need transcript text (`manifest.transcript_segments[]`) for quotes, section writing, or refining section boundaries.

Videos over 12 minutes are split into chunks of about 10 minutes, each with its own contact sheet and frame spacing; chunks overlap by a few seconds, so neighboring sheets can repeat a moment. If `manifest_lite.preview_cost_warning` is true and the user asked about a narrow moment, prefer re-running with `--start` and `--end` over reading every contact sheet.

## Step 5: Select frames

Start from the helper's picks:

```bash
python3 "${SKILL_DIR}/scripts/select_frames.py" "$VIDEO_DIR/manifest_lite.json" <N>
```

It spreads the picks across the video, swaps out frames nearly identical to one already picked (so a one-camera talk gives the speaker plus the cutaways), and avoids near-blank frames. Add `--even` only if the user wants strictly even spacing.

The output is a JSON list with `chunk_index`, `frame_index`, `tile`, `absolute_path` and timestamps. Always run it in the current session; do not reuse frame paths from earlier notes or summaries.

The helper judges how frames look, not what they mean. Refine its picks after looking at the contact sheets:

- Shift toward visible scene transitions.
- Include opening and closing frames if visually distinct.
- Prefer frames that show concrete UI, text or action.
- Bring back anything important it dropped, such as a name graphic or title card.
- Do not spend more than one frame on end credits or a static end card unless the user asked about them.

To swap frames, read the tile number printed on the contact sheet and ask for the final set by tile, written `<chunk>:<tile>`:

```bash
python3 "${SKILL_DIR}/scripts/select_frames.py" "$VIDEO_DIR/manifest_lite.json" --tiles 1:4,1:19,2:59
```

That returns the same fields for exactly those frames, in the order given. If a sheet has no labels (`contact_sheet.labeled` is false in the manifest), count tiles left to right, top to bottom, starting at 1.

Read the selected full-resolution frames in one parallel batch per video. For batch processing, finish one video before reading frames for the next.

## Step 6: Write the analysis

Decide what kind of analysis this is. If the user wants to know how the video was made, what it says, or how a reference or competitor video works, read `references/lenses.md` and follow that lens: it changes what to look for, how to organize the sections, and which frames to prefer. Otherwise write a general analysis as described here.

Write time-based sections with descriptive headings, for example:
- "Opening setup (0:00 to 0:18)"
- "Live demo walkthrough (2:30 to 3:15)"

For each section:
- Describe what is visible: layout, people, on-screen text, expressions, UI, camera focus, motion, and visual transitions.
- Connect transcript evidence when available using timestamps from `manifest.transcript_segments`.
- Note what is significant or surprising.

Quoting from captions needs care. `manifest_lite.transcript_source` says where the transcript came from, but not whether a person or a machine wrote it. Machine captions often have no punctuation, misrecognized words, and sound markers such as `[Applause]` in the middle of a sentence.

- Quote only words that appear together, in order, in the transcript. Do not join text across a sound marker or silently drop one.
- Use the timestamp of the segment where the quoted words begin.
- If a word looks misrecognized, paraphrase instead of quoting it.
- Add punctuation and capitals for readability, but do not change words.

Be concrete and observational. Avoid vague summaries such as "the presenter explains the feature" when the visual evidence supports a richer description.

For caption style, consult:

```bash
${SKILL_DIR}/templates/caption_guide.md
```

For combined multi-video docs, add an "Observations Across Videos" section covering shared structure, visual style, themes, and differences.

## Step 7: Ask the delivery questions

Ask before building, unless accepted saved defaults cover these. Appendices are off by default, and there is exactly one build, after the answers. Never add the contact-sheet appendix or the transcript appendix on your own initiative.

Ask the user once for the batch. Skip any option that does not apply, and offer the transcript options only when a transcript exists (`transcript_segment_count > 0`):

> "A few delivery options before I build the document:
> 1. Include the contact sheet(s) as a visual appendix *inside* the document?
> 2. Include the full transcript as an appendix *inside* the document?
> 3. Keep standalone copies of the contact sheet(s) and/or the transcript as separate files next to the document?
> 4. Also want a PDF version?
> 5. Clean up the remaining working files afterward?
> 6. Also export the analysis as an Open Filmmaker Toolkit project file?"

Treat no answer as "no" to every option. For each "yes", follow `references/docx-spec.md` (appendices, PDF, standalone files, cleanup) or `references/oft-export.md`.

## Step 8: Build and deliver

Do not write JavaScript at runtime. Write a JSON spec and pass it to the bundled builder:

```bash
python3 "${SKILL_DIR}/scripts/validate_spec_paths.py" --spec "$OUT_DIR/spec.json" &&
python3 "${SKILL_DIR}/scripts/lint_spec_quality.py" --spec "$OUT_DIR/spec.json" &&
node "${SKILL_DIR}/scripts/build-docx.js" --spec "$OUT_DIR/spec.json"
```

Spec shape:

```json
{
  "out": "/absolute/path/<title-slug>-analysis.docx",
  "title": "Video Analysis",
  "subtitle": "Generated by /analyze-video",
  "frame_layout": "1up",
  "videos": [
    {
      "title": "Video title",
      "source": "https://youtu.be/abc123",
      "meta": "Uploader · Duration",
      "image_dimensions": { "width": 480, "height": 270 },
      "frame_layout": "2up",
      "sections": [
        {
          "heading": "Opening (0:00 to 0:18)",
          "time_range": "0:00 to 0:18",
          "body": "Analysis prose.",
          "frame_layout": "2up",
          "frames": [
            {
              "path": "/absolute/path/frame_0001.jpg",
              "timestamp_seconds": 3.5,
              "timestamp_formatted": "0:03",
              "caption": "Concrete frame caption."
            }
          ]
        }
      ]
    }
  ],
  "observations": "Optional cross-video observations.",
  "appendix_contact_sheets": [
    {
      "path": "/absolute/path/chunks/chunk_1/contact_sheet.jpg",
      "heading": "Video title, chunk 1 (0:00 to 10:00)",
      "caption": "Chronological overview, 0:00 to 10:00.",
      "alt": "Grid of evenly spaced frames from the first ten minutes."
    }
  ],
  "appendix_transcript": [
    {
      "heading": "Video title",
      "path": "/absolute/path/transcript.txt"
    }
  ]
}
```

Rules for the spec:

- `out`: an absolute path in the folder where the document should be saved: the one the user chose, otherwise `$OUT_DIR`. For one video, use the manifest's `suggested_docx_name` as the file name. For a combined document, build a similar name from the videos (for example the first title slug plus `-and-2-more`) and end it with `-analysis.docx`.
- `source`: the original URL or local path the user gave (`manifest_lite.source`, or `manifest_lite.url` for URLs). Never a cache or download path.
- `image_dimensions`: use `manifest_lite.docx_image_dimensions`.
- Frame paths: from this session's `select_frames.py` output, including its `--tiles` output for frames you swapped in (Step 5). Never from an earlier session's notes.
- `meta`: a short line under the title. Do not repeat the source URL there; the builder prints it on its own "Source:" line.
- `body`: separate paragraphs with a blank line.
- Frame times: keep `timestamp_seconds` and `timestamp_formatted` on each frame, copied from `select_frames.py`. The builder prints the time in front of the caption, so do not write it into the caption yourself. Set `"show_timestamps": false` at the top level to leave times off.
- `time_range` is recorded for other tools and is not printed. Put the time range in the section heading.
- `frame_layout`: `"1up"` (default) or `"2up"`, settable at the top level, per video, or per section.
- `appendix_contact_sheets` and `appendix_transcript`: include only what the user approved in Step 7. Leave them out otherwise.

`validate_spec_paths.py` is mandatory. If it fails, a path is stale or mistyped: take the paths again from this session's `select_frames.py` output and validate again. Confirm the `.docx` exists, then deliver it, along with any extras the user approved.

## When something fails

- **Setup preflight failed**: run the installer. Whisper keys are optional; the local dependencies are not.
- **Anything about downloading** (blocked, rate limited, geo restricted, low quality, yt-dlp errors or updates): `references/downloads.md`.
- **Timeouts, setup done on a different machine, tools not found, Windows**: `references/environments.md`.
- **No transcript**: proceed frames-only and say so in the document. If the video came from a URL but was processed from a separately downloaded local file, add the transcript without re-downloading: `python3 "${SKILL_DIR}/scripts/process.py" --captions-only --source <url> --out-dir <video-dir>`.
- **Whisper backend failed**: when both keys exist, `process.py` tries Groq then OpenAI. If both fail, proceed frames-only.
- **Whisper audio too large**: re-run with a focused `--start`/`--end` range, or use a source with native captions.
- **Long-video preview warning**: prefer a focused re-run or quick mode over reading every contact sheet.
- **Spec has stale or missing frame paths**: re-run `select_frames.py` in the current session and regenerate `spec.json`.
- **`docx` module not found**: `references/docx-spec.md`.

## Security notes

The skill does not upload source video, persist cookies, post to platform accounts, or access platform accounts by default. Cookie-based retries must be initiated only after user consent and should use the user's own authorized browser/session.

Bundled runtime: the scripts in `scripts/` (Python, plus `build-docx.js`).

Files in this skill

  • .claude-plugin/marketplace.json640 B
  • .claude-plugin/plugin.json503 B
  • .codex-plugin/plugin.json30 B
  • CHANGELOG.md30.1 KB
  • SKILL.md29.8 KB
  • analyze-video.skill5.3 KB
  • commands/analyze-video.md825 B
  • docs/SHARING.md5.2 KB
  • hooks/hooks.json278 B
  • pyproject.toml214 B
  • scripts/build-docx.js22 KB
  • scripts/build-skill.sh1.8 KB
  • scripts/cache_utils.py15.3 KB
  • scripts/download.py25.8 KB
  • scripts/env_utils.py3.1 KB
  • scripts/frames.py17.6 KB
  • scripts/host_env.py1.6 KB
  • scripts/lint_spec_quality.py2.5 KB
  • scripts/package-lock.json7.8 KB
  • scripts/package.json177 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.