# How to Build the watch.skill Bundle for Uploading to Claude AI

> Learn to build the watch.skill bundle for Claude AI. Follow our guide to generate the ZIP file from the claude-video repository, preparing it for seamless upload.

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

---

**Run `bash skills/watch/scripts/build-skill.sh` from the repository root to generate `dist/watch.skill`, a ZIP bundle ready for upload to Claude AI.**

The `claude-video` repository by `bradautomates` contains a `watch` skill that extends Claude AI with video processing capabilities. To deploy this functionality, you must package the skill into a `.skill` bundle that Claude AI accepts. The repository provides a dedicated build script that automates this packaging while enforcing Claude AI's upload constraints.

## Prerequisites: Clean Git State

The build script enforces repository hygiene. Before running it, ensure all changes are committed, as the script aborts if it detects uncommitted changes using `git diff --quiet`.

## Building the watch.skill Bundle

The bundling process is handled by **[`skills/watch/scripts/build-skill.sh`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/build-skill.sh)**. This script performs five distinct operations to create a reproducible, validated archive.

### 1. Verify Clean Working Tree

The script checks for uncommitted changes using `git diff --quiet`. If the working tree is dirty, it aborts with the error:

```

error: working tree is dirty; commit or stash before building

```

This guarantees the bundle reflects an exact commit state.

### 2. Prepare Output Directory

The script creates the **`dist/`** directory if it does not exist, ensuring the final artifact has a predictable location.

### 3. Archive the Skill Subtree

Using **`git archive`**, the script compresses the `skills/watch` subtree into a ZIP file at **`dist/watch.skill`**. It applies the `--prefix=watch/` flag so the archive contains a single top-level directory housing [`SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/SKILL.md) and the entire `scripts/` runtime.

### 4. Validate Bundle Constraints

The script enforces two hard limits imposed by Claude AI:

- **File count**: Aborts if the ZIP contains more than 200 files
- **SKILL.md presence**: Verifies exactly one [`SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/SKILL.md) exists in the bundle

### 5. Report Build Metrics

Upon success, the script prints the file count, size, and upload instructions:

```

built dist/watch.skill (140 files, 1.2M)
upload via the claude.ai skill UI

```

## Running the Build Command

Execute the script from any location within the repository:

```bash

# From repository root

bash skills/watch/scripts/build-skill.sh

```

## Key Files in the Bundle Process

- **[`skills/watch/scripts/build-skill.sh`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/build-skill.sh)**: The build automation script that orchestrates the packaging
- **[`skills/watch/SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/SKILL.md)**: The canonical skill definition included in the archive
- **`dist/watch.skill`**: The generated output file (ZIP format) ready for upload

## Summary

- The `watch.skill` bundle is built via **[`skills/watch/scripts/build-skill.sh`](https://github.com/bradautomates/claude-video/blob/main/skills/watch/scripts/build-skill.sh)**
- The script requires a clean Git state to ensure reproducible builds
- Output is written to **`dist/watch.skill`** as a ZIP archive with the `watch/` prefix
- Claude AI constraints are enforced: maximum 200 files and exactly one [`SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/SKILL.md)
- The bundle contains the entire `skills/watch` subtree including runtime scripts

## Frequently Asked Questions

### What is the watch.skill file format?

The `watch.skill` file is a ZIP archive generated by `git archive`. It contains a top-level `watch/` directory with [`SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/SKILL.md) and the `scripts/` folder. The format is readable by Claude AI's skill upload interface.

### Why does the build script require a clean Git state?

The script uses `git diff --quiet` to verify no uncommitted changes exist. This ensures the bundle reflects a specific commit, making builds reproducible and preventing accidental inclusion of untracked development files.

### What happens if my skill has more than 200 files?

The build script counts files in the ZIP and aborts with an error if the total exceeds 200. This enforces Claude AI's hard limit for skill bundles. You must reduce the file count in `skills/watch/` before rebuilding.

### Can I build the bundle manually without the script?

While possible, manual construction is discouraged. The script uses `git archive` with specific flags (`--prefix=watch/`) to ensure the correct internal structure. Manual ZIP creation risks violating the [`SKILL.md`](https://github.com/bradautomates/claude-video/blob/main/SKILL.md) placement or file count requirements that Claude AI validates during upload.