Agent Skills › ChatCut-Inc/agent-plugin › chatcut-media-guide

chatcut-media-guide

GitHub

指导在本地编辑器中导入或重新链接媒体文件。通过启动回环服务器提供文件,调用import_media接口完成批量导入或重链,并验证资产状态。

kimi/skills/chatcut-media-guide/SKILL.md ChatCut-Inc/agent-plugin

Trigger Scenarios

用户需要导入本地媒体文件 用户需要重新链接缺失的媒体

Install

npx skills add ChatCut-Inc/agent-plugin --skill chatcut-media-guide -g -y
More Options

Non-standard path

npx skills add https://github.com/ChatCut-Inc/agent-plugin/tree/main/kimi/skills/chatcut-media-guide -g -y

Use without installing

npx skills use ChatCut-Inc/agent-plugin@chatcut-media-guide

指定 Agent (Claude Code)

npx skills add ChatCut-Inc/agent-plugin --skill chatcut-media-guide -a claude-code -g -y

安装 repo 全部 skill

npx skills add ChatCut-Inc/agent-plugin --all -g -y

预览 repo 内 skill

npx skills add ChatCut-Inc/agent-plugin --list

SKILL.md

Frontmatter
{
    "name": "chatcut-media-guide",
    "description": "Use when the user needs to import local or downloaded media, or relink missing media to an existing ChatCut asset. Prefer the editor loopback bridge when the editor and files are on the same machine."
}

ChatCut Media Guide

Check browse_assets first when a file may already be imported.

Same-machine editor import

  1. Confirm the user selected the file for import. Open the target project using browserHandoff.url or editorUrl, and keep exactly one editor tab for it open on the same machine/network namespace as the local shell. A remote sandbox's localhost is not the user's localhost.
  2. Start the bundled loopback server with Node 18+ and the origin of the actual editor URL:
node <this-skill-dir>/scripts/serve-local-media.mjs --origin <editor-origin> /path/to/source.mp4

Keep it alive using the host's background-process support while calling MCP. It serves only the listed files over tokenized 127.0.0.1 URLs and exits after 900 seconds.

  1. Import multiple files in one import_media call: {"action":"from_editor","files":[...]}. Copy each file's assetId, url, filename, and sizeBytes from the printed imports array into files, omitting its per-file action. URLs may come from different running helpers. Send 1–16 files per call; for larger sets, submit successive batches of 16. Up to eight files are processed concurrently; the editor streams each one straight into its local store, so a card with transfer progress appears as soon as the download starts. The original top-level single-file arguments still work.
  2. Inspect every entry in results: successful entries have ok:true and status:"locally_imported"; failed entries have an error. Results preserve input order and include assetId and filename, with top-level succeeded/failed counts. Retry only failed files with the same asset IDs. Keep the helpers alive until all files succeed, and keep the editor open for server sync, background upload, and transcription.
  3. Verify the asset with browse_assets before placing it on the timeline. Wait on track_progress target:"transcription" before transcript or caption work. Do not wait for upload unless the next operation explicitly requires cloud bytes.

On timeout, check browse_assets and retry with the same assetId. Keep that ID even if restarting the helper changes its URL. If the editor cannot reach the helper, browser local-network access is unavailable, or host policy denies the transfer, stop and ask the user to upload through the visible editor instead of trying another transfer route.

Relink an existing asset

For missing local media, preserve the existing asset and all timeline references:

  1. Get the existing assetId from browse_assets and locate the corresponding original source file.
  2. Serve that file with scripts/serve-local-media.mjs as above.
  3. Call import_media with the helper's url, filename, and sizeBytes, set action: "relink_from_editor", and replace the generated ID with the existing assetId. For multiple files, use the same files array form, with an existing asset ID in every entry.
  4. Wait for status: "locally_relinked" before stopping the helper. Keep the editor open while upload or transcription finishes.

Relink always reads the supplied file. The media type must match, and the file must be the corresponding original rather than a replacement edit. If project sync has not exposed the target to the editor, wait and retry. A failed relink must not fall back to creating a new asset.

Fallback

If the host cannot run the helper or the editor cannot access its loopback URL, ask the user to upload the file in the visible target-project editor. Do not invent asset IDs or URLs, and do not upload files the user did not identify or approve. Public URLs must be downloaded to a readable local file before using the same-machine route.

Version History

  • e76472a Current 2026-09-27 13:28

    并发导入限制从4个调整为8个;上传逻辑改为仅在后续操作明确要求时等待。

  • 0dd9c5e 2026-09-22 02:34

Same Skill Collection

chatcut-desktop-codex-plugin/skills/connect-chatcut-desktop/SKILL.md
chatcut/skills/asset-import/SKILL.md
chatcut/skills/chatcut-plugin-basics-claude/SKILL.md
chatcut/skills/chatcut-plugin-basics/SKILL.md
chatcut/skills/create-motion-graphics/SKILL.md
chatcut/skills/export/SKILL.md
chatcut/skills/image-gen/SKILL.md
chatcut/skills/known-errors/SKILL.md
chatcut/skills/music/SKILL.md
chatcut/skills/shader-gen/SKILL.md
chatcut/skills/transcription/SKILL.md
chatcut/skills/verification/SKILL.md
chatcut/skills/video-gen/SKILL.md
chatcut/skills/voice/SKILL.md
chatcut/skills/widget-forms/SKILL.md
claude/skills/asset-import/SKILL.md
claude/skills/create-motion-graphics/SKILL.md
claude/skills/export/SKILL.md
claude/skills/image-gen/SKILL.md
claude/skills/known-errors/SKILL.md
claude/skills/motion-graphic-gen/SKILL.md
claude/skills/music/SKILL.md
claude/skills/shader-gen/SKILL.md
claude/skills/transcription/SKILL.md
claude/skills/verification/SKILL.md
claude/skills/video-gen/SKILL.md
claude/skills/widget-forms/SKILL.md
codex/skills/asset-import/SKILL.md
codex/skills/chatcut-plugin-basics/SKILL.md
codex/skills/create-motion-graphics/SKILL.md
codex/skills/export/SKILL.md
codex/skills/image-gen/SKILL.md
codex/skills/known-errors/SKILL.md
codex/skills/music/SKILL.md
codex/skills/shader-gen/SKILL.md
codex/skills/transcription/SKILL.md
codex/skills/verification/SKILL.md
codex/skills/video-gen/SKILL.md
codex/skills/widget-forms/SKILL.md
grok/skills/asset-import/SKILL.md
grok/skills/chatcut-plugin-basics/SKILL.md
grok/skills/create-motion-graphics/SKILL.md
grok/skills/export/SKILL.md
grok/skills/known-errors/SKILL.md
grok/skills/music/SKILL.md
grok/skills/shader-gen/SKILL.md
grok/skills/transcription/SKILL.md
grok/skills/verification/SKILL.md
grok/skills/video-gen/SKILL.md
grok/skills/widget-forms/SKILL.md

Metadata

Files
0
Version
e76472a
Hash
78369816
Indexed
2026-09-22 02:34

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-09 00:32
浙ICP备14020137号-1