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/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/heristop/leclap/ondevice-ffmpeg-engine"><img src="https://agentmods.dev/badge/skills/heristop/leclap/ondevice-ffmpeg-engine.svg" alt="Reviewed on agentmods" width="80" 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.02327 |
| Opus 5.5 | $0.00030 | $0.00931 |
| Sonnet 5.5 | $0.00015 | $0.00465 |
| Haiku 4.5 | $0.00007 | $0.00233 |
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 21d 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 — 88 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 renders video on-device (no compile server or render upload; remote assets can still require downloads) 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 FFmpegDeviceAdapter.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 wraps the Expo native module, whose Kotlin/Swift bridges call the generated 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. run and probe serialize behind a process-global ENGINE_LOCK (fftools hold global state). cancel deliberately bypasses the lock so it can stop a running invocation; version also does not take it. Cancellation does not affect probe. Empty argv or an interior NUL returns the Rust ARGV_ERROR sentinel (-2) before invoking fftools.
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.
- 21d ago Changed · +4 lines 46c95e73591a
- 24d ago Changed · +3 lines cdf1b074929e
- 1mo 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 (36 stars, last pushed 4d ago), licensed MIT. It adds 75 tokens to every session and 2,327 once invoked, about $0.0003 per session on Opus 5.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
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…
qiaomu-cut
A workflow for turning a brief video idea into a planned, sourced, edited, rendered, and checked video project.
react-native-native-modules
Writing native code for React Native's New Architecture — choosing between Turbo Modules, Fabric components, Expo Modules and Nitro, Codegen specs, Kotlin and Objective-C++/Swift implementations, events, threading, and scaffolding/publishing libraries with create-react-native-library.
no-bare-casts
Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.