Agent skill

Video Compress To Size

by godot-fun in godot-fun/gai

Compresses a single video file to stay under a user-specified max file size using FFmpeg.

MITAuto-check passedMedia & Creative

Install Video Compress To Size

skills CLI
$ npx skills add godot-fun/gai --skill video-compress-to-size -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install godot-fun/gai video-compress-to-size --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/godot-fun/gai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/video-compress-to-size .claude/skills/video-compress-to-size && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
video-compress-to-size
GitHub stars
183
Token cost
~973 tokens
SKILL.md length
352 words
Files
2
Skills in repo
36
Repo updated
First seen
Licence
MIT

At a glance

Compresses a single video file to stay under a user-specified max file size using FFmpeg.

  • Works in 8 steps: Use the bundled script, not hand-written… → Always pass --max-size from the user… → Prefer GPU — do not pass --cpu unless… → …
  • The user wants to compress video
  • SKILL.md covers Rules, Quick Start, Size Syntax and Format Defaults, plus 3 more sections
  • Calls python

What it does

Video Compress To Size is an agent skill from godot-fun/gai. Compresses a single video file to stay under a user-specified max file size using FFmpeg. Prefers GPU encoders (NVENC / AMF / QSV) with VBR bitrate targeting; falls back to CPU two-pass H.264/HEVC. Use when the user wants to compress video, reduce video file size, shrink MP4/MKV/MOV under N MB, GPU encode, NVENC compress, or re-encode a clip to a size limit.

Its SKILL.md is about 970 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `reference.md`).

It sits in Media & Creative, covering Video production. It works with FFmpeg and Python. The repository describes itself as: A lightweight AI agent and skill workflow framework built with Godot. The licence is MIT.

When your agent uses it

  • The user wants to compress video
  • Reduce video file size
  • Shrink MP4/MKV/MOV under N MB
  • Re-encode a clip to a size limit

Example prompts

  • “Use the video-compress-to-size skill to compress a single video file to stay under a user-specified max file size using FFmpeg”
  • “/video-compress-to-size”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Use the bundled script, not hand-written ffmpeg commands.
  2. Always pass --max-size from the user (ask if missing). Prefer their unit wording; bare numbers are MB.
  3. Prefer GPU — do not pass --cpu unless the user asks or GPU encode fails.
  4. Do not downscale or change fps unless the user asks.
  5. Sources already ≤ max size are skipped.
  6. Tell the user where video-compress-to-size/ files are; they swap assets manually when ready.
  7. Missing Python/FFmpeg → populate .dependency/ per skill-dependency-manager, retry same command.
  8. Pipeline details: reference.md

What it can do on your machine

Read from SKILL.md and the folder at commit 6394686. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Video Compress To Size loads about 973 tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 352 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~973

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from godot-fun/gai at commit 6394686, republished under its MIT licence (© godot-fun). 352 words, ~973 tokens.

Download SKILL.mdSave it as .claude/skills/video-compress-to-size/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
video-compress-to-size
description
Compresses a single video file to stay under a user-specified max file size using FFmpeg. Prefers GPU encoders (NVENC / AMF / QSV) with VBR bitrate targeting; falls back to CPU two-pass H.264/HEVC. Use when the user wants to compress video, reduce video file size, shrink MP4/MKV/MOV under N MB, GPU encode, NVENC compress, or re-encode a clip to a size limit.

Video Compress To Size

Re-encode a supported video so the output is at or under a given max file size.

Default: probe and use a GPU encoder when available (NVIDIA NVENC → AMD AMF → Intel QSV), single-pass VBR. If no GPU works, fall back to CPU two-pass (libx264 / libx265).

Rules

When this skill applies, read and follow skill-dependency-manager — run scripts as documented, install missing tools into .dependency/.

  • Run compress.py through .dependency/python/python.exe. Never use host python / ffmpeg.
  • Never overwrite sources. Outputs go under video-compress-to-size/.
  • Use the bundled script — do not hand-write equivalent FFmpeg commands.
  • One file per run — pass --video with a single file; repeat for each clip in a batch.

Quick Start

bash
.dependency/python/python .ai/video-compress-to-size/compress.py --video path/to/clip.mp4 --max-size 50MB

Bare numbers mean MB (--max-size 50 ≡ 50MB):

bash
.dependency/python/python .ai/video-compress-to-size/compress.py --video assets/intro.mp4 --max-size 50

