core-architecture-patterns

core-architecture-patterns is a skill for Claude Code, Codex from heristop/leclap. It costs 58 tokens per session (1,674 once invoked), scanned A, original, MIT.

A set of development rules for the FFmpeg video composer package, which builds videos from sections, media, effects, and audio. It explains how platform adapters, dependency injection, and the video-building pipeline fit together.

In plain words
What is it for?
Use it when adding video section types, platform adapters, editor managers, core services, or new dependencies to the package's dependency container.
Why use it?
It helps developers add features in the same way as the existing system instead of wiring components inconsistently. This reduces integration errors when extending the video composer.

Skill for Claude CodeCodex

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

Good fit Use it when adding video section types, platform adapters, editor managers, core services, or new dependencies to the package's dependency container.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/heristop/leclap/core-architecture-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add heristop/leclap --skill core-architecture-patterns
Clone the repo
git clone --depth 1 https://github.com/heristop/leclap

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 core-architecture-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/heristop/leclap/core-architecture-patterns.svg)](https://agentmods.dev/skills/heristop/leclap/core-architecture-patterns)
Your own site
<a href="https://agentmods.dev/skills/heristop/leclap/core-architecture-patterns"><img src="https://agentmods.dev/badge/skills/heristop/leclap/core-architecture-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,674 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.00058 $0.01674
Opus 5 $0.00029 $0.00837
Sonnet 5 $0.00012 $0.00335
Haiku 4.5 $0.00006 $0.00167

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

Security

Grade A, and why

core-architecture-patterns 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 7d 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/core-architecture-patterns/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Core Architecture Patterns

Overview

packages/ffmpeg-video-composer is built from a few repeating patterns: adapters abstract the platform, the PlatformBridge selects them at runtime, tsyringe DI wires everything, and a director → builder → segments → managers pipeline compiles a template. Follow these patterns; reuse existing pieces before adding new ones. Full design: docs/architecture.md.

The pipeline

TemplateDirector (packages/ffmpeg-video-composer/src/director/TemplateDirector.ts) orchestrates: init → build each section → concat → apply music.

  • Sections created by SegmentFactory (editor/factories/SegmentFactory.ts) → rendered by *Segment classes (editor/segments/).
  • FFmpeg commands assembled by editor managers (editor/managers/): asset, variable, map, filter, formatter.
  • VideoEditor concatenates; MusicComposer mixes audio.

Adding a segment type

  1. Add the section schema variant in packages/ffmpeg-video-composer/src/schemas/template.schemas.ts (extend BaseSectionSchema, add to the SectionSchema discriminated union).
  2. Create editor/segments/<Name>Segment.ts following an existing segment (e.g. VideoSegment.ts); use @injectable().
  3. Register it in editor/factories/SegmentFactory.ts (map the new type literal → class).
  4. Add a test under packages/ffmpeg-video-composer/tests/.

Adding a descriptor effect

A structured-sugar effect (a look/grade/motion/section-audio field — not a raw filters[] escape hatch) follows this recipe end to end, proven across Phases 1-4 (LUT looks, chroma key, overlay motion, grain, letterbox, stylized looks, shake/pulse, audioEffect):

  1. Schema field — add the field/variant in packages/ffmpeg-video-composer/src/schemas/*.schemas.ts (effects-visual.schemas.ts for GradeSchema/LOOK_PRESETS/MotionEffectSchema; section.schemas.ts for section-level fields like letterbox/audioEffect); update src/core/descriptor-visual.d.ts types. Every field keeps a .describe() — it feeds docs/template-descriptor.schema.json.
  2. Preset / lowering fn — a pure *ToFilters function or a LOOK_TABLE/MOTION_HANDLERS row in src/editor/presets/ (looks.ts, motion.ts). LGPL discipline: never emit eq/geq/boxblur; reuse eqValueToLutyuv for eq-equivalent maths on the LGPL engine. A section-audio effect instead extends the -af chain builder in src/editor/utils/audio-fade.ts.
  3. Registry entry — wire the compiler into SUGAR_COMPILERS in src/editor/presets/registry.ts (ordered layers → motion → grade → look → letterbox → caption → titleCard → lowerThird — pick an order between the neighbours it must sit next to), a LOOK_TABLE row, or a MOTION_HANDLERS entry.
  4. Tests — TDD: exact command-string/filter-array assertions first, in the matching suite (tests/looks.test.ts, the motion or audio-fade tests). Then a real-compile fixture: JSON under packages/ffmpeg-video-composer/tests/fixtures/ + an id added to effects-fixtures.test.ts's FIXTURES array (validates against the schema AND smoke-compiles through the Node engine — rc 0).
  5. LGPL audit — any new FFmpeg filter name goes into BOTH ENGINE_EMITTED_FILTERS (src/editor/utils/filter-compat.ts) AND the --enable-filter= list in scripts/ffmpeg/common.sh; tests/lgpl-filter-audit.test.ts cross-checks the two and fails the build if they drift.
  6. Regenpnpm --filter ffmpeg-video-composer generate:schema (writes docs/template-descriptor.schema.json) and generate:capabilities, in the same commit as the schema change.
  7. Builder exposure — a FEATURE_CONTROLS entry in packages/leclap-creative-kit/src/editor/control-metadata.ts. If the field is new on the creative-kit section model (not already flowing through an existing inferred type like Grade/MotionEffect), also wire model.ts / build-descriptor-fragments.ts / to-editor-state.ts for build/rehydrate round-tripping. Then the web panel (apps/leclap-web/src/presentation/components/admin/editor/*Panel.tsx) + Expo panel (apps/leclap-expo/src/features/templates/components/*Fields.tsx) + i18n keys in all five locales, in both apps.
  8. Docs — add the field to docs/template-configuration.md in the same commit as the schema regen (this is the field reference authors read; authoring-video-templates/SKILL.md links to it).
  9. Device rebuild — a NEW FFmpeg filter (not just a descriptor field reusing filters already shipped) needs the on-device engines rebuilt before it works in the app: scripts/ffmpeg/build-engine.sh android then ios (sequential, never concurrent). The LGPL audit only proves the filter can run on the LGPL config — the currently-shipped .so/xcframework binaries don't have it until they're rebuilt.

Read the full file on GitHub · 75 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. 7d ago First seen · 75 lines · 58 tokens per session scan A 178295ed2811

Subscribe to this mod's changes

core-architecture-patterns is a skill published in the GitHub repository heristop/leclap (24 stars, last pushed 11d ago), licensed MIT. It adds 58 tokens to every session and 1,674 once invoked, about $0.0003 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

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-streaming-expert

Expert in video streaming technologies, HLS, DASH, adaptive bitrate streaming, CDN delivery, DRM protection, and video encoding/transcoding. Use when the user mentions video, streaming, media, WebRTC, multimedia, or HLS, or when the task involves Streaming Protocols, Adaptive Bitrate Streaming, FFmpeg Video…

personamanagmentlayer/pcl · 79 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