@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.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/billing.d.ts +44 -0
- package/dist/billing.js +76 -0
- package/dist/capabilities.d.ts +5 -1
- package/dist/cli.js +0 -0
- package/dist/http.d.ts +3 -0
- package/dist/http.js +4 -0
- package/dist/manifest.json +13 -13
- package/dist/runner.js +9 -0
- package/package.json +1 -1
- package/skills/export-jianying/version.json +1 -1
- package/skills/gen-digital-human/SKILL.md +12 -0
- package/skills/gen-digital-human/skill.json +9 -3
- package/skills/gen-digital-human/version.json +1 -1
- package/skills/gen-image/SKILL.md +51 -17
- package/skills/gen-image/skill.json +11 -3
- package/skills/gen-image/version.json +1 -1
- package/skills/gen-script/SKILL.md +17 -21
- package/skills/gen-script/version.json +1 -1
- package/skills/gen-video/SKILL.md +17 -3
- package/skills/gen-video/skill.json +10 -2
- package/skills/gen-video/version.json +1 -1
- package/skills/gen-voice/SKILL.md +13 -1
- package/skills/gen-voice/version.json +1 -1
- package/skills/prepare-video-assets/SKILL.md +12 -0
- package/skills/prepare-video-assets/version.json +1 -1
- package/skills/render-video/SKILL.md +12 -0
- package/skills/render-video/scripts/render_video.py +63 -0
- package/skills/render-video/version.json +1 -1
- package/skills/template-registry/scripts/render_job_client.py +27 -0
- package/skills/template-registry/version.json +1 -1
- package/skills/video-parser/version.json +1 -1
- package/skills/web-record/SKILL.md +131 -133
- package/skills/web-screenshot/SKILL.md +93 -96
- package/skills/web-screenshot/version.json +1 -1
|
@@ -1,56 +1,53 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: web-screenshot
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
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
|
-
#
|
|
28
|
+
# Web Screenshot Skill (`web_screenshot`)
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Entry script **`scripts/screenshot.py`**, pure Python, outputs **`.png` / `.jpg`**. Full page / viewport / element / region.
|
|
31
31
|
|
|
32
|
-
>
|
|
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
|
-
|
|
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
|
-
>
|
|
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
|
-
-
|
|
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
|
-
##
|
|
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
|
-
###
|
|
67
|
+
### Element capture (focus on one part)
|
|
71
68
|
|
|
72
|
-
|
|
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
|
-
|
|
79
|
+
To suppress the automatic scroll, add `--no-scroll-into-view`.
|
|
83
80
|
|
|
84
|
-
###
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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`
|
|
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": "
|
|
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
|
-
>
|
|
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.
|
|
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`
|
|
197
|
+
> `auth.json` can be exported after logging in via `npx playwright codegen --save-storage=auth.json <url>`.
|
|
201
198
|
|
|
202
|
-
**B.
|
|
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
|
|
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` |
|
|
224
|
-
| `-o` / `--output` |
|
|
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"`
|
|
231
|
-
| `--no-scroll-into-view` | selector
|
|
232
|
-
| `--wait-for-selector` |
|
|
233
|
-
| `--wait-for-timeout` |
|
|
234
|
-
| `--color-scheme` | `light` / `dark` / `no-preference` |
|
|
235
|
-
| `--user-agent` |
|
|
236
|
-
| `--timeout` | Playwright
|
|
237
|
-
| `--ignore-https-errors` |
|
|
238
|
-
| `--storage-state` | storageState JSON
|
|
239
|
-
| `--cookies` | cookies JSON
|
|
240
|
-
| `--hide-selector` |
|
|
241
|
-
| `--mask-selector` | Playwright
|
|
242
|
-
| `--mask-color` |
|
|
243
|
-
| `--annotate` |
|
|
244
|
-
|
|
245
|
-
##
|
|
246
|
-
|
|
247
|
-
-
|
|
248
|
-
- **`Cannot find module 'playwright'` / `ModuleNotFoundError: playwright
|
|
249
|
-
- **`Executable doesn't exist
|
|
250
|
-
- **`Timeout ... exceeded
|
|
251
|
-
-
|
|
252
|
-
- **`selector "X" has no bounding box
|
|
253
|
-
-
|
|
254
|
-
- **HTTPS
|
|
255
|
-
-
|
|
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": "
|
|
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
|
}
|