← 返回 Skills 市场
chuyun

Ai Video Skills

作者 chuyun · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
166
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-video-skills
功能描述
Build and execute skills.video video generation REST requests from OpenAPI specs. Use when user needs to create, debug, or document video generation calls on...
使用说明 (SKILL.md)

ai-video-skills

Overview

Use this skill to turn OpenAPI definitions into working video-generation API calls for skills.video. Prefer deterministic extraction from openapi.json instead of guessing fields.

Workflow

  1. Check API key and bootstrap environment on first use.
  2. Identify the active spec.
  3. Select the SSE endpoint pair for a video model.
  4. Extract request schema and generate a payload template.
  5. Execute POST /generation/sse/... as default and keep the stream open.
  6. If SSE does not reach terminal completion, poll GET /generation/{id} to terminal status.
  7. Return only terminal result (COMPLETED/SUCCEEDED/FAILED/CANCELED), never IN_PROGRESS.
  8. Apply retry and failure handling.

0) Check API key (first run)

Run this check before any API call.

python scripts/ensure_api_key.py

If ok is false, tell the user to:

  • Open https://skills.video/dashboard/developer and log in
  • Click Create API Key
  • Export the key as SKILLS_VIDEO_API_KEY

Example:

export SKILLS_VIDEO_API_KEY="\x3CYOUR_API_KEY>"

1) Identify the spec

Load the most specific OpenAPI first.

  • Prefer model-specific OpenAPI when available (for example /v1/openapi.json under a model namespace).
  • Fall back to platform-level openapi.json.
  • Use references/open-platform-api.md for base URL, auth, and async lifecycle.

2) Select a video endpoint

If docs.json exists, derive video endpoints from the Videos navigation group. Use default_endpoints from the script output as the primary list (SSE first).

python scripts/inspect_openapi.py \
  --openapi /abs/path/to/openapi.json \
  --docs /abs/path/to/docs.json \
  --list-endpoints

When docs.json is unavailable, pass a known endpoint directly (for example /generation/sse/kling-ai/kling-v2.6). Use references/video-model-endpoints.md as a snapshot list.

3) Extract schema and build payload

Inspect endpoint details and generate a request template from required/default fields.

python scripts/inspect_openapi.py \
  --openapi /abs/path/to/openapi.json \
  --endpoint /generation/sse/kling-ai/kling-v2.6 \
  --include-template

Use the returned request_template as the starting point. Do not add fields not defined by the endpoint schema. Use default_create_endpoint from output unless an explicit override is required.

4) Execute SSE request (default) with automatic fallback

Prefer the helper script. It creates via SSE and keeps streaming; if stream ends before terminal completion, it automatically switches to polling fallback.

python scripts/create_and_wait.py \
  --sse-endpoint /generation/sse/kling-ai/kling-v2.6 \
  --payload '{"prompt":"A cinematic dolly shot of neon city rain at night"}' \
  --poll-timeout 900 \
  --poll-interval 3

Treat SSE as the default result channel. Do not finish the task on IN_QUEUE or IN_PROGRESS. Return only after terminal result.

5) Fall back to polling

Use polling only if SSE cannot be established, disconnects early, or does not reach a terminal state. Use GET /generation/{id} (or model-spec equivalent path if the OpenAPI uses /v1/...).

curl -X GET "https://open.skills.video/api/v1/generation/\x3CGENERATION_ID>" \
  -H "Authorization: Bearer $SKILLS_VIDEO_API_KEY"

Stop polling on terminal states:

  • COMPLETED
  • FAILED
  • CANCELED

Recommended helper:

python scripts/wait_generation.py \
  --generation-id \x3CGENERATION_ID> \
  --timeout 900 \
  --interval 3

Return to user only after helper emits event=terminal.

6) Handle errors and retries

Handle these response codes for create, SSE, and fallback poll operations:

  • 400: request format issue
  • 401: missing/invalid API key
  • 402: possible payment/credits issue in runtime
  • 404: endpoint or generation id not found
  • 422: schema validation failed

Classify non-2xx runtime errors with:

python scripts/handle_runtime_error.py \
  --status \x3CHTTP_STATUS> \
  --body '\x3CRAW_ERROR_BODY_JSON_OR_TEXT>'

If category is insufficient_credits, tell the user to recharge:

  • Open https://skills.video/dashboard and go to Billing/Credits
  • Recharge or purchase additional credits
  • Retry after recharge

Optional balance check:

curl -X GET "https://open.skills.video/api/v1/credits" \
  -H "Authorization: Bearer $SKILLS_VIDEO_API_KEY"

