oma-video
Create short-form, explainer, and human-recorded demo videos through the oma video CLI. Routes script, narration, visuals, captions, and an agent-authored Remotion composition into a reproducible run directory. Use for video, shorts, reels, demo, explainer, walkthrough, screencast, video generation, 영상, 숏폼, 쇼츠, 릴스, 데모, 설명 영상.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- oma-video
- description
- Create short-form, explainer, and human-recorded demo videos through the oma video CLI. Routes script, narration, visuals, captions, and an agent-authored Remotion composition into a reproducible run directory. Use for video, shorts, reels, demo, explainer, walkthrough, screencast, video generation, 영상, 숏폼, 쇼츠, 릴스, 데모, 설명 영상.
02 资源文件 14
- 参考文档config/video-config.yaml1.8 KB
- 参考文档resources/checklist.md2.3 KB
- 参考文档resources/execution-protocol.md7.9 KB
- 脚本resources/mpt/driver.py11.8 KB
- 参考文档resources/prompt-tips.md4.5 KB
- 参考文档resources/remotion-authoring/demo.md975 B
- 参考文档resources/remotion-authoring/explainer.md901 B
- 参考文档resources/remotion-authoring/README.md2.9 KB
- 参考文档resources/remotion-authoring/shorts.md1.1 KB
- 参考文档resources/script-schema.md3.5 KB
- 参考文档resources/strudel/package.json464 B
- 参考文档resources/strudel/page.html3.0 KB
- 脚本resources/strudel/render.mjs9.8 KB
- 参考文档resources/vendor-matrix.md6.3 KB
03 SKILL.md 正文
Video Router
Scheduling
When to use
Use this skill for a short/reel, README or code explainer, or demo walkthrough.
| Request | Mode | Default aspect | Required source |
|---|---|---|---|
| Short, reel, social clip | shorts |
9:16 |
Topic or brief |
| README, code, data explanation | explainer |
16:9 |
Topic or source path |
| Demo or walkthrough | demo |
16:9 |
Human recording via --capture |
When NOT to use
Use oma-image for a still image, oma-slide for a deck, oma-voice for
audio only, and oma-explanation for an interactive HTML explainer. Editing an
existing finished video and live streaming are out of scope.
Structural Flow
Inputs are a brief plus optional mode, aspect, locale, captions, visual, voice,
music, duration, compositor, capture path, and seed. Outputs live in
.agents/results/videos/<timestamp>-<shortid>-<mode>/:
script.json,timing.json, andrender-spec.jsonform the deterministic asset bus.- Captions and acquired audio/visual assets are recorded in
manifest.jsonwith hashes, providers, cost, warnings, and exit code. - A successful real render contains
<mode>-<slug>.mp4, an encoded video stream, and a positive ffprobe duration.
OMA_VIDEO_MOCK=1 is a test harness only. It can create deterministic text
placeholders with an .mp4 name; those files are never a user deliverable. A
missing Remotion/MPT toolchain, an un-authored composition, a render error, or
an invalid video fails with diagnostics and leaves the script/render spec for
recovery.
Decide and confirm
Infer mode when clear: short/reel -> shorts; README/code/data/explain ->
explainer; demo/walkthrough/capture -> demo. For a one-line request, state
the inferred mode, aspect, duration, visual strategy, captions, locale, and
voice/music before invoking. Do not make the user complete a questionnaire
when those defaults are clear.
Ask only when it changes the result: an ambiguous mode/source, a required demo recording, or a cost confirmation. Respect an explicit mode, aspect, duration, captions, or voice verbatim.
For a demo, a human records the screen and controls login. --source web --url
provides context only; it never automates login or starts a recorder. Without
--capture, return guided capture instructions and stop.
Logical Operations
Guardrails
- Keep output and capture paths inside
$PWDunless external output is explicitly allowed. Validate capture formats and copy external assets into the run directory. Mask URL query/hash tokens in logs and manifests. - Provider configuration is key-optional: use the configured chain. Paid providers require their environment key and the cost guardrail. Local fallbacks may replace voice, visuals, captions, or music; record coverage in warnings. A compositor failure is never a fallback video.
- Confirm estimated spend at or above
cost.guardrail_usdor--max-usdunless--yesorOMA_VIDEO_YES=1authorizes it. - Respect
limits.max_duration_sec(180) andlimits.max_scenes(40). Cancel subprocess work on SIGINT/SIGTERM. - Keep run directories. Never auto-prune a user’s video artifacts.
--dry-runwrites only planning artifacts and does no provider render. It does not prove an MP4 exists.
Canonical command path
# Plan or create the asset bus. Supply --script whenever an agent authored it.
oma video generate "Jeju coffee" --mode shorts --aspect 9:16 \
--captions tiktok --script ./script.json --output json
# Deterministic planning only; no real render or provider work.
oma video generate "explain this project" --mode explainer --seed 42 --dry-run
# Human-recorded demo input.
oma video generate "feature walkthrough" --mode demo --capture <absolute-path>.mp4
# Scaffold the per-run Remotion project, author src/Root.tsx as instructed,
# then render and validate the encoded output.
oma video compose <runDir> --output json
oma video render <runDir> --output json
# Diagnose required toolchains without changing a run.
oma video doctor
oma video provider list
oma video generate --output json returns
{exitCode, runDir, manifestPath, scriptPath, renderSpecPath, warnings, error}.
Read video and asset paths from the manifest; the JSON envelope has no
outputs field.
Failure and recovery
-
Missing Remotion composition:
oma video compose <runDir>prepares the project and authoring contract. Author<runDir>/remotion/src/Root.tsxusing the generatedAUTHORING.md, then invokeoma video render <runDir>. The command typechecks, renders, and ffprobes the output. Fix a reported composition or toolchain failure and re-run; return a failure report when it cannot render. -
Missing MPT toolchain:
--compositor mptrequires the installed checkout, its virtual environment, and ffmpeg. Useoma video doctor --install-mptwhen setup is authorized and available. MPT setup failures, driver failures, and non-video output fail with the diagnostic; they do not write a placeholder MP4.
Success means all asset schemas and manifest hashes validate and a real MP4 passes video-stream and duration validation. A partial success may use a key-free visual, timing, caption, or music fallback, but it still requires that real video validation.
References
Conditional resources
Load only what the task needs:
resources/execution-protocol.mdfor the full ordered pipeline, failure mapping, and JSON reporting rules.resources/vendor-matrix.mdbefore changing providers, keys, cost, or fallback order.resources/script-schema.mdwhen authoring or validating--scriptinput.resources/prompt-tips.mdwhen turning a brief into scene prompts.resources/remotion-authoring/README.mdand the selected mode guide before writingRoot.tsx.resources/checklist.mdbefore handing a real video to a user.
Verification
For CLI/runtime changes, add a regression test for the affected success and failure paths. At minimum run the focused Vitest files, for example:
cd cli
bunx vitest run commands/video/providers/compositor.test.ts \
commands/video/orchestrator.test.ts
bunx biome check commands/video/providers/compositor.ts \
commands/video/providers/compositor.test.ts
Do not run a live render merely to test documentation or a mock-only branch.
04 同仓库更多 Skills
type-strictness
Enforce strict type compliance by eliminating `Any` types and `# type: ignore` comments. Use when: (1) Editing code that contains `Any` as a type annotation (2) Code has `# type: ignore` or `# pyright: ignore` comments (3) User requests type fixes or type strictness enforcement (4) Importing from untyped third-party libraries (5) User asks to "fix types", "remove Any", or "add proper typing" (6) Pyrefly or mypy reports type errors that need resolution (7) Code review reveals weak typing patterns Follows hierarchical resolution: codebase inference → type stubs → library inspection → type guards → casting (last resort).
slopgate-test-extender
Extend Python test suites with parametrization, fixture reuse, and quality enforcement. Use when asked to add tests, extend existing tests, improve test coverage, consolidate duplicate tests, fix test quality issues, or when Slopgate reports untested-production-code, missing test references, or coverage gaps. Triggers on requests like "add tests for X", "extend these tests", "parametrize tests", "consolidate tests", "fix test quality", "improve test coverage", "write tests for this function", "test this module", "behavior tests", "integration tests", "missing tests", "coverage holes", "untested code", or when a hook denies with test-related findings.
slopgate-intelligent-coding-patterns
Pattern-selection playbook for agents editing code with complex branching, stateful parsers/workflows, duplicated skeletons, policy checks, or ordered transforms. Load before refactoring if/elif dispatch chains, boolean-flag state machines, repeated validation predicates, parallel provider/language implementations, or regex/content transformation pipelines. Also load when asked to "apply a design pattern", "which pattern should I use here", "refactor this switch statement", "replace if-elif chain", "state machine pattern", "strategy pattern", "template method", "pipeline pattern", "specification pattern", "dispatch table", "guard clause refactor", "reduce cyclomatic complexity", or when Slopgate fires PY-CODE-014, PY-CODE-017, PY-CODE-018, QUALITY-LINT-001, or PY-QUALITY-010. Use with behavior-locking tests and avoid pattern theater for simple one-off code.
slopgate-hygiene-orchestrator
Orchestrate systematic elimination of linter warnings and errors across Python, TypeScript, and Rust codebases. Use when asked to "clean up lints", "fix all warnings", "run hygiene", "eliminate type errors", "orchestrate code quality fixes", "fix lint errors", "resolve quality gate failures", "pass CI checks", "reduce tech debt", "refactor to pass hooks", or when a Slopgate hook denies with QUALITY-LINT-001, PY-CODE-017, PY-CODE-018, or any collector finding. This skill coordinates multiple code-hygiene-enforcer agents working in parallel on non-conflicting file groupings, tracks progress persistently via JSON exports, and loops until all issues are resolved. CRITICAL: Never run linters directly—always use `slopgate lint check` as the primary gate, discover project-specific tools from config files, and export findings to JSON for tracking.
slopgate-code-smell-utility-locator
Autoactivate when code-smell hooks or reviews mention feature envy, thin wrappers, duplicate helpers, duplicate code, scattered helpers, builders/factories/config/constants/dataclass reuse, PY-CODE-012, PY-CODE-013, QUALITY-LINT-001, or repeated slopgate code-quality denials. Also load when asked to "find existing helpers", "consolidate utilities", "search for duplicate code", "where is this already implemented", "reuse existing logic", "don't duplicate this", "find similar functions", "utility inventory", "code smell radar", or before adding new helpers/wrappers so agents can find existing shared utilities and consolidate instead of duplicating.
slopgate-code-hygiene-refactor
Recovery playbook for Slopgate and project quality failures. Load after hook/lint denials such as PY-CODE-017 flat sibling modules, PY-CODE-018 oversized modules, QUALITY-LINT-001 post-edit quality backstops, PY-QUALITY-010 magic numbers / repeated literals, PY-CODE-012/PY-CODE-013 smell findings, type-suppression bans, duplicate helpers, or repeated hygiene retry loops. Also load when asked to "refactor this module", "split this file", "extract a class", "reduce complexity", "fix god class", "flatten module hierarchy", "move code to a package", "extract helpers", "consolidate duplicates", "replace magic numbers with constants", or when a hook blocks an edit with structural complaints. Focuses on preserving public APIs while refactoring toward packages, cohesive modules, typed seams, and focused tests.