← Back to Skills Marketplace
patches429

Ai Director

by Parker · GitHub ↗ · v0.1.1 · MIT-0
cross-platform ⚠ suspicious
285
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install ai-director
Description
AI short drama generation - account management, script writing, video production. Integrated X2C billing for commercial deployment.
README (SKILL.md)

AI Director - AI Short Drama Generation

Complete AI short drama solution — from concept to finished film, with integrated X2C platform account management and billing.

Multi-User Support

Each user has independent X2C credentials stored in credentials/{USER_ID}.json.

Set USER_ID or TELEGRAM_USER_ID env var when calling scripts:

USER_ID=12345 node {baseDir}/scripts/ad-account-manager.js check-binding

OpenClaw passes the user ID automatically from chat context.

Modules

1. Ad Account Manager

X2C platform account binding and verification.

# Send verification code
node {baseDir}/scripts/ad-account-manager.js send-code [email protected]

# Verify and get API Key
node {baseDir}/scripts/ad-account-manager.js verify [email protected] 123456

# Check binding status
node {baseDir}/scripts/ad-account-manager.js check-binding

# View config options
node {baseDir}/scripts/ad-account-manager.js config

# Unbind account
node {baseDir}/scripts/ad-account-manager.js unbind

# Direct bind with existing key
node {baseDir}/scripts/ad-account-manager.js bind --key "x2c_sk_xxx"

2. Ad Character Manager

Manage custom characters for video production. Max 5 per user.

node {baseDir}/scripts/ad-character-manager.js list
node {baseDir}/scripts/ad-character-manager.js create \x3Cname> \x3Cgender> \x3Cimage_url>
node {baseDir}/scripts/ad-character-manager.js delete \x3Ccharacter_id>
Param Required Options
name Yes Display name
gender Yes male, female, other
image_url Yes Public URL (max 10MB)

3. Ad Writer (Prompt Engineering)

Agent reads references/AD-WRITER-GUIDE.md and generates a complete script based on user's creative concept. Outputs: title, synopsis, character bios, outline, episode breakdowns, full screenplay.

4. Ad Producer (Video Production)

# View pricing and config
node {baseDir}/scripts/ad-producer.js config

# Generate script
node {baseDir}/scripts/ad-producer.js generate-script "your concept" --wait

# Check script status
node {baseDir}/scripts/ad-producer.js script-status \x3Cproject_id>

# Produce video
node {baseDir}/scripts/ad-producer.js produce-video \x3Cproject_id> 1 --wait

# Check video progress
node {baseDir}/scripts/ad-producer.js video-status \x3Cproject_id> 1

# Full workflow (recommended)
node {baseDir}/scripts/ad-producer.js full-workflow "your concept" --duration 120

Generation Options

Param Description Default
--mode short_video / short_drama short_video
--duration 60 / 120 / 180 / 300 120
--ratio 9:16 / 16:9 9:16
--style Style name -
--episodes Fixed: short_video=1, short_drama=10 -
--language zh / en zh
--character-ids Character UUIDs (comma-separated) -
--wait Wait for completion false

Cost

Item Credits USD
Script (short_video) 6 $0.06
Script (short_drama) 60 $0.60
Video 60s 299 $2.99
Video 120s 599 $5.99
Video 180s 799 $7.99
Video 300s 999 $9.99

Quality Evaluator

Uses Gemini to score video quality against defined criteria.

node {baseDir}/scripts/quality-evaluator.js \x3Cvideo_url> --prompt "original prompt"
node {baseDir}/scripts/quality-evaluator.js \x3Cvideo_url> --json

Requires GEMINI_API_KEY env var or geminiApiKey in config.

Auto-Iterate

Automatically evaluate + improve prompt + regenerate until quality threshold met.

node {baseDir}/scripts/auto-iterate.js "your concept" \
  --duration 60 --style "style" --threshold 80 --max-iterations 5

Critical Rules

  • Confirm all parameters with user before generating video
  • Only use values from config options (styles, categories) — never custom values
  • Episodes are fixed: short_video=1, short_drama=10
  • Each episode can only be submitted once for production
  • Never auto-retry failed generations (costs credits)
  • Use async task handling — do not block with --wait in production
  • Output video URLs completely, never truncate
  • Remove &response-content-disposition=attachment from video URLs for browser playback

API Reference

See references/X2C-OPEN-API.md for complete API documentation.

Credentials

Store in credentials/{USER_ID}.json:

{
  "x2cApiKey": "x2c_sk_xxx",
  "x2cEmail": "[email protected]",
  "x2cUserId": "user-uuid"
}

Or set X2C_API_KEY env var, or configure via skills."ai-director".env.X2C_API_KEY in ~/.openclaw/openclaw.json.

