# Where to Find the Main Script in bradautomates/claude-video

> Locate the main script for bradautomates/claude-video easily. Discover the watch.py file, the central entry point for video processing in this repository.

- Repository: [bradautomates/claude-video](https://github.com/bradautomates/claude-video)
- Tags: how-to-guide
- Published: 2026-07-15

---

**The main script for bradautomates/claude-video is [`watch.py`](https://github.com/bradautomates/claude-video/blob/main/watch.py), located in the `skills/watch/scripts/` directory, which functions as the central entry point for processing video content via the `/watch` slash command.**

The bradautomates/claude-video repository provides an Agent Skill that enables AI assistants to analyze video content through a standardized slash-command interface. Understanding the location and architecture of the main script is essential for developers who want to extend the functionality or integrate the tool into custom workflows.

## Location of the Main Entry Point

The core executable for the claude-video Agent Skill resides at **[`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py)**. This module implements the slash-command logic invoked as `/watch <url-or-path> [question]` within host environments like Claude Code, Codex, or Cursor.

Unlike standalone applications, this script is designed to be harness-agnostic. It dynamically resolves its own directory at runtime using the **`SKILL_DIR`** variable, then invokes helper utilities via relative paths to ensure compatibility across different AI agent platforms.

## Workflow Orchestration

When executed, [`watch.py`](https://github.com/bradautomates/claude-video/blob/main/watch.py) coordinates a four-stage pipeline to transform video input into analyzable content:

1. **Download** – Delegates to **[`download.py`](https://github.com/bradautomates/claude-video/blob/main/download.py)** (a yt-dlp wrapper) to fetch remote videos or validate local media files.
2. **Frame Extraction** – Calls **[`frames.py`](https://github.com/bradautomates/claude-video/blob/main/frames.py)** (an ffmpeg wrapper) to generate representative image frames at an optimal FPS calculated for the video duration.
3. **Transcription** – Executes **[`transcribe.py`](https://github.com/bradautomates/claude-video/blob/main/transcribe.py)** for local Whisper processing, or optionally **[`whisper.py`](https://github.com/bradautomates/claude-video/blob/main/whisper.py)** when utilizing the external Whisper API.
4. **Response Assembly** – Returns the transcription text and frame paths back to the host environment for analysis.

## Supporting Scripts and Architecture

The main script relies on several specialized modules located in the same directory:

- **[`skills/watch/scripts/download.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/download.py)** – Handles video acquisition and stream extraction.
- **[`skills/watch/scripts/frames.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/frames.py)** – Manages ffmpeg-based frame extraction with automatic FPS calculation.
- **[`skills/watch/scripts/transcribe.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/transcribe.py)** – Performs local transcription using Whisper models.
- **[`skills/watch/scripts/whisper.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/whisper.py)** – Optional wrapper for external Whisper API endpoints.
- **[`skills/watch/SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/SKILL.md)** – Defines the canonical skill contract and `/watch` command metadata.

## Running the Main Script

You can execute the entry point directly for development or standalone usage.

First, clone the repository and install dependencies:

```bash
git clone https://github.com/bradautomates/claude-video.git
cd claude-video
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

```

Then invoke the main script with a video path and optional question:

```bash
python skills/watch/scripts/watch.py path/to/video.mp4 "Summarize the content"

```

For programmatic integration, import the specific helper functions:

```python
from skills.watch.scripts.download import download_video
from skills.watch.scripts.frames import extract_frames
from skills.watch.scripts.transcribe import transcribe_video

video_path = download_video("https://youtu.be/example")
frames_dir = extract_frames(video_path)
transcript = transcribe_video(video_path)

```

## Summary

- The **main script for bradautomates/claude-video** is [`watch.py`](https://github.com/bradautomates/claude-video/blob/main/watch.py) located at [`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py).
- It serves as the entry point for the `/watch` slash command across Claude Code, Codex, and Cursor.
- The script orchestrates download, frame extraction, and transcription by invoking helper modules via relative paths.
- Helper scripts include [`download.py`](https://github.com/bradautomates/claude-video/blob/main/download.py), [`frames.py`](https://github.com/bradautomates/claude-video/blob/main/frames.py), [`transcribe.py`](https://github.com/bradautomates/claude-video/blob/main/transcribe.py), and [`whisper.py`](https://github.com/bradautomates/claude-video/blob/main/whisper.py).

## Frequently Asked Questions

### What is the exact file path for the main script in bradautomates/claude-video?

The main script is **[`skills/watch/scripts/watch.py`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/watch.py)**. This path is relative to the repository root and represents the executable entry point that host environments trigger when processing the `/watch` command.

### Can I run the main script without Claude Code or other AI agents?

Yes. While designed as an Agent Skill, [`watch.py`](https://github.com/bradautomates/claude-video/blob/main/watch.py) can be executed directly as a Python script. It accepts a video URL or file path as the first argument and an optional question as the second argument, making it suitable for command-line usage or integration into other Python applications.

### Which helper scripts does the main watch.py script depend on?

The main script depends on four core helper modules: **[`download.py`](https://github.com/bradautomates/claude-video/blob/main/download.py)** for video acquisition, **[`frames.py`](https://github.com/bradautomates/claude-video/blob/main/frames.py)** for ffmpeg-based frame extraction, **[`transcribe.py`](https://github.com/bradautomates/claude-video/blob/main/transcribe.py)** for local Whisper transcription, and optionally **[`whisper.py`](https://github.com/bradautomates/claude-video/blob/main/whisper.py)** when using the external Whisper API. All helpers reside in the same `skills/watch/scripts/` directory.

### How does the main script locate its helper modules?

The script uses runtime directory resolution via the **`SKILL_DIR`** variable to determine its install location. It then invokes helper scripts using relative paths from this directory, ensuring the skill works regardless of where the repository is cloned on the filesystem.