К основному содержанию
скилл CX Codex

capcut-edit — скилл для Claude Code: правка черновиков CapCut

Скилл правит черновики CapCut и JianYing через CLI: субтитры, тайминги, скорость, громкость, анимации. Пригодится, когда видео монтируется из длинного в короткое.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add renezander030/capcut-cli --skill capcut-edit -a claude-code
Открыть на GitHub

Что делает capcut-edit

Скилл работает поверх CLI capcut, который читает и пишет файлы проекта: draft_content.json, draft_info.json, draft_meta_info.json и template-2.tmp. Версия 0.11 синхронизирует читаемые таймлайны между ними, поэтому правки не расходятся по копиям. Проекты лежат в ~/Movies/CapCut/User Data/Projects/com.lveditor.draft/<project>/ на macOS и в %LOCALAPPDATA%\CapCut\User Data\Projects\com.lveditor.draft\<project>\ на Windows; для JianYing путь другой — через JianyingPro.

Внутри — библиотека скриптов в scripts/. anim.sh вешает одну из 9 анимаций входа и выхода, fade-in.sh и fade-out.sh — обёртки над ней. ken-burns.sh строит кейфреймы масштаба и панорамы, long-to-short.sh вырезает диапазон и ставит заголовок с призывом, stamp-cta.sh применяет сохранённый текстовый шаблон. Скрипты сами находят точку входа capcut: сначала $CAPCUT_CLI, потом сборка в репозитории, потом node_modules/capcut-cli, потом capcut-cli или capcut в PATH.

Перед правкой проект надо закрыть в CapCut, иначе запись конфликтует с открытым редактором — это первое, о чём стоит помнить. Каждая запись проходит проверку конфликтов, готовится атомарно и оставляет .bak с историей. Флаг --force-write не трогайте без явного согласия перезаписать изменённое на диске. У аудиосегментов clip равен null, потому что прозрачности и масштаба там нет. Пакетная запись транзакционна: одна упавшая операция не пишет ничего.

Какие задачи решает

  • переписать текст субтитров в черновике CapCut
  • сдвинуть тайминги всех сегментов на пару секунд
  • нарезать длинное видео в короткое с заголовком и призывом
  • повесить fade-in или ken-burns на выбранный фрагмент
  • сделать караоке-субтитры из аудиодорожки

Примеры запросов агенту

  • покажи треки в проекте my-video и найди все текстовые сегменты
  • сдвинь все сегменты на +0.5s и поставь громкость 0.5 для d4e5f6
  • сделай из проекта long-video короткое видео с заголовком и CTA

Как установить capcut-edit

1Через Skills CLI (Vercel)

npx skills add renezander030/capcut-cli --skill capcut-edit -a claude-code

2Вручную: положить файлы

~/.claude/skills/capcut-edit/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/capcut-edit/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Похожие

anycap-gemini-omni-video-edit anycap-ai Скилл для правки коротких видео через Gemini Omni Flash Preview и AnyCap: меняет один элемент, остальное сохраняет. CX Codex +1 444установок video-transcript-downloader steipete Достаёт транскрипт из видео одной командой и скачивает видео, аудио или субтитры через yt-dlp. Пригодится, когда доклад проще прочитать, чем смотреть. CX Codex +1 1 000установок video-edit calesthio Локальная обработка видеофайлов через готовые инструкции для консольного инструмента ffmpeg. Помогает нарезать ролики, менять пропорции под соцсети и сжимать дорожки. CX Codex +1 1 400установок video-use browser-use Скилл монтирует видео через диалог: расшифровывает речь, режет материал, добавляет субтитры и графические оверлеи. Подходит для роликов, интервью и уроков. CX Codex +1 5 100установок Transcription Automation Claude Office Skills Скилл для автоматической расшифровки аудио и видео: встречи, субтитры, шоу-ноты подкастов. Работает через MCP-сервер media-mcp. CX Codex +1 4 800установок caption-animation iart-ai Скилл для пословной анимации субтитров: слово появляется на своём слоге, активное подсвечивается, текст держится в безопасной зоне 9:16. CX Codex +1 2 000установок

Рядом в теме «Автоматизация и no-code: n8n, Zapier, Make»

Все скиллы по теме «Автоматизация и no-code: n8n, Zapier, Make» →

Вопросы о capcut-edit

Как установить capcut-edit в Claude?

Выполните npx skills add renezander030/capcut-cli --skill capcut-edit -a claude-code. Скилл окажется в ~/.claude/skills/capcut-edit/SKILL.md.

Что делает capcut-edit?

Даёт агенту команды для чтения и записи черновиков CapCut и JianYing: субтитры, тайминги, скорость, громкость, шаблоны, анимации и нарезка длинного в короткое.

Что нужно сделать перед правкой проекта?

Закрыть проект в CapCut и открыть заново после записи. Иначе запись конфликтует с открытым редактором, а флаг --force-write перезапишет изменённое на диске.

Исходный текст

SKILL.md · MIT
---
name: capcut-edit
description: Edit CapCut / JianYing video projects — read and write subtitles, timing, speed, volume, templates, animations (fade/ken-burns), and cut long-form to shorts. Use when the user mentions capcut, jianying, subtitles, video editing, draft_content.json, draft_info.json, or cutting videos — in English or Chinese (剪映, 字幕, 草稿, 剪辑, 切片, 视频编辑).
---

# capcut-edit

CLI for editing CapCut / JianYing drafts through a version-aware store. v0.11 detects and synchronizes readable timelines across `draft_content.json`, `draft_info.json`, `draft_meta_info.json`, and `template-2.tmp`.

## Project locations

