make-montage
Build a beat-synced video montage from a video and audio file by orchestrating cadence's MCP tools. Use when the user asks to create a montage, edit action footage to music, or cut video to the beat.
What this skill does
Build a beat-synced montage from the arguments: `$0` is the video path, `$1` is the audio path, `$2` is the optional output path (default: `montage.mp4` in the current working directory).
## How this skill thinks
Cadence runs as a **three-party conversation**: you (Claude) orchestrate tool calls; Gemini acts as the subject-matter expert for video/audio perception and creative judgment; the user speaks through you. Gemini's reasoning carries *across* the calls in a session — it remembers what moments it found, which segment it picked, and why. Your job is to synthesize the user's raw request into a coherent `userIntent` at session-begin, then make targeted calls and inspect results.
## Interpreting the user's request
Split intent across two axes before calling tools:
- **Content intent** — *what* should appear in the montage. Feeds the session's `userIntent` (shapes every Gemini call) and the optional per-call `focusPrompt` for refinement.
- **Arrangement style** — *how* the content should be cut. Passed as `stylePrompt` to `reason-plan-edit`.
Enrich vague user phrases into concrete criteria before passing. "Badass close combat" → "physical melee engagements — punches, kicks, grapples, throws, blocks; exclude ranged attacks, environmental destruction, and dialogue."
If the user hasn't given arrangement direction, ask. Reasonable defaults:
- **Fast-paced anime action**: rapid cross-cutting, rarely hold a shot, anchor hardest hits on downbeats
- **Cinematic build**: longer holds, moments breathe, cuts only on strong beats
- **Sequential scene**: clips roughly follow the video's original order
## Pipeline
### 1. Begin the session
```
session-begin(videoPath: $0, audioPath: $1, userIntent: "<your synthesis>")
```
Uploads both files to Gemini and opens a cached conversation. Everything below runs within this session — Gemini remembers the intent across all `reason-*` calls.
### 2. Measure the audio
```
audio-detect-beats(audioPath: $1) → { bpm, durationS, beats }
```
Pure DSP, not in the Gemini conversation. Keep the full `beats` array.
### 3. Find action moments
```
reason-find-action-moments(fps?: 5, focusPrompt?: "<optional refinement>")
```
Stores moments on the session. Returns `{ momentCount, highestIntensity, usage }`. Gemini scores moments by fit-to-intent, not generic visual impact — a wide-shot explosion is low-intensity if the user wants hand-to-hand.
### 4. Pick the energy segment
```
reason-pick-energy-segment(beats: <full grid>, targetDurationS: 30, focusPrompt?: "<optional>")
```
Gemini picks the best audio window, snapped to beats. Returns `{ segmentStartS, segmentEndS, reasoning, usage }`; segment is stored on the session for planning.
### 5. Plan the edit (and apply it)
```
reason-plan-edit(beats: <full grid>, stylePrompt?: "<arrangement direction>")
```
Pulls moments + segment from the session, asks Gemini to plan clip placement (with per-clip anchor metadata + reasoning), and **applies the plan to the timeline directly**. Returns a summary: `{ clipCount, issueCount, errorCount, warningCount, clipIds, segmentBounds, totalGeminiTokens }`.
Each clip Gemini produces has an *anchor* — the source frame that should land on a specific beat on the output timeline — plus `buildupS`/`resolutionS` reservations that determine source range and timeline position. A clip can span multiple beat intervals if the moment needs room (explosions, reveals).
### 6. Resolve issues (only if needed)
If `errorCount > 0`, the timeline has overlaps or out-of-bounds clips. Warnings (gaps, small drift) are okay to ignore.
```
timeline-list-issues → { issues: [{ type, severity, affectedClipIds, message, deltaS }] }
```
For each error, inspect the affected clips:
```
timeline-inspect-clip(clipId) → { source, positionS, durationS, anchor, meta: { description, reasoning, intensity, origin } }
```
Decide which clip to modify based on the reasoning (e.g. "this clip's resolution is a low-motion dust-settle — trim it; the next clip's buildup is a critical dodge setup — keep it"). Apply the fix:
```
timeline-update-clip(clipId: "clip-16", sourceEndS: <new value>) // trim a clip
timeline-remove-clip(clipId: "clip-9") // drop a clip
timeline-insert-clip(sourcePath, sourceStartS, sourceEndS, positionS, description) // fill a gap
```
Each update revalidates. Loop until `timeline-list-issues` returns no errors.
### 7. Render
```
render-final(outputPath: $2 or "montage.mp4")
```
Refuses if errors remain. Returns `{ outputPath, outputBytes, clipCount, durationS, warnings }`.
### 8. End the session
```
session-end
```
Deletes the Gemini cache. Do this even if you hit errors — the cache has a TTL but explicit cleanup is polite.
## Report back to the user
After render, summarize in 3-4 lines:
- Output path and size (MB)
- Segment chosen (MM:SS → MM:SS)
- Clip count and BPM
- Total Gemini token usage (sum `usage.totalTokens` across `reason-*` calls)
Don't dump clip details — they're inspectable via `timeline-inspect-clip` and the plan thoughts blob is on the timeline resource. The per-call disk logs are at `${CLAUDE_PLUGIN_DATA}/cache/logs/`.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.