@remixmate/cli 0.9.11 → 0.9.13
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 +9 -5
- package/README.zh-CN.md +10 -6
- package/dist/cli.js +4 -1
- package/dist/manifest.json +21 -25
- package/dist/skill-schema.d.ts +1 -1
- package/package.json +2 -2
- package/skills/gen-script/SKILL.md +20 -1
- package/skills/prepare-video-assets/SKILL.md +17 -1
- package/skills/render-video/SKILL.md +13 -0
- package/skills/web-record/SKILL.md +236 -20
- package/skills/web-record/skill.json +2 -2
- package/skills/web-screenshot/SKILL.md +255 -0
- package/skills/{web-capture → web-screenshot}/skill.json +3 -3
- package/skills/web-screenshot/version.json +7 -0
- package/skills/web-capture/SKILL.md +0 -474
- package/skills/web-capture/version.json +0 -7
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/__init__.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/bootstrap.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/browser.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/cli_args.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/arrow.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/caption.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/clear_overlay.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/cursor_bootstrap.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/cursor_hide.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/cursor_move.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/cursor_ripple.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/element_zoom.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/element_zoom_restore.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/fade_out_overlays.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/focus.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/highlight.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/overlay_bootstrap.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/page_zoom_in.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/page_zoom_out.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/page_zoom_restore.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/redact.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/scroll.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/scroll_through.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/sequence.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/settled_check.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js/title_card.js +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/js_loader.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/overlay.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/recording.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/__init__.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/arrow.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/caption.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/click.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/code_lines.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/focus.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/highlight.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/hover.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/redact.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/scroll.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/sequence.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/title_card.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/type.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/wait.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/scenes/zoom.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/screenshot.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/storyboard.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/template.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_screenshot/trim.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/_media_upload.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/record.py +0 -0
- /package/skills/{web-capture → web-screenshot}/scripts/screenshot.py +0 -0
- /package/skills/{web-capture → web-screenshot}/templates/github-code-tour.json +0 -0
- /package/skills/{web-capture → web-screenshot}/templates/github-readme-tour.json +0 -0
- /package/skills/{web-capture → web-screenshot}/templates/github-repo-intro.json +0 -0
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"tier": "tool",
|
|
5
5
|
"category": "consuming",
|
|
6
6
|
"title": "Web Page Recording",
|
|
7
|
-
"description": "Drive a headless browser (Playwright Python) to RECORD any URL to a video, then (by default) transcode to mp4, grab a cover frame, upload to VOD and return a playable CDN URL. Modes: fixed-duration recording, condition-triggered stop (element appears / disappears), auto-scroll from top to bottom, custom storyboards, and parameterized templates. Storyboard scenes: highlight / focus / zoom / scroll / virtual-cursor click / type / hover / caption / title-card / arrow / numbered sequence / redact / code-line highlight. For still images (png/jpg) use the
|
|
7
|
+
"description": "Drive a headless browser (Playwright Python) to RECORD any URL to a video, then (by default) transcode to mp4, grab a cover frame, upload to VOD and return a playable CDN URL. Modes: fixed-duration recording, condition-triggered stop (element appears / disappears), auto-scroll from top to bottom, custom storyboards, and parameterized templates. Storyboard scenes: highlight / focus / zoom / scroll / virtual-cursor click / type / hover / caption / title-card / arrow / numbered sequence / redact / code-line highlight. For still images (png/jpg) use the web_screenshot tool instead. Use this tool whenever the user wants a video / recording / screencast of a web page: record a page, scroll-through video, page-from-top-to-bottom clip, demo of clicks/typing/hover, storyboard / multi-scene intro video, or a template-based clip.",
|
|
8
8
|
"envVars": ["WEB_CAPTURE_BROWSER", "WEB_CAPTURE_OUTPUT_BASE", "WEB_CAPTURE_NO_SANDBOX", "WEB_CAPTURE_ALLOW_PRIVATE_HOSTS", "PLAYWRIGHT_BROWSERS_PATH", "REMOTION_RENDER_API_URL", "PRIV_TOKEN"],
|
|
9
|
-
"entry": { "type": "python", "scriptPath": "../web-
|
|
9
|
+
"entry": { "type": "python", "scriptPath": "../web-screenshot/scripts/record.py" },
|
|
10
10
|
"parameters": {
|
|
11
11
|
"type": "object",
|
|
12
12
|
"properties": {
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-screenshot
|
|
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。
|
|
20
|
+
triggers:
|
|
21
|
+
- 网页截图、网页截屏、整页截图、长截图、full page screenshot
|
|
22
|
+
- 截某个元素 / 区域、局部截屏、focus 某个区域
|
|
23
|
+
- 截图前隐藏元素 / 涂盖打码、给静态截图加注释(红框 / 箭头 / 标签)
|
|
24
|
+
- 高亮某文件的 L5-L20 代码行并截图
|
|
25
|
+
- 移动端 / 设备模拟截图、带 cookie / 登录态截图
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# 网页截图 Skill(web_screenshot)
|
|
29
|
+
|
|
30
|
+
入口脚本 **`scripts/screenshot.py`**,纯 Python 实现,输出 **`.png` / `.jpg`**。整页 / 视口 / 元素 / 区域。
|
|
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`**。
|
|
36
|
+
|
|
37
|
+
底层共享 **`scripts/_media_screenshot/`** 包,封装 Playwright Python API + 所有浏览器侧 JS 注入(overlay / zoom / scroll 等)。
|
|
38
|
+
|
|
39
|
+
> 路径约定:读取系统注入的 `Base directory for this skill: <path>` 作为 `<SkillDir>`,命令里的 `<SkillDir>` 替换为该路径,切勿硬编码绝对路径。`python` 在 macOS 上可能需写成 `python3`。
|
|
40
|
+
|
|
41
|
+
## 前置依赖
|
|
42
|
+
|
|
43
|
+
- **Python 3.9+**
|
|
44
|
+
- **`playwright` pip 包 + chromium 内核**:首次运行**自动 bootstrap**——脚本检测到缺包会执行 `pip install playwright` + `playwright install chromium`。
|
|
45
|
+
- 也可提前手动装:
|
|
46
|
+
```bash
|
|
47
|
+
pip install playwright
|
|
48
|
+
playwright install chromium
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 截屏 `screenshot.py`
|
|
52
|
+
|
|
53
|
+
### 最小用法
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
57
|
+
--url "https://example.com" \
|
|
58
|
+
--output "example.png"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 整页截图
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
65
|
+
--url "https://example.com" \
|
|
66
|
+
--output "example_full.png" \
|
|
67
|
+
--full-page
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 元素截屏(局部 focus)
|
|
71
|
+
|
|
72
|
+
按 CSS 选择器截**元素本身**(自动 `scrollIntoViewIfNeeded`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
76
|
+
--url "https://example.com" \
|
|
77
|
+
--output "card.png" \
|
|
78
|
+
--selector ".card.featured" \
|
|
79
|
+
--wait-for-selector ".card.featured"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
如不希望自动滚动:加 `--no-scroll-into-view`。
|
|
83
|
+
|
|
84
|
+
### 区域截屏(像素矩形 clip)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# 全页像素坐标
|
|
88
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
89
|
+
--url "https://example.com" \
|
|
90
|
+
--output "region.png" \
|
|
91
|
+
--clip "100,200,600,400" # x, y, w, h
|
|
92
|
+
|
|
93
|
+
# 以元素为基点偏移裁剪(先 scrollIntoView 该元素,再用其 boundingBox 起点 + 偏移裁剪)
|
|
94
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
95
|
+
--url "https://example.com" \
|
|
96
|
+
--output "region_in_card.png" \
|
|
97
|
+
--selector ".card" \
|
|
98
|
+
--clip "0,0,300,180"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### 移动端 / 设备模拟
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
105
|
+
--url "https://m.example.com" \
|
|
106
|
+
--output "mobile.png" \
|
|
107
|
+
--device "iPhone 15 Pro" \
|
|
108
|
+
--full-page
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
自定义 viewport:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
115
|
+
--url "https://example.com" \
|
|
116
|
+
--output "wide.png" \
|
|
117
|
+
--viewport "1440,900"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 等待动态内容
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# 等待选择器出现
|
|
124
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
125
|
+
--url "https://example.com" \
|
|
126
|
+
--output "ready.png" \
|
|
127
|
+
--wait-for-selector "main .loaded" \
|
|
128
|
+
--timeout 30000
|
|
129
|
+
|
|
130
|
+
# 固定延时(适合纯前端动画)
|
|
131
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
132
|
+
--url "https://example.com" \
|
|
133
|
+
--output "delayed.png" \
|
|
134
|
+
--wait-for-timeout 2000
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 隐藏 / 涂盖元素
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# 隐藏 cookie banner、登录浮层等干扰元素(可重复)
|
|
141
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
142
|
+
--url "https://example.com" \
|
|
143
|
+
--output "clean.png" \
|
|
144
|
+
--hide-selector ".cookie-banner" \
|
|
145
|
+
--hide-selector "#login-modal"
|
|
146
|
+
|
|
147
|
+
# 涂盖敏感信息(Playwright 原生 mask,默认粉色,可自定义颜色)
|
|
148
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
149
|
+
--url "https://app.example.com/dashboard" \
|
|
150
|
+
--output "redacted.png" \
|
|
151
|
+
--mask-selector ".user-email" \
|
|
152
|
+
--mask-selector ".api-token" \
|
|
153
|
+
--mask-color "#222"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 静态截图加注释(红框 / 箭头 / 字幕 / 编号 / 打码)
|
|
157
|
+
|
|
158
|
+
`--annotate` 接受一份 JSON(路径或字符串),里面用 storyboard 的场景类型描述要画的注解。所有场景在截屏前一次性画好。
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
162
|
+
--url "https://github.com/user/repo" \
|
|
163
|
+
--output "annotated.png" \
|
|
164
|
+
--annotate annotate.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
`annotate.json` 示例:
|
|
168
|
+
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"annotations": [
|
|
172
|
+
{ "type": "highlight", "selector": "strong[itemprop=\"name\"] a",
|
|
173
|
+
"color": "#ff3b30", "label": "看这里" },
|
|
174
|
+
{ "type": "arrow",
|
|
175
|
+
"from": { "selector": "#repo-stars-counter-star" },
|
|
176
|
+
"to": { "selector": "strong[itemprop=\"name\"] a", "side": "right" },
|
|
177
|
+
"color": "#ff9500", "label": "⭐" },
|
|
178
|
+
{ "type": "caption", "text": "项目主页", "position": "bottom" },
|
|
179
|
+
{ "type": "redact", "selectors": [".user-email"], "mode": "blur" }
|
|
180
|
+
],
|
|
181
|
+
"settleMs": 900
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
> 顶层也可以直接是数组:`[{"type": "highlight", ...}]`。`settleMs` 是画完后等动画稳定再截屏的时长,默认 900ms。
|
|
186
|
+
|
|
187
|
+
### 带登录态截屏
|
|
188
|
+
|
|
189
|
+
两种方式,二选一:
|
|
190
|
+
|
|
191
|
+
**A. 直接传 storageState(推荐)**
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
195
|
+
--url "https://app.example.com/dashboard" \
|
|
196
|
+
--output "dashboard.png" \
|
|
197
|
+
--storage-state "./auth.json"
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
> `auth.json` 可由 `npx playwright codegen --save-storage=auth.json <url>` 在登录后导出。
|
|
201
|
+
|
|
202
|
+
**B. 仅传 cookies JSON**
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
python3 <SkillDir>/scripts/screenshot.py \
|
|
206
|
+
--url "https://app.example.com/dashboard" \
|
|
207
|
+
--output "dashboard.png" \
|
|
208
|
+
--cookies "./cookies.json"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
cookies 顶层必须是数组,每项遵循 Playwright cookie 格式:
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
[
|
|
215
|
+
{"name": "session", "value": "abc", "domain": ".example.com", "path": "/", "httpOnly": true, "secure": true}
|
|
216
|
+
]
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### screenshot.py 参数
|
|
220
|
+
|
|
221
|
+
| 参数 | 说明 | 默认 |
|
|
222
|
+
|------|------|------|
|
|
223
|
+
| `-u` / `--url` | 目标 URL(必填) | — |
|
|
224
|
+
| `-o` / `--output` | 本地输出路径 | `screenshot.png` |
|
|
225
|
+
| `-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`。
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "web-
|
|
3
|
-
"toolName": "
|
|
2
|
+
"name": "web-screenshot",
|
|
3
|
+
"toolName": "web_screenshot",
|
|
4
4
|
"tier": "tool",
|
|
5
5
|
"category": "consuming",
|
|
6
|
-
"title": "Web Page
|
|
6
|
+
"title": "Web Page Screenshot",
|
|
7
7
|
"description": "Drive a headless browser (Playwright Python) to capture any URL to a local STILL IMAGE (png/jpg): full-page / viewport / element / region screenshots, with device emulation, waiting, hide/mask/redact, and static annotations (highlight / arrow / caption / numbered sequence / redact). Images only — for video / recording / scroll-through / storyboard clips (webm) use the web_record tool instead.",
|
|
8
8
|
"envVars": ["WEB_CAPTURE_BROWSER", "WEB_CAPTURE_OUTPUT_BASE", "WEB_CAPTURE_NO_SANDBOX", "WEB_CAPTURE_ALLOW_PRIVATE_HOSTS", "PLAYWRIGHT_BROWSERS_PATH"],
|
|
9
9
|
"entry": { "type": "python", "scriptPath": "scripts/screenshot.py" },
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skillName": "web-screenshot",
|
|
3
|
+
"repoName": "agent-skill-media-maker",
|
|
4
|
+
"skillId": "555",
|
|
5
|
+
"version": "V5",
|
|
6
|
+
"skillDescription": "网页截图技能(只出静态图片 png/jpg),基于 Playwright Python,对任意 URL 落盘到本地。支持整页 / 视口 / 元素 / 区域截图、设备模拟、等待动态内容、隐藏 / 涂盖干扰元素,以及静态注释(红框 / 箭头 / 字幕条 / 编号序列 / 打码 / 代码行高亮)。入口脚本 scripts/screenshot.py。\n\n当用户提到网页截图、整页 / 长截图、元素 / 区域截屏、给截图加注释、隐藏或打码敏感信息、代码行高亮、移动端模拟、带登录态截图等需求时,立即使用本 skill。录屏 / 分镜视频(webm)请改用 web-record / web_record。"
|
|
7
|
+
}
|