LocalAI is an inference server that runs language, vision, voice, image, and video models through compatible APIs on local hardware. It is used to operate models privately across different hardware, including CPU-only systems, and supports applications, agents, and multi-user services. The catalogue contains instructions for using LocalAI.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/mudler/LocalAInpx agentmods add skills/mudler/localai/assemble-mediaWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mudler/localai/assemble-media)<a href="https://agentmods.dev/skills/mudler/localai/assemble-media"><img src="https://agentmods.dev/badge/skills/mudler/localai/assemble-media/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mudler/localai/assemble-media"><img src="https://agentmods.dev/badge/skills/mudler/localai/assemble-media.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.06028 |
| Opus 5.5 | $0.00021 | $0.02411 |
| Sonnet 5.5 | $0.00010 | $0.01206 |
| Haiku 4.5 | $0.00005 | $0.00603 |
Grade C, and why
assemble-media scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$dir" Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
p = subprocess.Popen(["ffmpeg", "-y", "-v", "error", "-f", "rawvideo", "-pix_fmt", "rgb24", How it starts
The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Assemble generated media
Generate the pieces with the LocalAI tools, then rework them with the shell tools of the media sandbox: ffmpeg, ffprobe, sox, magick and Python with Pillow. There is no network. Work in the folder where the pieces are.
Find the files
A generation tool returns a ref, a path such as /workspace/home/generated/clip-1a2b3c4d.mp4. Use that exact path; do not guess names. List what exists with ls -lt /workspace/home/generated | head. Write results next to the inputs, with new names (never overwrite a piece), then give the user the output path. A file in that folder can be passed to a tool as an argument (start_image, image, mask, audio).
Loop
- Generate one piece. Do not generate all pieces before checking the first.
- Inspect it:
ffprobefor the facts, one frame grab for the picture (below). Look at the PNG. - If it is wrong (size, length, no audio, bad frame), say so and fix the prompt or the command. Do not retry in a cycle.
- Assemble with the recipes below, then inspect the result the same way.
Inspect
cd /workspace/home/generated
ffprobe -v error -show_entries format=duration:stream=index,codec_type,codec_name,width,height,r_frame_rate,sample_rate,channels -of default=nw=1 a.mp4
ffmpeg -y -v error -ss 1 -i a.mp4 -frames:v 1 a-frame.png
ffmpeg -hide_banner -nostats -i voice.wav -af volumedetect -f null - 2>&1 | grep -E 'mean_volume|max_volume'
Look at a frame PNG with the file tools, or describe it with describe_image.
Join clips
Same codec, size and frame rate (clips of one model and settings), no re-encode:
printf "file '%s'\n" a.mp4 a.mp4 > list.txt
ffmpeg -y -v error -f concat -safe 0 -i list.txt -c copy joined.mp4
Different size, frame rate, codec, or some clips without audio: write this script once, then run sh /tmp/vconcat.sh out.mp4 1280 720 24 a.mp4 b.mp4. It scales each clip to fit with black bars, adds silence to clips with no audio, and joins them.
cat > /tmp/vconcat.sh <<'EOF2'
#!/bin/sh
# usage: vconcat.sh out.mp4 WIDTH HEIGHT FPS clip...
set -e
out=$1; w=$2; h=$3; fps=$4; shift 4
vf="scale=$w:$h:force_original_aspect_ratio=decrease,pad=$w:$h:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=$fps,format=yuv420p"
enc="-c:v libx264 -preset veryfast -crf 20 -c:a aac -ar 48000 -ac 2"
dir=$(mktemp -d); : > "$dir/list.txt"; i=0
for f in "$@"; do
i=$((i+1)); n="$dir/$i.mp4"
if [ -n "$(ffprobe -v error -select_streams a -show_entries stream=index -of csv=p=0 "$f")" ]; then
ffmpeg -y -v error -i "$f" -vf "$vf" $enc "$n"
else
ffmpeg -y -v error -i "$f" -f lavfi -i anullsrc=r=48000:cl=stereo -map 0:v -map 1:a -shortest -vf "$vf" $enc "$n"
fi
echo "file '$n'" >> "$dir/list.txt"
done
ffmpeg -y -v error -f concat -safe 0 -i "$dir/list.txt" -c copy "$out"
rm -rf "$dir"
EOF2
sh /tmp/vconcat.sh joined2.mp4 1280 720 24 a.mp4 b.mp4
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 22d ago First seen · 330 lines · 52 tokens per session scan C bf1ea3cd6e29
assemble-media is a skill published in the GitHub repository mudler/LocalAI (50,663 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 6,028 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.
assemble-media compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| assemble-mediamudler/LocalAI | Skill | 51k | today | MIT | C | 52 | Claude Code, Codex |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 15k | yesterday | CC0-1.0 | A | 113 | Claude Code, Codex |
| sglang-diffusion-performancesgl-project/sglang | Skill | 39k | today | Apache-2.0 | A | 29 | Claude Code, Codex |
| sglang-diffusion-cache-ditsgl-project/sglang | Skill | 39k | today | Apache-2.0 | A | 161 | Claude Code |
| sglang-diffusion-modelopt-quantsgl-project/sglang | Skill | 39k | today | Apache-2.0 | A | 49 | Claude Code, Codex |
| skill-creatorunslothai/unsloth | Skill | 81k | today | Apache-2.0 | A | 26 | Claude Code |
| image-promptingunslothai/unsloth | Skill | 81k | today | Apache-2.0 | A | 23 | Claude Code |