بنقرة واحدة
parallel
Parallel execution patterns for montaj — load when workflow has multiple clips or foreach steps
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Parallel execution patterns for montaj — load when workflow has multiple clips or foreach steps
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
You MUST use this whenever the user asks for video editing work. Use it when video-related tasks are brought up. Editing, analyzing video, or transcribing videos
Find and download real images from the web — people, logos, brand/event stills, B-roll — to add as overlay image cards or project assets. Load when the prompt asks to source or insert images (e.g. 'add a photo of X', 'find images of the IPO', 'pull a shot of the factory').
Agent-authored workflow task: analyze transcripts across all clips, pick ONE best take per script section, discard all others. Load this when you hit montaj/select_takes in a workflow.
Write a custom JSX overlay component and add it to the project's overlay track.
Agent-authored workflow task: transcribe-and-sample one long-form horizontal source, pick N self-contained clip windows, and fan each out into its own vertical (9:16) clip project with the chosen framing. Load this when you hit montaj/find_clips in a workflow.
The shared vocabulary that domain skills use to name Montaj operations. Domain skills phrase every Montaj interaction as one of these verbs; an interface skill defines how each verb is actually performed. Load this to learn the canonical verbs before authoring or reading a domain skill.
| name | parallel |
| description | Parallel execution patterns for montaj — load when workflow has multiple clips or foreach steps |
| step | false |
Important: Claude Code's Bash tool executes sequentially — multiple Bash calls in the same turn queue one after another. They do NOT run in parallel. Use the patterns below for true parallelism.
For foreach steps on independent clips, use a single Bash call with background jobs:
out0=$(curl -s -X POST http://localhost:3000/api/steps/transcribe \
-H "Content-Type: application/json" \
-d '{"input": "/path/clip0.MOV", "model": "base.en"}') &
out1=$(curl -s -X POST http://localhost:3000/api/steps/transcribe \
-H "Content-Type: application/json" \
-d '{"input": "/path/clip1.MOV", "model": "base.en"}') &
# ... repeat for each clip
wait
echo "$out0"; echo "$out1" # parse results after all complete
Use for any independent foreach step: waveform_trim, transcribe, rm_fillers, probe, snapshot.
Do NOT use background jobs for encoding steps. See Encoding steps below.
materialize_cut, remove_bgEncoding steps are memory-intensive per instance (full libx264 encode + frame buffers). Fanning them out unbounded across N clips will exhaust memory on 4K footage. Use batch mode with the built-in concurrency cap instead of background jobs:
# materialize_cut — batch mode, 2 concurrent encodes (default)
montaj materialize-cut --inputs clip0_spec.json clip1_spec.json clip2_spec.json
# → JSON array of output paths
# raise to 3 only on machines with 32GB+ RAM and 1080p or smaller footage
montaj materialize-cut --inputs clip0.MOV clip1.MOV --workers 3
# remove_bg — always use --inputs; GPU processes sequentially, CPU parallelises with workers
montaj remove-bg --inputs clip0_cut.mp4 clip1_cut.mp4 clip2_cut.mp4
# → JSON array of {nobg_src, nobg_preview_src} objects
remove_bg is long-running (minutes per clip on MPS/GPU). Always run it in the background when using the Agent tool or HTTP API so the agent remains responsive.
waveform_trim native batchPreferred over background jobs — pass all clips in a single call:
# HTTP
curl -s -X POST http://localhost:3000/api/steps/waveform_trim \
-H "Content-Type: application/json" \
-d '{"inputs": ["/path/clip0.mp4", "/path/clip1.mp4", "/path/clip2.mp4"]}'
# → returns JSON array of trim specs: [{"input": "...", "keeps": [...]}, ...]
# CLI
montaj waveform-trim clip0.mp4 clip1.mp4 clip2.mp4
# → JSON array of trim specs printed to stdout
When each clip needs 3+ sequential steps before concat, background jobs get unwieldy. Use one subagent per clip:
concat and everything afterconcat with all paths, then continueUse when a clip needs 3+ sequential steps — subagent coordination overhead is worth it beyond that threshold.
Workflow steps declare needs: [step_ids]. Identify waves of ready steps (all needs met) and execute each wave with the appropriate parallel pattern before moving to the next.
Example — default workflow:
| Wave | Steps | Pattern |
|---|---|---|
| 1 | probe, snapshot, waveform_trim (per clip) | Bash & or waveform_trim batch |
| 2 | transcribe (per clip) | Bash & |
| 3 | rm_fillers (per clip) | Bash & |
| 4 | select-takes | Sequential |
| 5 | caption, overlays | Sequential |
| 6 | concat | Sequential (encode boundary) |