@remixmate/cli 0.9.14 → 0.9.16

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/billing.d.ts +44 -0
  4. package/dist/billing.js +76 -0
  5. package/dist/capabilities.d.ts +5 -1
  6. package/dist/cli.js +0 -0
  7. package/dist/http.d.ts +3 -0
  8. package/dist/http.js +4 -0
  9. package/dist/manifest.json +13 -13
  10. package/dist/runner.js +9 -0
  11. package/package.json +1 -1
  12. package/skills/export-jianying/version.json +1 -1
  13. package/skills/gen-digital-human/SKILL.md +12 -0
  14. package/skills/gen-digital-human/skill.json +9 -3
  15. package/skills/gen-digital-human/version.json +1 -1
  16. package/skills/gen-image/SKILL.md +51 -17
  17. package/skills/gen-image/skill.json +11 -3
  18. package/skills/gen-image/version.json +1 -1
  19. package/skills/gen-script/SKILL.md +17 -21
  20. package/skills/gen-script/version.json +1 -1
  21. package/skills/gen-video/SKILL.md +17 -3
  22. package/skills/gen-video/skill.json +10 -2
  23. package/skills/gen-video/version.json +1 -1
  24. package/skills/gen-voice/SKILL.md +13 -1
  25. package/skills/gen-voice/version.json +1 -1
  26. package/skills/prepare-video-assets/SKILL.md +12 -0
  27. package/skills/prepare-video-assets/version.json +1 -1
  28. package/skills/render-video/SKILL.md +12 -0
  29. package/skills/render-video/scripts/render_video.py +63 -0
  30. package/skills/render-video/version.json +1 -1
  31. package/skills/template-registry/scripts/render_job_client.py +27 -0
  32. package/skills/template-registry/version.json +1 -1
  33. package/skills/video-parser/version.json +1 -1
  34. package/skills/web-record/SKILL.md +131 -133
  35. package/skills/web-screenshot/SKILL.md +93 -96
  36. package/skills/web-screenshot/version.json +1 -1
@@ -1,56 +1,53 @@
1
1
  ---
2
2
  name: web-screenshot
3
3
  description: |
4
- 网页截图技能(只出静态图片 png/jpg),基于 Playwright Python,对任意 URL 落盘到本地。
5
- 支持:整页 / 视口 / 元素 / 区域截图、设备模拟、等待动态内容、隐藏 / 涂盖干扰元素、静态注释(红框 / 箭头 / 字幕 / 编号 / 打码 / 代码行高亮)。
6
-
7
- 只出图片(.png / .jpg)。要视频(.webm / 录屏 / 分镜)请用 web-record / `web_record`。
8
-
9
- 当用户提到以下任何需求时,立即使用本 skill
10
- - 网页截图、网页截屏、整页截图、长截图、full page screenshot
11
- - 截某个元素 / 区域、局部截屏、focus 某个区域
12
- - 截图前隐藏元素 / 涂盖打码(cookie banner、敏感信息)
13
- - 给静态截图加注释(红框 / 箭头 / 标签 / 字幕条 / 编号)
14
- - 高亮某文件的 L5-L20 代码行并截图
15
- - 等元素出现后再截图
16
- - 移动端 / 设备模拟截图(iPhone / Pixel 等)
17
- - cookie / 登录态、storageState 截图
18
-
19
- 即使用户没明确提「playwright」,只要他们想对一个 URL 截图并拿到本地图片文件,也要使用本 skill。
4
+ Web-page screenshot skill (still images only, png/jpg), built on Playwright Python — captures any URL to a local image file.
5
+ Supports: full-page / viewport / element / region capture, device emulation, waiting for dynamic content, hiding or masking distracting elements, and static annotations (highlight box / arrow / caption / numbered sequence / redact / code-line highlight).
6
+
7
+ Images only (`.png` / `.jpg`). For video (`.webm` / screen recording / storyboard clips) use web-record / `web_record`.
8
+
9
+ Use this skill immediately whenever the user asks for any of:
10
+ - Web page screenshot, screen capture, full-page screenshot, long screenshot
11
+ - Capture a specific element / region, partial screenshot, focus on an area
12
+ - Hide or mask elements before capturing (cookie banner, sensitive information)
13
+ - Annotate a still screenshot (highlight box / arrow / label / caption bar / numbering)
14
+ - Highlight lines L5-L20 of a file and screenshot it
15
+ - Wait for an element to appear, then capture
16
+ - Mobile / device-emulated screenshot (iPhone / Pixel, etc.)
17
+ - Capture with cookies / a logged-in session / storageState
18
+
19
+ Even when the user does not say "playwright", any request to screenshot a URL and get a local image file should route here.
20
20
  triggers:
