ondevice-ffmpeg-engine

ondevice-ffmpeg-engine is a skill for Claude Code, Codex from heristop/leclap. It costs 75 tokens per session (1,660 once invoked), scanned A, original, MIT.

A guide for building and using a Rust-based FFmpeg engine that compiles video directly on a device. FFmpeg is software for processing video and audio.

In plain words
What is it for?
Use it when working on the Rust engine, Expo native module, platform bindings, build scripts, or FFmpeg-from-source toolchain.
Why use it?
It supports video processing without a server or uploading the media, while exposing APIs for running, inspecting, checking versions, and cancelling work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/ffmpeg/build-host.sh # builds dist/host/lib/libfftools.a once.

Good fit Use it when working on the Rust engine, Expo native module, platform bindings, build scripts, or FFmpeg-from-source toolchain.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/heristop/leclap
agentmods
npx agentmods add skills/heristop/leclap/ondevice-ffmpeg-engine

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for ondevice-ffmpeg-engine

README.md
[![agentmods](https://agentmods.dev/badge/skills/heristop/leclap/ondevice-ffmpeg-engine.svg)](https://agentmods.dev/skills/heristop/leclap/ondevice-ffmpeg-engine)
Your own site
<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>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,660 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash 5c6b69c3c9d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

.agents/skills/ondevice-ffmpeg-engine/SKILL.md · 81 lines

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 toolchainscripts/ffmpeg/ cross-compiles FFmpeg + deps into static libs (libfftools.a …) per target.
  • Runtime enginepackages/ffmpeg-engine/ (Rust + uniffi) → apps/leclap-expo/modules/leclap-ffmpeg/ (Expo native module, Kotlin + Swift).

Call chain: core FFmpegLeclapAdapter.execute(cmd)parseCommandLeclap.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; args exclude the program name (the shim prepends ffmpeg); captures stderr as log.
  • 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-flight run (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 AbortSignalLeclap.cancel() in CoreCompilationService. Don't add a second engine path — add capabilities to the core command builders, not here.

Read the full file on GitHub · 81 lines

Changes

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.

  1. 8d ago First seen · 81 lines · 75 tokens per session scan A 5c6b69c3c9d0

Subscribe to this mod's changes

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.

Related

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.

joeseesun/qiaomu-cut-skill · 171 tokens

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…

finom/vovk · 276 tokens

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…

Jaycheng1103/chatgpt-video-editing-skills · 96 tokens

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…

Jaycheng1103/chatgpt-video-editing-skills · 81 tokens

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…

broomva/skills · 294 tokens

blitzreels-editing

Edit BlitzReels projects through CLI or REST. Use for timeline, caption, media, preview, or export changes.

blitzreels/agent-skills · 31 tokens