install-media-tools
Skill1 starsChanged 3 months agoMITView on GitHub
Detect, verify, and install media processing binaries (ffmpeg, ImageMagick, exiftool, tesseract, yt-dlp, uv) on macOS and Linux. Use before other mediaskills when doctor reports missing tools, when ffprobe/ffmpeg is not found, or when setting up a fresh dev machine or CI runner.
- Pipes a download into a shell
- Installs packages
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- site/AGENTS.mdAGENTS.md
- site/CLAUDE.mdCLAUDE.md
- audioSkill
- captions-complianceSkill
- downloadSkill
- forced-narrative-exactSkill
- imageSkill
- inspectSkill
- program-masterSkill
- shotsSkill
- speech-captionsSkill
- subtitlesSkill
- timecodeSkill
- video-transformationSkill
- vision-analysisSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 67
If your tools showed a filesystem path when loading this SKILL.md, strip SKILL.md and use that folder.
- Very specific: line 68
If you already ran another mediaskills script (for example .../audio/scripts/extract.py), this skill is a sibling of that folder: same …
- Very specific: line 91
Prefer absolute paths for --input / --output when cwd is uncertain.
- Distinctive: line 96
Before running any script, treat these two failures differently:
- Very specific: line 99
Only escalate sandbox permissions if the error is explicitly a permission denial (e.g.
- Very specific: line 115
When healthy is false, run install or install missing packages manually.
- Very specific: line 134
Use data.skill_directory from the JSON (a real absolute path) with uv run.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Install media tools
Bootstrap the system binaries other mediaskills depend on. These scripts run in plain bash so they work before uv is installed.
When to use
- First setup — run
doctor.shon a new machine or CI runner before usinginspect,audio,video-transformation, etc. - Missing binary errors — when another skill returns
ffmpeg not foundor exit code 2. - Path debugging — use
which.shto confirm which binary the agent shell resolves. - Not for Python deps — other skills use
uv runwith PEP 723 inline deps; this skill only installs OS-level tools.
Output paths (all skills)
Script outputs always land under the workspace root .mediaskills/ — never inside .agents/skills/<skill>/:
| Subfolder | Used by |
generated/ | Most skills — manifests, reports, frames, transcodes, captions, etc. |
downloads/ | download skill — fetched media |
Paths resolve from the repo root even when you cd into a skill folder. Override with $MEDIASKILLS_DATA_DIR for a custom base directory.
Toolchain overview
| Tool | Provided by | Used by |
ffmpeg / ffprobe | ffmpeg package | inspect, audio, video-transformation, shots, speech-captions |
convert / magick | ImageMagick | image, vision-analysis |
exiftool | ExifTool | image EXIF, metadata workflows |
tesseract | Tesseract OCR | image OCR, vision-analysis |
yt-dlp | yt-dlp | download skill |
uv | uv | running Python skill scripts |
doctor.sh checks for ffmpeg, ffprobe, convert (ImageMagick CLI), exiftool, tesseract, yt-dlp, and uv. ImageMagick installs as convert on most platforms — there is no standalone imagemagick binary.
Gotchas
- ImageMagick vs GraphicsMagick — mediaskills expect ImageMagick (
convertormagick). Do not substitute GraphicsMagick. - Debian/Ubuntu
convertconflicts — some minimal images ship without ImageMagick; the package name isimagemagick, binary isconvert. - Tesseract language packs — default install is English only. For other OCR languages:
brew install tesseract-lang(macOS) orapt install tesseract-ocr-<lang>(Debian). - ffmpeg builds vary — Homebrew and distro packages include most codecs; static builds from third parties may lack libx264. Prefer official package managers for dev/CI.
- yt-dlp updates frequently —
brew upgrade yt-dlporpip install -U yt-dlpif downloads fail due to site changes. - uv is optional for bash scripts — only needed to run Python skills (
uv run <skill_directory>/scripts/...).
Running scripts
This skill's scripts live in scripts/ alongside this file. Before running any script, resolve its absolute path from this skill's own directory — do not assume the shell cwd is the skill folder, the repo root, or the workspace (skills/install-media-tools/... is only valid inside this git checkout). Stay in the workspace and pass the absolute script path to bash:
bash <skill_directory>/scripts/doctor.sh<skill_directory> is a placeholder. Never pass those angle brackets to the shell — the command will fail. Replace it with a real absolute directory before invoking bash.
How to get that directory (do this yourself; do not ask the user first; do not skip the skill):
- If your tools showed a filesystem path when loading this
SKILL.md, stripSKILL.mdand use that folder. - If you already ran another mediaskills script (for example
.../audio/scripts/extract.py), this skill is a sibling of that folder: same parent, directory nameinstall-media-tools. - Otherwise search standard install locations and confirm the script exists:
NAME=install-media-tools
for d in \
"$HOME/.agents/skills/$NAME" \
"$HOME/.cursor/skills/$NAME" \
"$HOME/.codex/skills/$NAME" \
"$HOME/.claude/skills/$NAME" \
"$PWD/.agents/skills/$NAME" \
"$PWD/.cursor/skills/$NAME" \
"$PWD/skills/$NAME"
do
if [ -f "$d/SKILL.md" ] && [ -e "$d/scripts/doctor.sh" ]; then
SKILL_DIR=$(cd "$d" && pwd)
break
fi
done
[ -n "$SKILL_DIR" ] || { echo "mediaskills: $NAME not found" >&2; exit 1; }
bash "$SKILL_DIR/scripts/doctor.sh"Prefer absolute paths for --input / --output when cwd is uncertain.
Missing binaries vs permissions
Before running any script, treat these two failures differently:
- If a required binary (
bash,python3) reportsNo such file or directoryorcommand not found: this is a missing or unreachable binary, not a permissions issue. Escalating sandbox permissions will not fix it. Runcommand -v bashandcommand -v python3to see whether they resolve at all. If not, tell the user to install those shells/tools rather than retrying with wider permissions. This skill's bash scripts do not needuv. Usedoctor.shto see which media binaries are missing; do not treatcommand not foundas a sandbox problem. - Only escalate sandbox permissions if the error is explicitly a permission denial (e.g.
Operation not permitted,Permission denied).
Recipes
Check what's installed
bash <skill_directory>/scripts/doctor.shExample (partial install):
{"ok": true, "op": "install-media-tools.doctor", "data": {"healthy": false, "installed": ["ffmpeg", "ffprobe"], "missing": ["convert", "exiftool", "tesseract", "yt-dlp", "uv"], "platform": "darwin"}, "output_paths": []}When healthy is false, run install or install missing packages manually.
Install via script (macOS or Debian/Ubuntu)
bash <skill_directory>/scripts/install.sh- macOS — uses Homebrew:
brew install ffmpeg imagemagick exiftool tesseract yt-dlp uv - Debian/Ubuntu — uses
apt-get(may prompt for sudo):ffmpeg imagemagick libimage-exiftool-perl tesseract-ocr, then installsyt-dlpanduvvia official install scripts when missing
Re-run doctor.sh after install to confirm.
Locate another skill directory
bash <skill_directory>/scripts/locate-skill.sh --skill speech-captionsUse data.skill_directory from the JSON (a real absolute path) with uv run. Do not pass the <skill_directory> placeholder through to the shell.
List detected tools only
bash <skill_directory>/scripts/detect-tools.shResolve a binary path
bash <skill_directory>/scripts/which.sh --tool ffmpeg
# or
bash <skill_directory>/scripts/which.sh --args '{"tool": "ffmpeg"}'Manual install (by platform)
macOS (Homebrew)
brew install ffmpeg imagemagick exiftool tesseract yt-dlp uvOptional OCR languages: brew install tesseract-lang
Debian / Ubuntu
sudo apt-get update
sudo apt-get install -y ffmpeg imagemagick libimage-exiftool-perl tesseract-ocr
# yt-dlp (pick one)
sudo apt-get install -y yt-dlp # if available in your release
# or: sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && sudo chmod a+rx /usr/local/bin/yt-dlp
# uv
curl -LsSf https://astral.sh/uv/install.sh | shFedora / RHEL
sudo dnf install -y ffmpeg ImageMagick perl-Image-ExifTool tesseract
pip install yt-dlp # or use COPR / static binary
curl -LsSf https://astral.sh/uv/install.sh | shVerify versions
ffmpeg -version | head -1
convert -version | head -1 # or: magick -version
exiftool -ver
tesseract --version | head -1
yt-dlp --version
uv --versionTroubleshooting
| Symptom | Likely cause | Action |
ffmpeg not found after install | PATH not updated | Open new shell; run which.sh --tool ffmpeg |
convert: not authorized (ImageMagick) | Policy blocks read/write | Edit /etc/ImageMagick-6/policy.xml or policy path from convert -list policy |
tesseract missing language | Language pack not installed | Install tesseract-ocr-<lang> or tesseract-lang |
yt-dlp HTTP 403 | Outdated binary | Upgrade yt-dlp |
uv: command not found after curl install | ~/.local/bin not on PATH | Add export PATH="$HOME/.local/bin:$PATH" to shell profile |
| brew install fails on Linux | Homebrew on Linux needs build deps | Prefer native apt/dnf commands above |
Available scripts
| Script | Purpose |
scripts/doctor.sh | Health check — lists installed vs missing tools |
scripts/install.sh | Attempt automated install (brew or apt + yt-dlp/uv bootstrap) |
scripts/detect-tools.sh | List tools currently on PATH |
scripts/which.sh | Resolve full path for one tool name |
scripts/locate-skill.sh | Find an installed mediaskills skill directory (--skill <name>) |
Acceptance checks (agent must pass before delivery)
- Contract: exit 0,
ok: truefromdoctor.sh/install.shJSON. - Skill gate: re-run
doctor.shafter install; required tools for the next skill are listed ininstalled(notmissing). - On failure: install missing tools or escalate; do not start media skills while core binaries are missing.
Do not use for
- Media processing itself (install tools, then use other skills)
- Windows auto-install (manual ffmpeg/uv install on Windows)
Related skills
inspect— first skill to try after doctor passes ffmpeg/ffprobedownload— requires yt-dlpimage,speech-captions,vision-analysis— require additional tools from this skill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

