docs/skill/SKILL.md
The user only needs to provide a video topic or script. Complete installation, configuration reuse, generation, waiting, and final MP4 delivery automatically. Do not stop after giving instructions or commands.
sleep, echo, ps, repeated ls, or repeated tail. If the terminal returns a resumable session ID, continue waiting on that same session.config.toml, or credential-bearing configuration fragments.Unless the user requests otherwise, generate one Chinese 9:16 portrait video with Pexels footage, the default Chinese Edge TTS voice, subtitles, and background music. Install MoneyPrinterTurbo under the user's home directory.
Resolve SKILL_DIR from this SKILL.md file. The helper is the adjacent mpt_agent.py. Set the terminal tool's working directory to SKILL_DIR and invoke the helper by its relative filename. Do not put the absolute helper path in the command, and do not run an extra ls or dir check.
This is required on Windows because some agent terminal validators remove backslashes from absolute paths embedded in commands. Using mpt_agent.py with workdir=SKILL_DIR avoids that failure and works on both macOS and Windows.
If the client loaded only the remote SKILL.md, download the helper from the official repository to a temporary directory, then use that temporary directory as the command working directory:
https://raw.githubusercontent.com/harry0703/MoneyPrinterTurbo/main/docs/skill/mpt_agent.py
Do not run a separate uv --version preflight. Run the helper directly. If the shell explicitly reports that uv is missing, install uv and retry the same helper command once.
macOS uv installation:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows PowerShell uv installation:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Use this foreground command with workdir=SKILL_DIR and a timeout of at least 20 minutes:
uv run --no-project --python 3.11 python mpt_agent.py --subject "<video topic>"
On Windows, do not try absolute backslash paths, absolute forward-slash paths, or copies in the workspace before this relative command. If a terminal tool reports referenced_script_path_missing, verify that its working directory is exactly SKILL_DIR and retry the relative command once. Do not cycle through path variants.
Do not use Docker, Conda, system pip, or a manually managed virtual environment.
Successful output has this form:
MPT_RESULT
VIDEO_FILE=<absolute path>/final-1.mp4
TASK_DIR=<absolute path>/storage/tasks/<task_id>
LOG_FILE=<absolute path>/run-<task_id>.log
RESULT_FILE=<absolute path>/latest-result.json
mpt_agent.py emits VIDEO_FILE only after confirming that the file exists and is non-empty. Do not run another ls, stat, or file validation command.
If the terminal reports exitCode=0 but truncates the output or returns a history-file reference without MPT_RESULT, do not infer failure and do not inspect old logs. Read this file once:
~/MoneyPrinterTurbo/.agent-logs/moneyprinterturbo-video/latest-result.json
Treat status=completed as success. Return only the absolute video path and a concise description, for example:
The video is ready.
Topic: ...
Video file: /absolute/path/to/final-1.mp4
Summary: Chinese portrait video with voice-over, subtitles, and background music.
MPT_NEEDS_INPUT includes only the required fields, recommended LLM providers and signup links, custom OpenAI-compatible requirements, and the Pexels signup link. Ask only for the listed values and do not request credentials already found in config.toml.
After the user responds, rerun the same foreground command with only the required environment variables:
MPT_LLM_PROVIDER
MPT_LLM_API_KEY
MPT_LLM_BASE_URL
MPT_LLM_MODEL_NAME
MPT_PEXELS_API_KEY
Use MPT_ERROR and LOG_FILE to repair a recoverable problem and retry once. Ask the user only if the repair requires a new API key. If the retry fails, report the failed stage, a short error, and the log path.
A terminal-tool path validation error is not a video-generation failure because the helper did not start. Correct the working directory and retry the relative command once. Never ask the user to copy mpt_agent.py, run commands manually, or confirm whether the agent should continue.
The helper may read the complete local config.toml to reuse existing settings, but it must never print its contents. It reuses a working LLM provider automatically and validates configured Pexels keys through the authenticated My Collections endpoint before generation.
Use background mode only if the agent platform cannot wait for a foreground process. Wait for the platform's process-completion notification without polling, then read latest-result.json once.
--. Run cli.py --help once only when an unfamiliar option must be verified.