Trim Video logo

Trim Video

Community
JianhuiWei7
trim-video

【视频剪辑工具】支持指定开始时间和结束时间对视频进行精确裁剪。当用户需要截取视频片段、去除视频首尾或保留特定时间段时,必须立即调用此技能。

Overview

PublisherJianhuiWei7
RepositoryVideoWeaver
Skill nametrim-video
Stars
48
Forks
1
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by JianhuiWei7 on GitHub. Read the source before you install it.

Installation

Install the Trim Video AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/JianhuiWei7/VideoWeaver/tree/main/skills/trim-video
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JianhuiWei7/VideoWeaver.git /tmp/VideoWeaver
mkdir -p .claude/skills
cp -r /tmp/VideoWeaver/skills/trim-video .claude/skills/trim-video
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Trim Video in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Trim Video on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Trim Video is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

前置依赖

  1. 安装依赖包:pip install moviepy
  2. 本地环境建议已配置好 ffmpeg(虽然 moviepy 会尝试自动处理,但系统级 ffmpeg 会提升稳定性)。

典型使用案例

基础视频剪辑

剪辑指定时间段的视频,并自动在基于 session 生成的特定输出目录下生成带有 _trimmed_{start_time}_{end_time} 后缀的输出文件。

bash
python trim-video/scripts/trim_video.py \
  --input_path "/path/to/video.mp4" \
  --start_time 10 \
  --end_time 60 \
  --session-key "agent:{agent_id}:{session_id}"

运行模式与日志监控

默认行为: 该脚本为前台同步执行(Blocking),在执行过程中会在终端直接输出处理日志。

任务监控流程:

  1. 提交任务:通过命令行执行脚本。
  2. 监控进度:剪辑过程通常较快,但对于大文件可能需要几秒到几分钟。
  3. 完成状态:
    • 成功:日志末尾会输出 ✅ Video trimmed successfully: [输出路径],并返回状态码 0。
    • 失败:日志末尾会输出 ❌ An error occurred during video trimming: [错误信息]。

参数说明

参数名说明
--input_path(必填)需要剪辑的视频文件路径。
--start_time(必填)剪辑起始时间(秒),例如 10.5。
--end_time(必填)剪辑结束时间(秒),例如 60.0。
--session-key(Optional; OpenClaw Required) 输出目录 session-key。CodeX/Claude Code 环境会自动识别,不需要传入内容;OpenClaw 环境必须运行 session_status 获取session-key并且传入, 格式通常为 agent:{agent_id}:{session_id}。

执行规范

  • 执行前检查:在执行剪辑前,确保传入的 --input_path 对应的文件在本地确实存在。
  • 时间检查:start_time 必须小于 end_time,且 start_time 必须大于等于 0。
  • 结果反馈:命令执行结束后,你需要检查输出日志。
    • 若成功,向用户汇报:"✅ 视频剪辑成功!已保存至:[输出路径]"。
    • 若失败,向用户汇报失败原因(如路径无效、时间参数错误等),并提供可能的修复建议。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Trim Video AI skill do?

【视频剪辑工具】支持指定开始时间和结束时间对视频进行精确裁剪。当用户需要截取视频片段、去除视频首尾或保留特定时间段时,必须立即调用此技能。

Why use Trim Video on TypingMind?

Because you install it once and use it with any model. Trim Video is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Trim Video in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/JianhuiWei7/VideoWeaver/tree/main/skills/trim-video. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Trim Video?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Trim Video?

As many as you like. As long as a model supports skills, you can use Trim Video with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Trim Video AI skill free?

It is published on GitHub by JianhuiWei7. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