21
- - 网页截图、网页截屏、整页截图、长截图、full page screenshot
22
- - 截某个元素 / 区域、局部截屏、focus 某个区域
23
- - 截图前隐藏元素 / 涂盖打码、给静态截图加注释(红框 / 箭头 / 标签)
24
- - 高亮某文件的 L5-L20 代码行并截图
25
- - 移动端 / 设备模拟截图、带 cookie / 登录态截图
21
+ - Web page screenshot, screen capture, full-page screenshot, long screenshot
22
+ - Capture a specific element / region, partial screenshot, focus on an area
23
+ - Hide or mask elements before capturing, annotate a still screenshot (highlight box / arrow / label)
24
+ - Highlight lines L5-L20 of a file and screenshot it
25
+ - Mobile / device-emulated screenshot, capture with cookies / a logged-in session
26
26
  ---
27
27
 
28
- # 网页截图 Skillweb_screenshot
28
+ # Web Screenshot Skill (`web_screenshot`)
29
29
 
30
- 入口脚本 **`scripts/screenshot.py`**,纯 Python 实现,输出 **`.png` / `.jpg`**。整页 / 视口 / 元素 / 区域。
30
+ Entry script **`scripts/screenshot.py`**, pure Python, outputs **`.png` / `.jpg`**. Full page / viewport / element / region.
31
31
 
32
- > **只出图片。** 录屏 / 分镜视频(`.webm`)走 **web-record / `web_record`**——传 `--output xxx.webm`
33
- > 到本 skill 会被直接拒绝并提示改用 `web_record`。录屏入口脚本 `scripts/record.py` 与本 skill 同处
34
- > 一个目录(两者共享下面的 `_media_screenshot/` 包),但它属于 web-record 这个工具,用法见
35
- > **`skills/web-record/SKILL.md`**。
32
+ > **Still images only.** Screen recording and storyboard video (`.webm`) go through **web-record / `web_record`** — passing `--output xxx.webm` to this skill is rejected outright with a pointer to `web_record`. The recording entry script `scripts/record.py` lives in this same directory (both share the `_media_screenshot/` package below), but it belongs to the web-record tool; see **`skills/web-record/SKILL.md`** for its usage.
36
33
 
37
- 底层共享 **`scripts/_media_screenshot/`** 包,封装 Playwright Python API + 所有浏览器侧 JS 注入(overlay / zoom / scroll 等)。
34
+ Both share the **`scripts/_media_screenshot/`** package underneath, which wraps the Playwright Python API plus every browser-side JS injection (overlay / zoom / scroll, etc.).
38
35
 
39
- > 路径约定:读取系统注入的 `Base directory for this skill: <path>` 作为 `<SkillDir>`,命令里的 `<SkillDir>` 替换为该路径,切勿硬编码绝对路径。`python` macOS 上可能需写成 `python3`。
36
+ > Path convention: read the system-injected `Base directory for this skill: <path>` as `<SkillDir>` and substitute it for `<SkillDir>` in the commands below. Never hardcode an absolute path.
40
37
 
41
- ## 前置依赖
38
+ ## Prerequisites
42
39
 
43
40
  - **Python 3.9+**
44
- - **`playwright` pip + chromium 内核**:首次运行**自动 bootstrap**——脚本检测到缺包会执行 `pip install playwright` + `playwright install chromium`。
45
- - 也可提前手动装:
41
+ - **The `playwright` pip package + the chromium engine**: the first run **bootstraps automatically** — when the script detects the package is missing it runs `pip install playwright` + `playwright install chromium`.
42
+ - You can also install it up front:
46
43
  ```bash
47
44
  pip install playwright
48
45
  playwright install chromium
49
46
  ```
50
47
 
51
- ## 截屏 `screenshot.py`
48
+ ## Capturing with `screenshot.py`
52
49
 
