Agent Skills
› 0xsline/OpenChatCut
› music-intelligence
music-intelligence
GitHub提供本地音乐分析、节拍检测及视频卡点剪辑与照片排版功能。支持通过计划工具生成编辑方案,并执行同步操作,适用于BGM节奏编辑和多媒体时间轴同步场景。
Trigger Scenarios
用户请求分析音乐结构或节拍
需要进行视频卡点剪辑或按节拍放置照片
Install
npx skills add 0xsline/OpenChatCut --skill music-intelligence -g -y
SKILL.md
Frontmatter
{
"name": "music-intelligence",
"description": "Run or inspect local music analysis and plan or apply beat-, downbeat-, or section-synced video cuts or photo placements.\nUse for BGM beat edits, rhythm cuts, 卡点剪辑, musical structure, BPM, mood, genre, or instrument questions.\n",
"user-invocable": false
}
Music Intelligence
- Call
analyze_musicwhen the user asks to analyze music or no cache exists. It runs the installed local Beat This + CLAP models, waits for completion, and never downloads models; useforce:trueonly for an explicit reanalysis request. - Call
inspect_musicwhen only the existing cache is needed. - Before cutting video, call
music_edit_planand show its bounded cut/target summary. Before placing photos, callmusic_image_planand show its bounded placement summary. Prefertiming:auto; choose sparse, medium, or dense from the requested pace. - Only after the plan is accepted, call
sync_cuts_to_musicorsync_images_to_musicwith the returnedanalysisRef. Each tool recomputes the plan, rejects stale analysis, and applies its changes as one undo step. - If required model packs are missing, report the returned install guidance, then retry
analyze_musicafter installation. - Never request, return, quote, summarize, or place the CLAP embedding in model context. Use tags, sections, confidence, and the opaque
analysisRefonly.
Preconditions
- Analysis is opt-in and on-device. The media-pool asset must already have a cache for its current
sourceRevision. rhythm-litesupplies Beat This rhythm data;music-semantics-litesupplies CLAP tags and the private similarity vector.- An Agent call must never install a pack, download a model, decode media, or start inference. Direct the user to Settings and the media-card analysis action when the cache is unavailable.
Inspect
- Identify the BGM by
itemId,assetId, or an unambiguous name. Prefer the timeline item when the user intends to edit, because returned points are then mapped to timeline frames through the clip trim and playback rate. inspect_musicreturns BPM, meter, confidence, tags, sections, counts, and bounded point lists. Lists are capped at 48 beats, 24 downbeats, 16 sections, and 12 tags; use a narrower range whentruncatedis true.- Treat
analysisRefas opaque. It binds later planning and execution to the exact cached analysis without exposing the 512-value CLAP embedding.
Plan
timing:autochooses section → downbeat → beat for sparse edits, downbeat → beat → section for medium edits, and beat → downbeat → section for dense edits.- Density samples every fourth, second, or first candidate for sparse, medium, or dense respectively.
- Plans are bounded to 96 cut frames and 64 overlapping video targets. Report the returned summary and any cap or locked-target warning before applying.
- A plan targets video clips that overlap the selected BGM range. It must never include or mutate the BGM item itself.
Photo placement
music_image_planuses explicitly listed image asset ids in their given order, or all image assets in media-pool order when omitted. It cycles that order when the music range has more beat intervals than images.- Each placement covers the complete interval from one selected timing point to the next, including the BGM range boundaries, so images are not appended with their source duration or placed at a uniform default length.
- Image placement is bounded to 96 clips and 64 image assets.
sync_images_to_musicrequires an unlocked, empty target video track for the requested range; choose another track instead of overwriting existing content.
Apply and recover
- Pass the same
itemId, timing, density, range, target ids, andanalysisReftosync_cuts_to_music. Execution recomputes the plan from current state; do not replay an old list of frames. - A missing or stale ref means the project or analysis changed. Call
inspect_music, thenmusic_edit_planormusic_image_plan, and ask for acceptance again. - Locked video tracks are skipped and reported. Never unlock a track implicitly.
- Successful splits are submitted as one
EditorCommands.batch, so the whole rhythm edit is one undo step. - Successful photo placements are submitted as one
EditorCommands.batch, so the whole sequence is one undo step.
Version History
-
d4052ab
Current 2026-08-16 15:57
新增基于节拍的照片排版工作流(music_image_plan/sync_images_to_music),完善缓存缺失时的错误指引,并扩展音乐分析元数据暴露。
- 0c0c02d 2026-08-12 09:07