Usage Guidance
Things to check before installing or enabling this skill: - Confirm why a global X2C_API_KEY is required when the skill supports per-user API keys (credentials/{USER_ID}.json). Prefer using per-user keys or a dedicated low-privilege test key rather than your main account key. - The docs mention uploading to Feishu and using GEMINI_API_KEY for QC but those credentials are not declared as required; inspect the actual JS files (ad-account-manager.js, ad-producer.js, quality-evaluator.js) to see whether they call external endpoints that need additional secrets. - The repository docs reference many scripts that are not present (Python drama_manager.py, giggle-api.js, auto-generate.js). That mismatch could mean the docs are stale or the skill is incomplete — don't assume all advertised behavior exists. - Per-user credentials are stored as plaintext JSON under credentials/{USER_ID}.json. If you must use it, store them in a sandbox, restrict filesystem permissions, and avoid placing org-level or long-lived keys there. - Review network endpoints in the scripts (e.g., giggle.pro / api.giggle.pro / X2C base URL) to confirm they are expected and trustworthy. Consider running the skill in an isolated environment (VM/container) first and testing with a throwaway X2C account. - If you rely on the Gemini quality-evaluator, verify whether the skill will send video thumbnails or full video URLs to an external QC service and whether that service requires a separate API key. - If anything is unclear, ask the skill author for a manifest of actual runnable scripts and a mapping of which env vars each script reads (and where credentials are persisted).
Capability Analysis
Type: OpenClaw Skill Name: ai-director Version: 0.1.1 The skill bundle provides a complex integration for AI video generation but contains significant security vulnerabilities and broken logic. Specifically, 'ad-account-manager.js' includes a function 'updateAccountAndSync' that attempts to write credentials to undefined file paths and execute an undefined sync script, which indicates risky credential management practices. Furthermore, 'auto-iterate.js' is vulnerable to shell injection as it passes user-controlled prompts directly into 'execSync' calls. While these issues appear to be unintentional bugs or poor architectural choices rather than deliberate malware, they create a high-risk environment for prompt injection and unauthorized command execution.
Capability Assessment
Purpose & Capability
The declared purpose (AI short drama generation + X2C billing) aligns with requiring node and an X2C API key. However the documentation frequently references other integrations (Feishu document upload, Gemini QC, various helper scripts like giggle-api.js/auto-generate.js and Python drama_manager.py) that are not present in the file manifest. The skill both advertises per-user credential files (credentials/{USER_ID}.json) and also requires a global X2C_API_KEY environment variable — the need for a global service key is not justified by the stated multi-user binding flow.
Instruction Scope
Runtime instructions tell the agent to read/write local credential files (credentials/{USER_ID}.json) and create projects/versions under a projects/ folder (writing to disk). They also direct many network interactions with external APIs (X2C/giggle.pro). The SKILL.md references env vars (USER_ID, TELEGRAM_USER_ID) and other services (GEMINI_API_KEY, Feishu) that are not declared as required in the registry metadata; scripts may therefore access additional secrets or endpoints not listed. Documentation commands reference several script names that are missing from the manifest, so following the SKILL.md blindly could result in failed or unexpected operations.
Install Mechanism
No install spec (instruction-only) is supplied; scripts are plain JS files to be executed with node. This is lower risk than downloading and extracting arbitrary binaries. There is no installer that would fetch code from unknown URLs in the manifest provided.
Credentials
The registry requires a single env var X2C_API_KEY which is appropriate for the advertised X2C integration. But the skill also mentions optional GEMINI_API_KEY (for quality scoring) and Feishu upload in the docs without declaring them as required. The coexistence of a required global X2C_API_KEY plus per-user credential files is inconsistent: if per-user API keys are the norm, a global X2C_API_KEY may be unnecessary and could be misused. The scripts will accept/persist keys to credentials/{USER_ID}.json — storing user API keys locally in plaintext increases risk of exposure to other local processes or skills.
Persistence & Privilege
The skill writes project data and user credential files to disk (projects/, credentials/) and updates local state; this persistence is expected for a production workflow. always:false and normal autonomous invocation are in place. Still, persisting per-user API keys and auto-saving project versions means the skill will retain credentials and created assets on disk — users should be aware and control file permissions and retention.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-director
  3. After installation, invoke the skill by name or use /ai-director
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.1
- Removed the version field and version number from SKILL.md for simplified documentation. - No changes to features or functionality.
v0.1.0
Initial release of AI Director: end-to-end AI short drama generation with X2C billing and multi-user support. - Adds full workflow: account binding, script writing, character management, and video production. - Integrated X2C billing and credential management per user. - Includes script generator, video producer, and quality evaluator modules. - Supports configurable video styles, durations, and languages. - Provides automated prompt improvement and quality iteration. - Enforces strict parameter validation and async processing best practices.
Metadata
Slug ai-director
Version 0.1.1
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Ai Director?

AI short drama generation - account management, script writing, video production. Integrated X2C billing for commercial deployment. It is an AI Agent Skill for Claude Code / OpenClaw, with 285 downloads so far.

How do I install Ai Director?

Run "/install ai-director" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Ai Director free?

Yes, Ai Director is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Ai Director support?

Ai Director is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Ai Director?

It is built and maintained by Parker (@patches429); the current version is v0.1.1.

💬 Comments