- **macOS**: `~/Movies/CapCut/User Data/Projects/com.lveditor.draft/<project>/`
- **Windows**: `%LOCALAPPDATA%\CapCut\User Data\Projects\com.lveditor.draft\<project>\`
- **Windows (JianYing / 剪映)**: `%LOCALAPPDATA%\JianyingPro\User Data\Projects\com.lveditor.draft\<project>\`

## Core principle — deterministic scripts

Any recipe involving more than one `capcut` call, any arithmetic, or any branching ships as a parameterised shell script in `scripts/`. Claude invokes the script with inputs; the script runs a fixed sequence. If a recipe can be a script, it **must** be a script — not a narrative in `references/`.

`references/workflows.md` documents *which script to call and why*, never a reconstructable sequence.

## Progressive disclosure

Start broad, drill into what you need. Never dump full project JSON.

```bash
capcut info <project> -H           # overview
capcut doctor -H                   # installed media/transcription capabilities
capcut diagnose <project> -H       # canonical files, divergence, editor safety
capcut tracks <project> -H         # all tracks
capcut materials <project> -H      # material summary
capcut segments <project> -H       # segments with timing
capcut segment <project> <id>      # one item, full detail
```

## Output modes

- **JSON** (default): pipe to `jq`, feed to scripts.
- **`-H`**: human-readable tables.
- **`-q`**: quiet, exit code only — for write commands in scripts.

## Batch writes

```bash
echo '{"cmd":"set-text","id":"a1b2c3","text":"Fixed"}
{"cmd":"volume","id":"d4e5f6","volume":0.5}' | capcut batch <project>
```

Operations: `set-text`, `shift`, `shift-all`, `speed`, `volume`, `opacity`, `trim`.

Batch is transactional: one failing operation writes nothing. Use `--continue-on-error` only when the user explicitly accepts a partial commit; it still exits non-zero.

## Where to look

- **`references/api-reference.md`** — every command, every flag, every value format (time, percentages, degrees), the ID-prefix rule, the `.bak` invariant.
- **`../../docs/command-reference.md`** — generated command-contract v2 with typed positionals/options, mutability, prerequisites, output form, and exit codes.
- **`references/workflows.md`** — recipes = which `scripts/X.sh` to run and why.
- **`references/pitfalls.md`** — close-project-first, `.bak`, `clip=null` on audio, `source_timerange` math with `speed`, alpha-keyframes-don't-render-use-animation-materials, etc.
- **Enum discovery** — call `capcut enums --<category>` (or `-H` for a table) to list every CapCut slug. Categories: `--transitions`, `--masks`, `--image-intros`, `--image-outros`, `--image-combos`, `--text-intros`, `--text-outros`, `--text-loop-anims`, `--scene-effects`, `--character-effects`, `--audio-effects`, `--fonts`. Add `--jianying` to switch namespace. The `enums.json` bundle is generated once via `python3 scripts/extract-enums.py`; runtime is Python-free.
- **`scripts/`** — the client library. Current:
  - `anim.sh` — attach any of 9 CapCut intro/outro animations; `fade-in.sh` and `fade-out.sh` are thin wrappers.
  - `ken-burns.sh` — scale + pan keyframes via `capcut keyframe --batch` (motion properties render; alpha does not — use `anim.sh fade-in` instead).
  - `long-to-short.sh` — cut a range, stamp title + CTA text.
  - `stamp-cta.sh` — apply a saved text template (see `assets/examples/subscribe-cta.json`).
  - `_test.sh` — run every wrapper against the fixture; run after any change here.
- **`assets/examples/`** — raw JSON snippets for hand-editing.

Scripts resolve the `capcut` entry point themselves, so the skill also works when it is installed outside a `capcut-cli` checkout: `$CAPCUT_CLI` (explicit path to `dist/index.js` or a launcher) wins, then the repo build, then an installed `node_modules/capcut-cli`, then `capcut-cli`/`capcut` on `PATH`. A `.js` entry runs under `node`; a launcher (from `PATH`, or `$CAPCUT_CLI` pointing at one) runs directly. `anim.sh` resolves the CapCut effect-cache directory per platform; `$CAPCUT_EFFECT_CACHE` overrides it.

## Invariants

- Close the project in CapCut before editing; reopen after.
- Every write is conflict-checked, prepared atomically, and synchronized to every readable timeline target. Every target receives `.bak` and rolling history snapshots.
- Never pass `--force-write` unless the user explicitly accepts overwriting changed-on-disk state or an open editor.
- `clip` is `null` on audio segments (no opacity/scale).
- `capcut cut` writes to `--out`, never modifies the source.
- IDs: first 6+ chars of the UUID match as a prefix.
- Time formats: `1.5s`, `500ms`, `+0.5s`, `-1s`, `1:30`, `0:05.5`, bare number = seconds.

## v0.11 high-value paths

- Whole draft: `capcut compile spec.json --check`, then `capcut compile spec.json --out <dir>`. Specs support refs, transforms, decorators, templates, captions, keyframes, and fades.
- Karaoke: `capcut caption <project> --audio <path> --whisper-engine <openai|whisper-cpp|faster-whisper> --karaoke`.
- Proxy: `capcut render <project> --all-video-tracks --burn-captions`; run `doctor` first for FFmpeg capability flags.
- Automation: `capcut serve --workers N --retries N --timeout MS`; give jobs stable `id` fields and let the runner serialize writes per project.
- Agent schema: on CLI v0.28.0 or newer, start with `capcut describe --compact` to discover commands, then fetch complete contracts with `capcut describe --command <name>` (repeat for several names). Plain `capcut describe` returns the full registry and works on older versions. Use these contracts as the source of truth; do not scrape help text or invent flags.

© renezander030 · MIT · renezander030/capcut-cli

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой