技能圖譜SKILLSGROVE
技能圖譜/影片製作/jnMetaCode/openshorts/openshorts-video

openshorts-video

安裝

$npx skills add https://github.com/jnMetaCode/openshorts --skill openshorts-video
$git clone --depth 1 https://github.com/jnMetaCode/openshorts.git /tmp/openshorts && mkdir -p ~/.claude/skills && cp -r /tmp/openshorts/docs/skill ~/.claude/skills/openshorts-video
請幫我安裝這個 Agent Skill:https://github.com/jnMetaCode/openshorts/tree/48df3591750ea9d0d08f58fb9ce154605e61dfa2/docs/skill ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

原文描述 · MITUse this skill whenever the user wants a finished short video (talking-head explainer, opinion piece, product pitch, or an AI mini-drama) from a topic, article link, or script, using OpenShorts (Kaipian, github.com/jnMetaCode/openshorts). It installs OpenShorts locally, writes the script with the user's own text model, picks free stock footage or paints frames on-device, synthesizes the voice-over with free Edge TTS, burns captions, renders a 1080×1920 mp4 with cover, SRT and publish copy, and returns the file paths. Default path costs ¥0 / $0.
以下 SKILL.md 內容轉載自 jnMetaCode/openshorts(提交 48df359),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 OpenShorts contributors 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

OpenShorts — make a short video from one sentence

The user gives a topic, an article URL, or a script. You do everything else: install, health-check, script, footage, voice, captions, render, publish pack. Deliver file paths at the end. Do not stop after explaining the steps.

Required behavior

  1. Ask the user for at most one thing, once: an API key for a text model (DeepSeek / Kimi / GLM / OpenAI-compatible…) only if openshorts new reports a missing key. Everything else (footage, voice, rendering) is free and needs no key.
  2. Do not ask for confirmation before installing, running doctor, installing the bundled ffmpeg, or rendering. Send one short progress line, then execute.
  3. Run long commands in the foreground with a timeout of at least 15 minutes. Do not poll with sleep / ls loops.
  4. On failure read only the last 30 lines of output; OpenShorts prints the real cause (missing libass, missing key, quality-check items), not just an exit code.
  5. Never print API keys or the contents of ~/.ao / ~/.openshorts/config.json.

Defaults

Unless the user says otherwise: Chinese talking-head explainer, 60 s, 1080×1920, free Edge TTS voice, Wikimedia Commons / Pexels footage, captions burned in, AI-content label on. Output goes to ~/OpenShorts/<project>/. For English use --lang en (script, voice and caption line-breaking switch together).

Execution

1. Install (once)

node -v                      # must be >= 20
npx openshorts version       # installs on first use; no clone needed

Alternative: use the MCP server instead of the CLI

If your host supports MCP, register npx openshorts mcp and call create_video → poll job_status every 20–30 s → doctor on failure. It runs the same pipeline as the CLI steps below and returns the same file paths; prefer it when the host would otherwise time out on a 10-minute shell command.

2. Health check — do not skip

node bin/openshorts.mjs doctor

If it says ffmpeg lacks libass (captions cannot be burned in — Homebrew's ffmpeg has this problem), run:

node bin/openshorts.mjs install-ffmpeg     # ~40 MB, pinned build with sha256 check, installed to ~/.openshorts/bin only

3. Write the script

node bin/openshorts.mjs new koubo-kepu --topic "<topic or full script>"            # Chinese
node bin/openshorts.mjs new --lang en --topic "<topic or full script>"             # English

Add --local-dir <folder> to prefer the user's own footage, --voice <id> to pick a voice (npm run voices lists them). If the command reports a missing text-model key, ask the user for one key, then configure it once:

DEEPSEEK_API_KEY=<key> node bin/openshorts.mjs new koubo-kepu --topic "<topic>"   # any provider the engine knows: DEEPSEEK_API_KEY / MOONSHOT_API_KEY / OPENAI_API_KEY …

The command prints the project path: ~/OpenShorts/<project>/project.json.

4. Estimate, render, pack

node bin/openshorts.mjs estimate ~/OpenShorts/<project>/project.json   # cost is ¥0 on the default path; tells the expected wait
node bin/openshorts.mjs run      ~/OpenShorts/<project>/project.json   # footage → voice → captions → mp4 + quality check
node bin/openshorts.mjs export   ~/OpenShorts/<project>/project.json --platform douyin   # or shorts / bilibili / channels

run reuses finished shots on re-runs; run … --only s2 redoes one shot. openshorts rm <project.json> --yes deletes a project the user no longer wants (ask first — it removes the whole folder). If run ends with quality-check ⛔ items, report them verbatim to the user instead of calling it done.

Exit handling

On success run prints:

✓ 成片:/Users/…/OpenShorts/<project>/<project>.mp4(58.3s,出片用时 47 秒)
  字幕:…/<project>.srt
  封面:…/<project>-cover.jpg
  发布文案:…/<project>-发布文案.txt

Return those four paths plus the publish pack directory from export. If the output contains ⛔, return the message as-is and stop; do not retry blindly.

Notes for the agent

  • Everything runs on the user's machine; no video is uploaded anywhere. Only the script step calls the user's own text-model API.
  • openshorts drama --plan -i story="…" previews the cost of an AI mini-drama before spending anything; only run drama without --plan after the user has seen the estimate.
  • Web UI alternative: npm run openshorts opens http://127.0.0.1:4174 (the same pipeline, four steps).
檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 OpenShorts contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.