World Cup Video Generator
Intent
Turn a user's natural-language request into a finished Chinese match analysis MP4. The user should not need to know commands, package directories, pnpm, or stage names.
Use scripts/worldcup-video.mjs as the only command entrypoint. The skill carries its runtime under assets/engine.
Natural-Language Workflow
When the user asks for a match analysis video:
- Extract the matchup.
- Translate common Chinese country/team names to English for CLI arguments.
- Preserve the user's wording in--notewhen it adds analysis requirements. - Resolve relative dates.
- "today" means the agent's current local date.
- "tomorrow" and "tonight" should become an ISO date in--kickoff YYYY-MM-DDwhen useful. - Infer defaults.
- Use--competition "World Cup"unless the user names another competition.
- Use no--stageunless the user names a round such as quarter-final, semi-final, final, group stage, or round of 16. - Build a stable run id such as
spain-belgium-20260710. - Run doctor, then generate with
--render-video --force. - Verify the MP4 exists and report the absolute path.
Ask a follow-up only when one of the two teams is missing, the user asks for a non-World-Cup competition that cannot be inferred, or provider auth is unavailable.
Example
User says:
Generate today's Spain vs Belgium match analysis video.
Run from this skill directory:
node scripts/worldcup-video.mjs doctor
node scripts/worldcup-video.mjs generate --id spain-belgium-<YYYYMMDD> --home Spain --away Belgium --competition "World Cup" --kickoff <YYYY-MM-DD> --note "Generate a Chinese pre-match analysis video for today's Spain vs Belgium match." --render-video --force
If the user says the same thing in Chinese, do the same translation and execution. Do not ask the user to provide command-line flags.
Command Entrypoint
Use these commands internally:
node scripts/worldcup-video.mjs doctor
node scripts/worldcup-video.mjs generate --id <run-id> --home <team> --away <team> --competition "World Cup" --render-video --force
node scripts/worldcup-video.mjs render image --packageDir assets/engine/outputs/runs/<run-id>/video --scene 3 --force
node scripts/worldcup-video.mjs render audio --packageDir assets/engine/outputs/runs/<run-id>/video --force
node scripts/worldcup-video.mjs render avatar --packageDir assets/engine/outputs/runs/<run-id>/video --force
node scripts/worldcup-video.mjs render segment --packageDir assets/engine/outputs/runs/<run-id>/video --force
node scripts/worldcup-video.mjs render assemble --packageDir assets/engine/outputs/runs/<run-id>/video --force
The final video is written to:
assets/engine/outputs/runs/<run-id>/video/<run-id>.mp4
If the user wants outputs somewhere else, pass --output-dir <path>.
Request Parsing
Read references/request-parsing.md for:
- Chinese-to-English team names.
- Relative date handling.
- Run id conventions.
- Final response style.
Failure Handling
If the complete generate command fails:
- Identify the failed stage from the error.
- Read
references/troubleshooting.md. - Rerun only the failed stage when possible.
- Continue to final assembly after the failed stage succeeds.
Do not restart the entire full pipeline unless search/report/storyboard inputs need to change.
Model Defaults
Keep long reasoning models for report writing only. The engine defaults storyboard JSON and image prompt optimization to qwen-plus because those stages must be fast and schema-stable.
Use these environment variables only when needed:
PI_MODEL_ID # report model
PI_STORYBOARD_MODEL_ID # storyboard JSON model, default qwen-plus
PI_IMAGE_PROMPT_MODEL_ID # image prompt optimizer, default qwen-plus
Safety Rules
- Do not print provider auth values or
.envcontents. - Do not invent unsupported injuries, lineups, odds, match times, venues, or weather.
- Treat odds, probabilities, and score predictions as uncertain pre-match analysis, never betting advice.
- Do not promise outcomes, returns, accuracy, guaranteed wins, or betting actions.
References
- Read
references/request-parsing.mdfor natural-language request handling. - Read
references/examples.mdwhen adapting a user sentence into a command. - Read
references/env.mdwhen provider auth or settings are missing. - Read
references/output-contract.mdwhen verifying or handing off artifacts. - Read
references/troubleshooting.mdwhen a stage fails. - Read
references/engine.mdwhen copying, updating, or rebuilding the portable engine.