@danhachuel/thunderbolt 0.2.17 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: moneyprinterturbo-video
3
+ description: Use this skill whenever the user wants to create a finished video from a topic, title, idea, prompt, or script with MoneyPrinterTurbo. This includes short-form, voice-over, educational, marketing, social-media, and stock-footage videos. Also use it when the user mentions MoneyPrinterTurbo, provides this Skill URL, asks an AI agent to install or configure MoneyPrinterTurbo, needs missing API keys identified, wants a failed generation repaired, or wants a generated MP4 located and delivered. Use this skill when the expected outcome is a final video file, not setup instructions.
4
+ compatibility: Requires an AI agent with terminal, network, filesystem, and long-running command support. Supports macOS and Windows and uses uv exclusively.
5
+ metadata:
6
+ author: "harry0703@hotmail.com"
7
+ version: "1.3.2"
8
+ upstream: "https://github.com/harry0703/MoneyPrinterTurbo"
9
+ ---
10
+
11
+ # MoneyPrinterTurbo Video Generation
12
+
13
+ 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.
14
+
15
+ ## Required Behavior
16
+
17
+ 1. Ask the user only for required API credentials that are missing, rejected, or unusable. Combine all required credentials into one request.
18
+ 2. Do not ask for confirmation before installing, generating, waiting, using defaults, or returning the result.
19
+ 3. Do not create or repeatedly update a detailed plan for a standard generation request. Send one short progress update and execute.
20
+ 4. Run the helper as one foreground command with a timeout of at least 20 minutes.
21
+ 5. Never poll with `sleep`, `echo`, `ps`, repeated `ls`, or repeated `tail`. If the terminal returns a resumable session ID, continue waiting on that same session.
22
+ 6. Do not read the full log after success. Read only the short reported error or the relevant log tail after failure.
23
+ 7. Never print API keys, tokens, the full `config.toml`, or credential-bearing configuration fragments.
24
+
25
+ ## Defaults
26
+
27
+ 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.
28
+
29
+ ## Execution
30
+
31
+ ### 1. Locate the helper
32
+
33
+ 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.
34
+
35
+ 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.
36
+
37
+ 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:
38
+
39
+ ```text
40
+ https://raw.githubusercontent.com/harry0703/MoneyPrinterTurbo/main/docs/skill/mpt_agent.py
41
+ ```
42
+
43
+ ### 2. Run the helper
44
+
45
+ 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.
46
+
47
+ macOS uv installation:
48
+
49
+ ```bash
50
+ curl -LsSf https://astral.sh/uv/install.sh | sh
51
+ ```
52
+
53
+ Windows PowerShell uv installation:
54
+
55
+ ```powershell
56
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
57
+ ```
58
+
59
+ Use this foreground command with `workdir=SKILL_DIR` and a timeout of at least 20 minutes:
60
+
61
+ ```bash
62
+ uv run --no-project --python 3.11 python mpt_agent.py --subject "<video topic>"
63
+ ```
64
+
65
+ 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.
66
+
67
+ Do not use Docker, Conda, system pip, or a manually managed virtual environment.
68
+
69
+ ## Exit Handling
70
+
71
+ ### Exit code 0: deliver the result
72
+
73
+ Successful output has this form:
74
+
75
+ ```text
76
+ MPT_RESULT
77
+ VIDEO_FILE=<absolute path>/final-1.mp4
78
+ TASK_DIR=<absolute path>/storage/tasks/<task_id>
79
+ LOG_FILE=<absolute path>/run-<task_id>.log
80
+ RESULT_FILE=<absolute path>/latest-result.json
81
+ ```
82
+
83
+ `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.
84
+
85
+ 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:
86
+
87
+ ```text
88
+ ~/MoneyPrinterTurbo/.agent-logs/moneyprinterturbo-video/latest-result.json
89
+ ```
90
+
91
+ Treat `status=completed` as success. Return only the absolute video path and a concise description, for example:
92
+
93
+ ```text
94
+ The video is ready.
95
+ Topic: ...
96
+ Video file: /absolute/path/to/final-1.mp4
97
+ Summary: Chinese portrait video with voice-over, subtitles, and background music.
98
+ ```
99
+
100
+ ### Exit code 10: request credentials once
101
+
102
+ `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`.
103
+
104
+ After the user responds, rerun the same foreground command with only the required environment variables:
105
+
106
+ ```text
107
+ MPT_LLM_PROVIDER
108
+ MPT_LLM_API_KEY
109
+ MPT_LLM_BASE_URL
110
+ MPT_LLM_MODEL_NAME
111
+ MPT_PEXELS_API_KEY
112
+ ```
113
+
114
+ ### Exit code 1: repair or report
115
+
116
+ 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.
117
+
118
+ 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.
119
+
120
+ ## Configuration and Background Fallback
121
+
122
+ 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.
123
+
124
+ 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.
125
+
126
+ ## Scope
127
+
128
+ - Support macOS and Windows only.
129
+ - Use uv and the MoneyPrinterTurbo CLI only.
130
+ - Do not start Docker, WebUI, or API services.
131
+ - Do not run multiple video jobs concurrently.
132
+ - Pass additional video requirements after `--`. Run `cli.py --help` once only when an unfamiliar option must be verified.