53
- ### 最小用法
50
+ ### Minimal usage
54
51
 
55
52
  ```bash
56
53
  python3 <SkillDir>/scripts/screenshot.py \
@@ -58,7 +55,7 @@ python3 <SkillDir>/scripts/screenshot.py \
58
55
  --output "example.png"
59
56
  ```
60
57
 
61
- ### 整页截图
58
+ ### Full-page screenshot
62
59
 
63
60
  ```bash
64
61
  python3 <SkillDir>/scripts/screenshot.py \
@@ -67,9 +64,9 @@ python3 <SkillDir>/scripts/screenshot.py \
67
64
  --full-page
68
65
  ```
69
66
 
70
- ### 元素截屏(局部 focus
67
+ ### Element capture (focus on one part)
71
68
 
72
- CSS 选择器截**元素本身**(自动 `scrollIntoViewIfNeeded`):
69
+ Capture **the element itself** by CSS selector (automatically `scrollIntoViewIfNeeded`):
73
70
 
74
71
  ```bash
75
72
  python3 <SkillDir>/scripts/screenshot.py \
@@ -79,18 +76,18 @@ python3 <SkillDir>/scripts/screenshot.py \
79
76
  --wait-for-selector ".card.featured"
80
77
  ```
81
78
 
82
- 如不希望自动滚动:加 `--no-scroll-into-view`。
79
+ To suppress the automatic scroll, add `--no-scroll-into-view`.
83
80
 
84
- ### 区域截屏(像素矩形 clip
81
+ ### Region capture (pixel clip rectangle)
85
82
 
86
83
  ```bash
87
- # 全页像素坐标
84
+ # Full-page pixel coordinates
88
85
  python3 <SkillDir>/scripts/screenshot.py \
89
86
  --url "https://example.com" \
90
87
  --output "region.png" \
91
88
  --clip "100,200,600,400" # x, y, w, h
92
89
 
93
- # 以元素为基点偏移裁剪(先 scrollIntoView 该元素,再用其 boundingBox 起点 + 偏移裁剪)
90
+ # Clip relative to an element (scrolls the element into view first, then clips from its boundingBox origin plus the offset)
94
91
  python3 <SkillDir>/scripts/screenshot.py \
95
92
  --url "https://example.com" \
96
93
  --output "region_in_card.png" \
@@ -98,7 +95,7 @@ python3 <SkillDir>/scripts/screenshot.py \
98
95
  --clip "0,0,300,180"
99
96
  ```
100
97
 
101
- ### 移动端 / 设备模拟
98
+ ### Mobile / device emulation
102
99
 
103
100
  ```bash
104
101
  python3 <SkillDir>/scripts/screenshot.py \
@@ -108,7 +105,7 @@ python3 <SkillDir>/scripts/screenshot.py \
108
105
  --full-page
109
106
  ```
110
107
 
111
- 自定义 viewport
108
+ Custom viewport:
112
109
 
113
110
  ```bash
114
111
  python3 <SkillDir>/scripts/screenshot.py \
@@ -117,34 +114,34 @@ python3 <SkillDir>/scripts/screenshot.py \
117
114
  --viewport "1440,900"
118
115
  ```
119
116
 
120
- ### 等待动态内容
117
+ ### Waiting for dynamic content
121
118
 
122
119
  ```bash
123
- # 等待选择器出现
120
+ # Wait for a selector to appear
124
121
  python3 <SkillDir>/scripts/screenshot.py \
125
122
  --url "https://example.com" \
126
123
  --output "ready.png" \
127
124
  --wait-for-selector "main .loaded" \
128
125
  --timeout 30000
129
126
 
130
- # 固定延时(适合纯前端动画)
127
+ # Fixed delay (good for pure front-end animation)
131
128
  python3 <SkillDir>/scripts/screenshot.py \
132
129
  --url "https://example.com" \
133
130
  --output "delayed.png" \
134
131
  --wait-for-timeout 2000
135
132
  ```
136
133
 
137
- ### 隐藏 / 涂盖元素
134
+ ### Hiding / masking elements
138
135
 