Example:

assets/video/intro.mp4
  → assets/video/video-compress-to-size/intro.mp4

Force CPU (slow, more precise two-pass):

bash
.dependency/python/python .ai/video-compress-to-size/compress.py --video clip.mp4 --max-size 50MB --cpu

Size Syntax

InputMeaning
50 / 50MB / 50M50 mebibytes (1024² bytes)
500KB / 500K500 kibibytes
1GB / 1G1 gibibyte
52428800Bexact bytes

--max-size is required.

Format Defaults

SettingDefaultNotes
EncoderGPU firsth264_nvenc → h264_amf → h264_qsv → libx264
HEVC--hevcSame order with hevc_* / libx265
Container.mp4Always MP4
AudioAAC 128kLowered automatically on tiny budgets
PresetmediumMapped (e.g. NVENC p4); override with --preset
Already under limitSkipped[skip] … (already under limit)
Safety marginGPU ~90% / CPU ~92%Headroom for mux / VBR overshoot
Show full SKILL.md (143 more words)Show less

Common Flags

--video · --max-size · -o / --output · --audio-bitrate · --preset · --hevc · --cpu

Custom output path:

bash
.dependency/python/python .ai/video-compress-to-size/compress.py --video clip.mp4 --max-size 50MB -o out/clip.mp4

Never overwrite source files. Input must be a single video file (--video), not a directory. Supported inputs: .mp4, .mkv, .mov, .avi, .webm, .wmv, .flv, .m4v, .mpeg, .mpg, .ts, .mts, .m2ts, .3gp, .ogv.

Agent Notes

  1. Use the bundled script, not hand-written ffmpeg commands.
  2. Always pass --max-size from the user (ask if missing). Prefer their unit wording; bare numbers are MB.
  3. Prefer GPU — do not pass --cpu unless the user asks or GPU encode fails.
  4. Do not downscale or change fps unless the user asks.
  5. Sources already ≤ max size are skipped.
  6. Tell the user where video-compress-to-size/ files are; they swap assets manually when ready.
  7. Missing Python/FFmpeg → populate .dependency/ per skill-dependency-manager, retry same command.
  8. Pipeline details: reference.md

Tests

From repo root:

bash
.dependency/python/python .ai/video-compress-to-size/test_compress.py

Manual CLI examples: cli/video-compress-to-size.md

© godot-fun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/video-compress-to-size of godot-fun/gai.

  • SKILL.md
  • reference.md

Open the folder on GitHubat commit 6394686

Compare with similar skills

Video Compress To Size next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Video Compress To Size compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Video Compress To Size this skillgodot-fun/gai183—~973Automated safety check: PassMIT
Vox DirectorAlisa0808/vox-director2.2k—~5.6kAutomated safety check: PassMIT
Ffmpeg Skillkajisho5/ffmpeg-skill1.9k—~7.4kAutomated safety check: PassMIT
OpenStoryline Install HelperFireRedTeam/FireRed-OpenStoryline3.5k—~1.5kAutomated safety check: NotesApache-2.0
Cassette Video EditCassette-Editor/oh-my-cassette1191 repos~3.4kAutomated safety check: PassMIT
Whiteboard Videognipbao/codex-whiteboard-video-skill327—~7.2kAutomated safety check: NotesMIT

Similar skills

  • Vox Director

    Alisa0808/vox-director

    Turn ONE topic into a finished Vox-style paper-collage explainer / ad video, end to end on the Atlas Cloud API + local ffmpeg — script, collage keyframes, motion, voice-over, music, captions, all…

    2.2k GitHub stars~5.6k tokensUpdated 5 days ago
    Media & CreativeAuto-check passed
  • Ffmpeg Skill

    kajisho5/ffmpeg-skill

    Edit video and audio with local FFmpeg from natural-language requests: cut, trim, join, resize/reframe (9:16, 1:1), speed change, captions and subtitles (SRT/ASS, animated, karaoke), logos and text…

    1.9k GitHub stars~7.4k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • OpenStoryline Install Helper

    FireRedTeam/FireRed-OpenStoryline

    Installs, repairs and starts a local source checkout of FireRed-OpenStoryline, from prerequisites and a venv to resources, config and the MCP and web servers.

    3.5k GitHub stars~1.5k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes
  • Cassette Video Edit

    Cassette-Editor/oh-my-cassette

    Edit, trim, cut, caption, subtitle, reframe, combine, add background music to, or export video, audio, and image files through Cassette.

    119 GitHub starsUsed in 1 repo~3.4k tokens
    Media & CreativeAuto-check passed
  • Whiteboard Video

    gnipbao/codex-whiteboard-video-skill

    Generate smooth hand-drawn whiteboard and story videos directly inside Codex from text scripts, GPT Image 2 color storyboards, scene plans, SVGs, line art, or local images.

    327 GitHub stars~7.2k tokensUpdated 1 mo ago
    Media & CreativeAuto-check: notes
  • Muapi Director

    Anil-matcha/vox-ai-motion-graphics-generator

    Turn ONE topic, talking-head video, or photo into a finished Vox-style paper-collage explainer / ad video on the MuAPI platform (api.muapi.ai) + local ffmpeg — script, collage keyframes, motion…

    246 GitHub stars~679 tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed

More from godot-fun/gai

All 36 skills in this repo
  • AI Text To Speech

    godot-fun/gai

    Zero-shot text-to-speech with voice cloning via IndexTTS2 (index-tts).

    184 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Audio Denoise

    godot-fun/gai

    Reduces background noise in a single audio file using FFmpeg afftdn.

    184 GitHub stars~465 tokensUpdated today
    Auto-check passed
  • Audio Fade

    godot-fun/gai

    Applies fade-in and fade-out at the start and end of a single audio file using FFmpeg.

    184 GitHub stars~652 tokensUpdated today
    Auto-check passed
  • Normalizes a single audio file to consistent LUFS loudness with true-peak limiting using FFmpeg.

    184 GitHub stars~684 tokensUpdated today
    Auto-check passed
  • Standardizes a single audio file to 44100 or 48000 Hz and exports 16-bit PCM WAV using FFmpeg.

    184 GitHub stars~638 tokensUpdated today
    Auto-check passed
  • Audio Split

    godot-fun/gai

    Splits a single audio file into two segments (part 1 before the split point, part 2 after) using FFmpeg.

    184 GitHub stars~554 tokensUpdated today
    Auto-check passed

Works with

Questions about Video Compress To Size

What does Video Compress To Size do?

Compresses a single video file to stay under a user-specified max file size using FFmpeg. Video Compress To Size is an agent skill from godot-fun/gai. Compresses a single video file to stay under a user-specified max file size using FFmpeg.

When should I use Video Compress To Size?

Video Compress To Size fits situations like: the user wants to compress video; reduce video file size; shrink MP4/MKV/MOV under N MB; re-encode a clip to a size limit.

How do I install Video Compress To Size in Claude Code?

Run `npx skills add godot-fun/gai --skill video-compress-to-size -a claude-code`. Or copy the skill folder (.agents/skills/video-compress-to-size in godot-fun/gai) into .claude/skills/video-compress-to-size in your project. Claude Code loads it when a task matches its description.

How do I install Video Compress To Size in Codex?

Run `npx skills add godot-fun/gai --skill video-compress-to-size -a codex`. Or copy the skill folder (.agents/skills/video-compress-to-size in godot-fun/gai) into .agents/skills/video-compress-to-size in your project. Codex loads it when a task matches its description.

Can I use Video Compress To Size in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add godot-fun/gai --skill video-compress-to-size -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/video-compress-to-size, .gemini/skills/video-compress-to-size, .github/skills/video-compress-to-size and .opencode/skills/video-compress-to-size in your project.

What does Video Compress To Size need to run?

Going by SKILL.md and its folder, Video Compress To Size needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Video Compress To Size access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Video Compress To Size safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Video Compress To Size use?

Video Compress To Size is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Video Compress To Size use?

About 973 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Video Compress To Size?

Skills that share tags, products or a category with Video Compress To Size: Vox Director (Alisa0808/vox-director, 2.2k stars), Ffmpeg Skill (kajisho5/ffmpeg-skill, 1.9k stars), OpenStoryline Install Helper (FireRedTeam/FireRed-OpenStoryline, 3.5k stars) and Cassette Video Edit (Cassette-Editor/oh-my-cassette, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Video Compress To Size?

godot-fun (a GitHub organization) maintains it in godot-fun/gai, which has 183 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on October 10, 2026.

Source: godot-fun/gai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.