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/heristop/leclapnpx agentmods add skills/heristop/leclap/ondevice-ffmpeg-engineWrote 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/heristop/leclap/ondevice-ffmpeg-engine)<a href="https://agentmods.dev/skills/heristop/leclap/ondevice-ffmpeg-engine"><img src="https://agentmods.dev/badge/skills/heristop/leclap/ondevice-ffmpeg-engine.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00075 | $0.01660 |
| Opus 5 | $0.00037 | $0.00830 |
| Sonnet 5 | $0.00015 | $0.00332 |
| Haiku 4.5 | $0.00007 | $0.00166 |
Grade A, and why
ondevice-ffmpeg-engine scanned grade A with 0 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 8d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
On-Device FFmpeg Engine
Overview
The Expo app compiles video fully on-device (no server, no upload) by running real FFmpeg in-process through a Rust engine that statically links patched FFmpeg fftools. The same ffmpeg-video-composer core that drives Node/WASM drives this engine via one more AbstractFFmpeg implementation. Full architecture + boundary contracts: docs/on-device-compilation.md.
Two halves:
- Build toolchain —
scripts/ffmpeg/cross-compiles FFmpeg + deps into static libs (libfftools.a…) per target. - Runtime engine —
packages/ffmpeg-engine/(Rust + uniffi) →apps/leclap-expo/modules/leclap-ffmpeg/(Expo native module, Kotlin + Swift).
Call chain: core FFmpegLeclapAdapter.execute(cmd) → parseCommand → Leclap.run(argv) (native module) → uniffi → Rust lib.rs → C shim ffmpeg_shim.c → patched ffmpeg_main/ffprobe_main.
API surface (the native module / Rust uniffi exports)
apps/leclap-expo/modules/leclap-ffmpeg/index.ts re-exports the uniffi functions:
run(args: string[]): Promise<{ code, log }>— runs ffmpeg;argsexclude the program name (the shim prependsffmpeg); captures stderr aslog.probe(args: string[]): Promise<{ code, output }>— runs ffprobe; captures stdout (-print_format json).version(): string— FFmpeg build version; also the presence probe (ffmpegAvailability.ts).cancel(): void— cooperative cancel of the in-flightrun(sets fftools' shutdown flags; the run exits ~as on SIGTERM, returns 255). No-op when idle.
No shell is ever involved — run/probe invoke ffmpeg_main/ffprobe_main in-process with an argv array. All calls serialize behind a process-global ENGINE_LOCK (fftools hold global state).
Consuming it from the core
The core stays Expo-free: CoreCompilationService injects { run: Leclap.run, probe: Leclap.probe } as the NativeEngine into compileReactNative(...); FFmpegLeclapAdapter is the AbstractFFmpeg. Cancellation is wired from an AbortSignal → Leclap.cancel() in CoreCompilationService. Don't add a second engine path — add capabilities to the core command builders, not here.
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.
- 8d ago First seen · 81 lines · 75 tokens per session scan A 5c6b69c3c9d0
ondevice-ffmpeg-engine is a skill published in the GitHub repository heristop/leclap (24 stars, last pushed 12d ago), licensed MIT. It adds 75 tokens to every session and 1,660 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
qiaomu-cut
A workflow for turning a brief video idea into a planned, sourced, edited, rendered, and checked video project.
rust
The Vovk.ts Rust client — generating a typed Rust crate from a Vovk API with vovk-rust, the rs / rsSrc templates, the generated async call shape using reqwest + serde, JSON + JSON Lines (futures Stream) consumption, client-side validation, and crates.io publishing. Use whenever the user wants a typed Rust SDK, ongoing…
chatgpt-video-editing-setup
Set up, repair, or verify the local AI short-video environment: video-use, FFmpeg, the Source Han Sans TW subtitle font, ElevenLabs credentials, and optional HyperFrames skills. Use whenever a user asks to install, configure, fix, reconnect, or check this editing environment. Do not use for Premiere or CapCut help, or…
chatgpt-short-video-editor
Edit a user-supplied video into a vertical Reel, Short, TikTok, video diary short, or an approved eight-step AI short-video workflow. Use when the user provides or points to media and asks to transcribe, cut, subtitle, preview, or export a vertical short. Do not use for environment-only setup or generic Premiere Pro…
video-cut
Edit raw footage into a finished cut by conversation, fully local. Drop clips in a folder, describe the video you want, get edit/final.mp4 back. Local-first raw-footage video editor — the editorial counterpart to the generative Remotion/launch-video skills. Uses a two-layer reading system (local fasterwhisper…
blitzreels-editing
Edit BlitzReels projects through CLI or REST. Use for timeline, caption, media, preview, or export changes.