wasu-edu-video
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "wasu-edu-video" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-60a611a276a30e92a4415ab7cce50176c2edeeaef6df731072e19f2d5cc87dc3. Verify the upstream source and version against https://skillhub.cn/skills/wasu-media/wasu-edu-video before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
wasu education video generator: Builds teaching videos on the Wasu AI platform from a user-provided topic/knowledge point or an image (Base64). Supports both text-only and image inputs; triggers on intents like “generate teaching video,” “create teaching animation,” or “explain a concept.” Requires Wasu CLI login authentication (shared with wasu-models). Calls the video generation API via POST and assembles an accessible link from the preview path returned by the server.
Introduction source: third_party · wasu-media · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: wasu-edu-video
description: 华数教学视频生成器。基于 Wasu AI 平台,将用户输入的主题/知识点或图片自动生成教学视频。当用户说"生成教学视频""制作教学动画""讲解知识点""帮我做一个XX的教学视频""华数视频生成"等意图时触发此 skill。前置依赖 wasu CLI 登录认证(与 wasu-models 共用认证流程),通过 POST 请求调用视频生成接口,服务端返回预览路径后拼接为可访问的链接。支持纯文本主题和图片(Base64)两种输入方式。
agent_created: trueWasu 教学视频生成器
基于 Wasu AI 平台,将用户输入的主题/知识点或图片生成为教学视频。通过 wasu CLI 完成登录认证和 API Key 获取,发送 POST 请求到视频生成服务,服务端返回预览路径后拼接为完整链接供用户访问。支持两种输入模式:纯文本主题、图片(自动转为 Base64)+ 可选的 topic 描述。
配置
| 变量 | 值 | 说明 |
|---|---|---|
root_url |
https://iot-test.wasumedia.cn/edu-aigc |
视频生成服务的主站 URL,修改此地址后全文统一生效 |
本 skill 中所有 {root_url} 占位符均引用此处的值。如果服务地址变更,只需修改此表格中的 root_url 即可。
边界声明
使用此 skill 当:
- 用户需要生成教学视频、教育动画、知识点讲解视频
- 用户输入一个主题/知识点并要求"做视频""生成视频""教学动画"
- 用户提到"华数视频""wasu 视频""教学视频生成"
- 用户的意图明确是"输入知识点 → 输出视频"
不使用此 skill 当:
- 用户仅需要配置 Wasu 模型到 Agent(使用 wasu-models skill)
- 用户需要图文混排的 HTML 教学页面(使用 edu-video-generator skill)
- 用户仅查询模型信息或获取 API Key(使用 wasu-models skill)
- 用户已有现成的视频脚本,只需要渲染(不属于本 skill 范围)
输入与输出
Input:
topic: 用户输入的教学主题或知识点(如"梯形的面积""勾股定理""牛顿第二定律")。如果用户上传了图片,topic 可为空字符串image(可选): 用户上传的图片,需转为 Base64 字符串(不含data:image/xxx;base64,前缀,仅纯 Base64 内容)history(可选): 对话历史列表- wasu CLI 登录状态和 API Key(运行时获取)
输入模式判断:
- 用户同时提供图片和文字 →
image填图片 Base64,topic填文字描述 - 用户仅提供图片 →
image填图片 Base64,topic传空字符串"" - 用户仅提供文字 →
topic填主题文字,image不传(或传 null)
Output:
- 通过 POST 请求
{root_url}/generate_async提交视频生成任务 - 服务端返回路径(如
/view/xxx/index.html),拼接后得到完整预览链接{root_url}<返回路径> - 输出可点击的 Markdown 链接供用户访问
环境准备
检测 wasu CLI 是否已安装
wasu --version
- 成功返回版本号 → 执行
wasu --update更新后进入工作流程 - 命令不存在 → 进入安装流程
安装 wasu CLI
方式一:npm 安装(推荐)
npm install -g wasu-cli --registry=https://registry.npmmirror.com
方式二:安装脚本(npm 不可用时)
Windows (PowerShell):
irm https://gitee.com/wasu-smarthome/wasu-cli/raw/main/install.ps1 | iex
macOS / Linux:
curl -fsSL https://gitee.com/wasu-smarthome/wasu-cli/raw/main/install.sh | bash
安装完成后验证 wasu --version。
其他前置条件
- 用户已完成 Wasu 平台注册并拥有可用额度
- 本地视频生成服务运行在
{root_url}
工作流程
第一步:检查登录状态
wasu --user_config
解析返回的 JSON:
"logged_in":true→ 跳到第三步"logged_in":false→ 进入第二步
第二步:引导登录
登录需要微信扫码,流程如下:
2.1 生成二维码
wasu --login
返回 JSON 格式:
{"qrImageURL":"https://api.2dcode.biz/v1/create-qr-code?data=...","qrcodeId":"xxx","scanURL":"https://..."}
展示二维码给用户:
- 使用
qrImageURL字段以 Markdown 图片语法展示: - 同时输出
scanURL作为备用链接
2.2 预创建 keystore 并启动轮询
展示二维码后立即执行以下步骤,无需等待用户回复:
# 预创建 keystore 文件
# Windows (PowerShell):
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.wasu" | Out-Null
New-Item -ItemType File -Force -Path "$env:USERPROFILE\.wasu\keystore.enc" | Out-Null
# macOS / Linux:
mkdir -p ~/.wasu && touch ~/.wasu/keystore.enc && chmod 600 ~/.wasu/keystore.enc
# 轮询扫码状态(最长等待 120 秒)
wasu --login-status <qrcodeId> --out 120
"status":"success"→ 登录成功,进入第三步"status":"expired"→ 二维码已过期,回到 2.1 重新生成"status":"timeout"→ 等待超时,提示用户并做最后一次检查
第三步:获取 API Key
绝对不要在对话、文本输出或日志中展示 API Key。
wasu --llm-config
返回 JSON:
{"apiKey":"sk-xxxx","baseUrl":"https://api.example.com/v1"}
解析 JSON 并缓存 apiKey 值(仅内存变量,不写入对话输出)。
第四步:确认用户输入
纯文本模式
- 如果用户已在请求中提供了主题/知识点,直接使用
- 如果用户未提供主题,询问用户:
请输入你要生成教学视频的主题或知识点,例如"梯形的面积""勾股定理""光合作用"等。
图片模式
用户上传图片时:
- 读取图片:使用 Read 工具读取用户提供的图片文件路径
- 转为 Base64:将图片内容转为 Base64 字符串(仅纯 Base64 内容,不要包含
data:image/xxx;base64,前缀) - 确定 topic:
- 用户附带了文字描述 → topic 填描述文字
- 用户仅发图片 → topic 传空字符串
""
Base64 转换命令(Python):
import base64
with open("<图片路径>", "rb") as f:
b64 = base64.b64encode(f.read()).decode("utf-8")
第五步:发送 POST 请求并输出结果链接
5.1 构造请求体
使用以下 JSON 作为 POST 请求体,对应接口类 ChatRequest,发送到 {root_url}/generate_async:
纯文本模式:
{
"topic": "<用户输入的主题>",
"model": "wasu-qwen3.7",
"apikey": "<第三步获取的apiKey>"
}
图片模式:
{
"topic": "<用户输入的文字描述,无描述则为空字符串>",
"image": "<图片 Base64 字符串>",
"model": "wasu-qwen3.7",
"apikey": "<第三步获取的apiKey>"
}
参数说明:
| 参数 | 必填 | 说明 |
|------|------|------|
| topic | 是 | 用户输入的主题或图片描述(原始文本)。图片模式下无描述时传空字符串 "" |
| image | 否 | 图片的 Base64 编码字符串(纯 Base64,不含 data:image/xxx;base64, 前缀) |
| history | 否 | 对话历史列表 List[dict],一般不传 |
| model | 否 | 视频生成使用的模型,默认 wasu-qwen3.7(固定值) |
| apikey | 否 | Wasu 平台认证密钥,提供则优先使用 |
请求方式:
- 方法:
POST - 目标地址:
{root_url}/generate_async - Content-Type:
application/json
5.2 发送请求
纯文本模式(使用 Python):
import urllib.request, json
data = json.dumps({
"topic": "<用户输入的主题>",
"model": "wasu-qwen3.7",
"apikey": "<apiKey>"
}).encode("utf-8")
req = urllib.request.Request(
"{root_url}/generate_async",
data=data,
headers={"Content-Type": "application/json; charset=utf-8"}
)
with urllib.request.urlopen(req) as resp:
print(resp.read().decode("utf-8"))
图片模式(使用 Python):
import urllib.request, json, base64
with open("<图片路径>", "rb") as f:
img_b64 = base64.b64encode(f.read()).decode("utf-8")
data = json.dumps({
"topic": "<描述文字或空字符串>",
"image": img_b64,
"model": "wasu-qwen3.7",
"apikey": "<apiKey>"
}).encode("utf-8")
req = urllib.request.Request(
"{root_url}/generate_async",
data=data,
headers={"Content-Type": "application/json; charset=utf-8"}
)
with urllib.request.urlopen(req) as resp:
print(resp.read().decode("utf-8"))
绝对不要在对话中输出包含 API Key 的命令。 直接在 shell 中执行即可,用户不需要看到 API Key。Base64 图片内容非常大,也绝对不要在对话中输出。
5.3 解析响应并输出链接
服务端返回路径如 /view/xxx/index.html。将其与主站 URL 拼接:
{root_url}<返回路径>
5.4 输出格式
向用户输出以下内容,视频链接必须使用 Markdown 可点击链接格式(不要用代码块包裹 URL,否则用户无法直接点击):
纯文本模式:
教学视频已生成!
**主题**:<用户输入的主题>
[点击查看教学视频](<拼接后的完整 URL>)
图片模式(有描述):
教学视频已生成!
**输入**:图片 + "<描述文字>"
[点击查看教学视频](<拼接后的完整 URL>)
图片模式(仅图片,无描述):
教学视频已生成!
**输入**:图片
[点击查看教学视频](<拼接后的完整 URL>)
重要:
- 不要在对话中明文展示 API Key 或 Base64 图片内容
- 必须使用 Markdown 链接格式
[点击查看教学视频](<完整URL>)输出链接,确保用户可以直接点击打开。不要将 URL 放在代码块中,也不要仅输出裸 URL
错误处理
| 场景 | 处理方式 |
|---|---|
| wasu CLI 未安装 | 执行环境准备中的安装流程 |
| 未登录 | 引导用户完成第二步微信扫码登录 |
| 登录超时 | 重新生成二维码并提示用户扫描 |
wasu --llm-config 返回 apiKey 为空 |
提示用户检查 Wasu 平台账户是否有可用额度 |
| 用户未提供主题 | 检查是否为图片模式,图片模式下 topic 可传空字符串;纯文本模式下则主动询问用户输入主题 |
| 用户提供的图片不存在 | 提示用户确认图片路径是否正确 |
| 图片过大(Base64 超过限制) | 提示用户缩小图片或降低分辨率后重试 |
| 本地服务未运行(无法连接) | 提示用户确认本地视频生成服务是否已在 {root_url} 启动 |
| POST 请求失败(非 2xx 响应) | 输出服务端返回的错误信息,提示用户检查参数或服务状态 |
| POST 响应未包含有效路径 | 输出完整响应内容,提示用户联系服务端确认接口格式 |
| 网络错误 | 提示用户检查网络连接后重试 |
| keystore.enc 创建失败 | 在沙盒中预创建 ~/.wasu/keystore.enc 文件 |
注意事项
- API Key 是敏感信息,仅在 POST 请求体中使用,绝对不要在对话文本中单独明文展示
- 不要输出包含 API Key 的命令,直接在 Shell 中静默执行即可
- POST 请求体中 topic 使用原始文本即可,无需 URL 编码(JSON 序列化会自动处理)
- model 参数默认为
wasu-qwen3.7,不可由用户更改 - 图片模式:Base64 字符串仅包含纯编码内容,不要带
data:image/xxx;base64,前缀 - 图片模式:Base64 内容非常大,绝对不要在对话中输出
- 本地视频生成服务必须运行在
{root_url},如果端口不同需告知用户调整 - 服务端返回的路径(如
/view/xxx/index.html)需与主站 URL{root_url}拼接后输出 - 此技能不负责视频的实际生成和渲染,仅负责发送生成请求并输出结果 URL
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Areas to improve
-
缺少显式When to Use章节 Reported severity: Minor
文档中已有边界声明说明使用场景,但未使用标准的"When to Use"章节标题
Recommendation: 建议将"边界声明"章节标题改为"When to Use"以符合标准文档规范
Highlights
- 提供端到端教学视频生成解决方案
- 支持文本和图片两种输入模式
- 明确区分与相似skill的功能边界
Highlights
- 触发词覆盖完整且精准
- 边界声明清晰,避免与其他skill混淆
- 输入输出定义明确
Highlights
- Phase/步骤划分清晰完整
- 提供详细的Python代码示例
- 配置变量集中管理便于维护
Highlights
- 异常处理覆盖12种常见场景
- 敏感信息处理规范(API Key不输出)
- 登录流程有状态轮询和超时机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Read local files
Limit access to selected files or the project directory. Avoid unrelated private records, secrets and configuration files.
Mentioned in main document · lines 178, 248 -
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 67 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 9, 30, 39, 141, 143
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- ...
- api.2dcode.biz
- api.example.com
- gitee.com
- iot-test.wasumedia.cn
- registry.npmmirror.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.