139
136
  ```bash
140
- # 隐藏 cookie banner、登录浮层等干扰元素(可重复)
137
+ # Hide cookie banners, login overlays and other distractions (repeatable)
141
138
  python3 <SkillDir>/scripts/screenshot.py \
142
139
  --url "https://example.com" \
143
140
  --output "clean.png" \
144
141
  --hide-selector ".cookie-banner" \
145
142
  --hide-selector "#login-modal"
146
143
 
147
- # 涂盖敏感信息(Playwright 原生 mask,默认粉色,可自定义颜色)
144
+ # Mask sensitive information (Playwright's native mask, pink by default, color customizable)
148
145
  python3 <SkillDir>/scripts/screenshot.py \
149
146
  --url "https://app.example.com/dashboard" \
150
147
  --output "redacted.png" \
@@ -153,9 +150,9 @@ python3 <SkillDir>/scripts/screenshot.py \
153
150
  --mask-color "#222"
154
151
  ```
155
152
 
156
- ### 静态截图加注释(红框 / 箭头 / 字幕 / 编号 / 打码)
153
+ ### Annotating a still screenshot (highlight box / arrow / caption / numbering / redact)
157
154
 
158
- `--annotate` 接受一份 JSON(路径或字符串),里面用 storyboard 的场景类型描述要画的注解。所有场景在截屏前一次性画好。
155
+ `--annotate` takes a JSON document (file path or inline string) describing the annotations to draw, using the storyboard scene types. Every scene is drawn once, before the capture.
159
156
 
160
157
  ```bash
161
158
  python3 <SkillDir>/scripts/screenshot.py \
@@ -164,31 +161,31 @@ python3 <SkillDir>/scripts/screenshot.py \
164
161
  --annotate annotate.json
165
162
  ```
166
163
 
167
- `annotate.json` 示例:
164
+ Example `annotate.json`:
168
165
 
169
166
  ```json
170
167
  {
171
168
  "annotations": [
172
169
  { "type": "highlight", "selector": "strong[itemprop=\"name\"] a",
173
- "color": "#ff3b30", "label": "看这里" },
170
+ "color": "#ff3b30", "label": "Look here" },
174
171
  { "type": "arrow",
175
172
  "from": { "selector": "#repo-stars-counter-star" },
176
173
  "to": { "selector": "strong[itemprop=\"name\"] a", "side": "right" },
177
174
  "color": "#ff9500", "label": "⭐" },
178
- { "type": "caption", "text": "项目主页", "position": "bottom" },
175
+ { "type": "caption", "text": "Project home page", "position": "bottom" },
179
176
  { "type": "redact", "selectors": [".user-email"], "mode": "blur" }
180
177
  ],
181
178
  "settleMs": 900
182
179
  }
183
180
  ```
184
181
 
185
- > 顶层也可以直接是数组:`[{"type": "highlight", ...}]`。`settleMs` 是画完后等动画稳定再截屏的时长,默认 900ms
182
+ > The top level may also be a bare array: `[{"type": "highlight", ...}]`. `settleMs` is how long to let animations settle after drawing before capturing; it defaults to 900ms.
186
183
 
187
- ### 带登录态截屏
184
+ ### Capturing with a logged-in session
188
185
 
189
- 两种方式,二选一:
186
+ Two options, pick one:
190
187
 
191
- **A. 直接传 storageState(推荐)**
188
+ **A. Pass storageState directly (recommended)**
192
189
 
193
190
  ```bash
194
191
  python3 <SkillDir>/scripts/screenshot.py \
@@ -197,9 +194,9 @@ python3 <SkillDir>/scripts/screenshot.py \
197
194
  --storage-state "./auth.json"
198
195
  ```
199
196
 
200
- > `auth.json` 可由 `npx playwright codegen --save-storage=auth.json <url>` 在登录后导出。
197
+ > `auth.json` can be exported after logging in via `npx playwright codegen --save-storage=auth.json <url>`.
201
198
 
202
- **B. 仅传 cookies JSON**
199
+ **B. Pass a cookies JSON only**
203
200
 
204
201
  ```bash
205
202
  python3 <SkillDir>/scripts/screenshot.py \
@@ -208,7 +205,7 @@ python3 <SkillDir>/scripts/screenshot.py \
208
205
  --cookies "./cookies.json"
209
206
  ```
210
207
 