Apply retries only for transient conditions (network failure or temporary 5xx). Use bounded exponential backoff (for example 1s, 2s, 4s, max 16s, then fail). Do not retry unchanged payloads after 4xx validation errors.

Rate limits and timeouts

Treat rate limits and server-side timeout windows as unknown unless documented in the active OpenAPI or product docs. If unknown, explicitly note this in output and choose conservative client defaults.

Resources

  • scripts/ensure_api_key.py: validate SKILLS_VIDEO_API_KEY and show first-run setup guidance
  • scripts/handle_runtime_error.py: classify runtime errors and provide recharge guidance for insufficient credits
  • scripts/inspect_openapi.py: extract SSE/polling endpoint pair, contract, and payload template
  • scripts/create_and_wait.py: create via SSE and auto-fallback to polling when stream does not reach terminal status
  • scripts/wait_generation.py: poll generation status until terminal completion and return final response
  • references/open-platform-api.md: SSE-first lifecycle, fallback polling, retry baseline
  • references/video-model-endpoints.md: current video endpoint snapshot from docs.json
安全使用建议
This package contains Python helper scripts that will call open.skills.video endpoints and require an API key provided as SKILLS_VIDEO_API_KEY. Before installing or giving the agent this skill: (1) understand that the skill will make network calls to https://open.skills.video and will use whatever API key you set; (2) do not provide unrelated credentials — only a dedicated skills.video API key is needed; (3) prefer a least-privilege API key (scoped/limited if the platform supports it) and avoid exposing high-privilege or multi-service keys; (4) inspect the bundled scripts yourself (they are plain Python) if you have security concerns; and (5) ask the skill author/registry maintainer to update the metadata to declare SKILLS_VIDEO_API_KEY as a required credential so the requirement is visible in the registry.
功能分析
Type: OpenClaw Skill Name: ai-video-skills Version: 0.1.0 The skill bundle is a legitimate integration for the skills.video platform, designed to help an AI agent generate videos using various AI models. It contains well-structured Python scripts for inspecting OpenAPI specifications (inspect_openapi.py), managing asynchronous generation tasks via SSE with polling fallbacks (create_and_wait.py, wait_generation.py), and handling API errors (handle_runtime_error.py). All network requests are directed to the official domain (open.skills.video), and the use of the SKILLS_VIDEO_API_KEY environment variable is standard for such integrations. No evidence of data exfiltration, malicious code execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
The name/description (building and executing skills.video generation calls) aligns with the included scripts and references (create SSE requests, poll results, inspect OpenAPI). Network targets are limited to the documented platform (open.skills.video). However, the registry metadata lists no required credentials while the runtime clearly depends on SKILLS_VIDEO_API_KEY — a mismatch between claimed requirements and actual needs.
Instruction Scope
SKILL.md and the scripts keep to the stated scope: inspecting OpenAPI files, building payloads, POSTing to SSE endpoints, and falling back to polling. Instructions do not request unrelated system files or arbitrary external endpoints beyond skills.video. They do instruct running the included Python scripts and reading user-supplied OpenAPI/docs files.
Install Mechanism
No install spec (instruction-only/embedded scripts) — low installation risk. All behavior is in plain Python scripts bundled with the skill (no downloads or archive extraction).
Credentials
The runtime expects and reads SKILLS_VIDEO_API_KEY (scripts and examples use it for Authorization), but the skill metadata declares no required env vars or primary credential. Requesting that API key is proportionate to the skill's purpose, but the omission in metadata is a coherence/visibility problem: users may not realize they must provide a bearer key or how it will be used.
Persistence & Privilege
always:false and no filesystem/config paths requested. The skill does not appear to modify other skills or system-wide settings. It runs subprocesses only to invoke helper scripts and performs network I/O to the expected service.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ai-video-skills
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ai-video-skills 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of ai-video-skills. - Provides a workflow to build and execute skills.video API calls from OpenAPI specs. - Supports SSE-first video generation requests with automatic polling fallback. - Adds robust error handling, including guidance for API key setup and credit issues. - Includes helper scripts for endpoint inspection, payload generation, and terminal result polling. - Documentation covers workflow steps, error classes, retry rules, and resource references.
元数据
Slug ai-video-skills
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Ai Video Skills 是什么?

Build and execute skills.video video generation REST requests from OpenAPI specs. Use when user needs to create, debug, or document video generation calls on... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 166 次。

如何安装 Ai Video Skills?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-video-skills」即可一键安装,无需额外配置。

Ai Video Skills 是免费的吗?

是的,Ai Video Skills 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Ai Video Skills 支持哪些平台?

Ai Video Skills 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Ai Video Skills?

由 chuyun(@chuyun)开发并维护,当前版本 v0.1.0。

💬 留言讨论