asset-import
GitHub用于将本地、附件或下载的媒体文件导入ChatCut项目。通过外部连接器检查现有资产、下载URL、创建会话并调用专用脚本上传,处理分批次上传及进度等待,确保合规性。
触发场景
安装
npx skills add ChatCut-Inc/agent-plugin --skill asset-import -g -y
SKILL.md
Frontmatter
{
"name": "asset-import",
"description": "Import local, attached, or downloaded media into a ChatCut project through the hosted external connector."
}
Asset Import
Use this host adapter for files Codex can read locally. The hosted external MCP does not expose the backend agent's push_asset tool, so do not follow a shared push_asset workflow in this plugin.
- Check
browse_assetsfirst when the media may already be in the project; do not create duplicates. - Download a public URL to a local file when needed.
- Call
import_mediawith{"action":"create_session"}. - Run this skill's
scripts/upload-media.mjsonce with the returned token and endpoint and at most four local files. Split larger sets into batches of four and create one session per batch.
"<bundled-or-global-node>" <this-skill-dir>/scripts/upload-media.mjs --token <token> --endpoint <endpoint> /path/to/source-1.mp4 /path/to/source-2.wav
Resolve the helper relative to this skill; do not search the workspace. Use Codex's bundled Node runtime when available, otherwise Node 18 or newer from PATH. Run the helper in the foreground and read its final JSON from stdout. Do not detach it or invent status files.
The helper is mandatory for media preparation and upload. Do not replace it with handwritten ffprobe, ffmpeg, curl, metadata, transcode, or presigned-upload commands. Media bytes upload directly to storage and must not pass through the ChatCut backend.
Use each returned imports[].result.assetId for timeline work. Wait for track_progress target transcription before transcript or caption work. Wait for target upload only before byte-dependent work such as cloud export, pull_asset, or remote frame inspection.
If the helper returns an error with retry, create a fresh import session when requested and rerun exactly the returned arguments. If host policy denies transfer of the user's file, stop instead of trying a local-editing or alternate-upload workaround; tell the user the upload was denied and ask them to use the ChatCut editor upload UI or grant the required permission.
版本历史
-
e1867a8
当前 2026-08-02 23:37
优化了资产导入流程,明确了使用browse_assets避免重复,细化了import_media参数及upload-media.mjs脚本的使用规范,强调了错误重试策略和权限拒绝时的处理方式。
-
f39cdae
2026-07-30 21:53
同步插件版本至66c0309a40866ab98e1147b05d4cc160094efab5
- 5e9afe0 2026-07-22 10:58