211
- cookies 顶层必须是数组,每项遵循 Playwright cookie 格式:
208
+ The cookies top level must be an array, each entry following the Playwright cookie format:
212
209
 
213
210
  ```json
214
211
  [
@@ -216,40 +213,40 @@ cookies 顶层必须是数组,每项遵循 Playwright cookie 格式:
216
213
  ]
217
214
  ```
218
215
 
219
- ### screenshot.py 参数
216
+ ### `screenshot.py` flags
220
217
 
221
- | 参数 | 说明 | 默认 |
222
- |------|------|------|
223
- | `-u` / `--url` | 目标 URL(必填) | — |
224
- | `-o` / `--output` | 本地输出路径 | `screenshot.png` |
218
+ | Flag | Description | Default |
219
+ |------|-------------|---------|
220
+ | `-u` / `--url` | Target URL (required) | — |
221
+ | `-o` / `--output` | Local output path | `screenshot.png` |
225
222
  | `-b` / `--browser` | `chromium` / `firefox` / `webkit` | `chromium` |
226
- | `--device` | 设备模拟名 | |
227
- | `--viewport` | `"宽,高"` | |
228
- | `--full-page` | 整页截屏 | |
229
- | `--selector` | 截元素本身 | |
230
- | `--clip` | `"x,y,w,h"` 区域截屏;和 selector 同设时基于元素 boundingBox 偏移 | |
231
- | `--no-scroll-into-view` | selector 模式下关闭自动滚动 | |
232
- | `--wait-for-selector` | 操作前等待选择器出现 | |
233
- | `--wait-for-timeout` | 操作前固定等待(ms | |
234
- | `--color-scheme` | `light` / `dark` / `no-preference` | |
235
- | `--user-agent` | 覆盖 UA | |
236
- | `--timeout` | Playwright 全局超时(ms | |
237
- | `--ignore-https-errors` | 忽略证书错误 | |
238
- | `--storage-state` | storageState JSON 文件路径 | |
239
- | `--cookies` | cookies JSON 字符串或文件 | |
240
- | `--hide-selector` | 截屏前 display:none 该选择器,可重复 | |
241
- | `--mask-selector` | Playwright 原生 mask 涂盖该选择器,可重复 | |
242
- | `--mask-color` | mask 填充色 | Playwright |
243
- | `--annotate` | 注释 JSON 文件或字符串(数组或 `{annotations, settleMs}`) | |
244
-
245
- ## 错误处理
246
-
247
- - **首次跑慢**:脚本自动 `pip install playwright` + `playwright install chromium`,耐心等一次即可。
248
- - **`Cannot find module 'playwright'` / `ModuleNotFoundError: playwright`**:bootstrap 没装上,手动跑 `pip install playwright && playwright install chromium`。
249
- - **`Executable doesn't exist`**:浏览器内核没装,跑 `playwright install chromium`(脚本通常会自动触发)。
250
- - **`Timeout ... exceeded`**:拉大 `--timeout`、`--wait-for-timeout`,或换更稳的 `--wait-for-selector`。
251
- - **截屏空白 / 没渲染完**:加 `--wait-for-selector` 等业务关键元素;纯动画类用 `--wait-for-timeout`。
252
- - **`selector "X" has no bounding box`**:元素存在但不可见 / 尺寸为 0;先用 `--wait-for-selector` 等可见。
253
- - **登录态失效**:重新导出 `storageState` 或更新 `cookies` JSON;`domain` / `path` 必须匹配。
254
- - **HTTPS 证书报错**:测试环境可加 `--ignore-https-errors`。
255
- - **提示「截屏入口只输出静态图片」**:`--output` 用了 `.webm` / `.mp4` 等视频后缀。改用 `web_record` 工具,或把后缀换成 `.png` / `.jpg`。
223
+ | `--device` | Device-emulation name | none |
224
+ | `--viewport` | `"width,height"` | none |
225
+ | `--full-page` | Capture the whole scrollable page | off |
226
+ | `--selector` | Capture the element itself | none |
227
+ | `--clip` | `"x,y,w,h"` region capture; combined with `--selector` it offsets from the element's boundingBox | none |
228
+ | `--no-scroll-into-view` | In selector mode, disable the automatic scroll | off |
229
+ | `--wait-for-selector` | Wait for this selector before acting | none |
230
+ | `--wait-for-timeout` | Fixed wait before acting (ms) | none |
231
+ | `--color-scheme` | `light` / `dark` / `no-preference` | none |
232
+ | `--user-agent` | Override the User-Agent | none |
233
+ | `--timeout` | Playwright global timeout (ms) | none |
234
+ | `--ignore-https-errors` | Ignore certificate errors | off |
235
+ | `--storage-state` | storageState JSON file path | none |
236
+ | `--cookies` | cookies JSON string or file | none |
237
+ | `--hide-selector` | `display:none` this selector before capturing (repeatable) | none |
238
+ | `--mask-selector` | Mask this selector with Playwright's native mask (repeatable) | none |
239
+ | `--mask-color` | Mask fill color | Playwright pink |
240
+ | `--annotate` | Annotation JSON file or string (array or `{annotations, settleMs}`) | none |
241
+
242
+ ## Error handling
243
+
244
+ - **The first run is slow**: the script auto-runs `pip install playwright` + `playwright install chromium`. Wait it out once.
245
+ - **`Cannot find module 'playwright'` / `ModuleNotFoundError: playwright`**: the bootstrap did not complete; run `pip install playwright && playwright install chromium` manually.
246
+ - **`Executable doesn't exist`**: the browser engine is missing; run `playwright install chromium` (the script usually triggers this itself).
247
+ - **`Timeout ... exceeded`**: raise `--timeout` / `--wait-for-timeout`, or switch to a more reliable `--wait-for-selector`.
248
+ - **Blank capture / page not finished rendering**: add `--wait-for-selector` on a key element; for pure animation use `--wait-for-timeout`.
249
+ - **`selector "X" has no bounding box`**: the element exists but is invisible or zero-sized; wait for visibility with `--wait-for-selector` first.
250
+ - **Session expired**: re-export `storageState` or update the cookies JSON — `domain` / `path` must match.
251
+ - **HTTPS certificate errors**: in test environments add `--ignore-https-errors`.
252
+ - **"The screenshot entry only emits still images"**: `--output` used a video extension such as `.webm` / `.mp4`. Switch to the `web_record` tool, or change the extension to `.png` / `.jpg`.
@@ -3,5 +3,5 @@
3
3
  "repoName": "agent-skill-media-maker",
4
4
  "skillId": "555",
5
5
  "version": "V5",
6
- "skillDescription": "网页截图技能(只出静态图片 png/jpg),基于 Playwright Python,对任意 URL 落盘到本地。支持整页 / 视口 / 元素 / 区域截图、设备模拟、等待动态内容、隐藏 / 涂盖干扰元素,以及静态注释(红框 / 箭头 / 字幕条 / 编号序列 / 打码 / 代码行高亮)。入口脚本 scripts/screenshot.py。\n\n当用户提到网页截图、整页 / 长截图、元素 / 区域截屏、给截图加注释、隐藏或打码敏感信息、代码行高亮、移动端模拟、带登录态截图等需求时,立即使用本 skill。录屏 / 分镜视频(webm)请改用 web-record / web_record。"
6
+ "skillDescription": "Web-page screenshot skill (still images only, png/jpg), built on Playwright Python — captures any URL to a local image file.\nSupports: full-page / viewport / element / region capture, device emulation, waiting for dynamic content, hiding or masking distracting elements, and static annotations (highlight box / arrow / caption / numbered sequence / redact / code-line highlight).\n\nImages only (`.png` / `.jpg`). For video (`.webm` / screen recording / storyboard clips) use web-record / `web_record`.\n\nUse this skill immediately whenever the user asks for any of:\n- Web page screenshot, screen capture, full-page screenshot, long screenshot\n- Capture a specific element / region, partial screenshot, focus on an area\n- Hide or mask elements before capturing (cookie banner, sensitive information)\n- Annotate a still screenshot (highlight box / arrow / label / caption bar / numbering)\n- Highlight lines L5-L20 of a file and screenshot it\n- Wait for an element to appear, then capture\n- Mobile / device-emulated screenshot (iPhone / Pixel, etc.)\n- Capture with cookies / a logged-in session / storageState\n\nEven when the user does not say \"playwright\", any request to screenshot a URL and get a local image file should route here."
7
7
  }