返回顶部
t

twitch-clipTwitch片段生成

Create Twitch clips of the current live stream via the Twitch API. Use when a streamer says "clip that", "clip the last X seconds", "make a clip", "clip it", or any variation requesting a clip of the current broadcast. Requires Twitch API credentials configured in environment variables. Has a 30-second cooldown between clips to prevent spam.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
196
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

twitch-clip

Twitch片段技能

通过Twitch Clips API创建直播Twitch频道最近30-60秒的片段。包含30秒冷却时间以防止意外重复剪辑。

设置

1. 创建Twitch应用

  1. 1. 访问 https://dev.twitch.tv/console/apps
  2. 注册新应用(OAuth重定向URL:http://localhost,类别:其他)
  3. 复制您的客户端ID并生成客户端密钥

2. 获取OAuth令牌

在浏览器中访问此URL(替换YOURCLIENTID): text https://id.twitch.tv/oauth2/authorize?clientid=YOURCLIENTID&redirecturi=http://localhost&response_type=token&scope=clips:edit

从重定向URL中复制access_token。

3. 设置环境变量

bash export TWITCHCLIENTID=yourclientid export TWITCHACCESSTOKEN=youraccesstoken export TWITCHBROADCASTERID=yourbroadcasterid # 数字用户ID

查找您的播主ID:
bash
curl -s -H Authorization: Bearer $TWITCHACCESSTOKEN \
-H Client-Id: $TWITCHCLIENTID \
https://api.twitch.tv/helix/users | python3 -c import json,sys; print(json.load(sys.stdin)[data][0][id])

使用方法

运行剪辑脚本:
bash
bash scripts/createclip.sh [durationseconds]

  • - 时长默认为30秒,最大60秒
  • 直播必须处于进行中状态,否则API返回404

冷却时间

两次剪辑之间强制设置30秒冷却时间。如果在冷却期间收到剪辑请求:

  • - 脚本退出代码为2,并显示剩余等待时间
  • 回复:⏳ 冷却中 — 请在X秒后重试
  • 不要自动重试 — 等待下一次明确的剪辑请求

触发短语

  • - 剪辑那个
  • 剪辑最后X秒
  • 制作一个片段
  • 剪辑它

回复格式

成功:
已剪辑!🎬 https://clips.twitch.tv/

冷却中:
⏳ 冷却中 — 请在X秒后重试

未直播:
直播已离线 — 当前无法剪辑

令牌刷新

令牌会过期。如果收到401错误,请使用设置步骤2中的URL重新授权。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 twitch-clip-1776117189 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 twitch-clip-1776117189 技能

通过命令行安装

skillhub install twitch-clip-1776117189

下载

⬇ 下载 twitch-clip v1.0.2(免费)

文件大小: 2.75 KB | 发布时间: 2026-4-17 16:25

v1.0.2 最新 2026-4-17 16:25
Fix: replace bare code blocks with ```text for consistent rendering

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部