用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/RainyGao-GitHub/DocSys --skill playwright命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | playwright |
| description | Manual browser automation via Playwright |
| category | web |
| version | 1.1.0 |
| author | DocSys Team |
| permissions | ["read"] |
| tags | ["browser","automation","playwright","screenshot","web"] |
Control a headless browser via Playwright for web automation tasks.
Playwright, 浏览器, 打开网页, 浏览器自动化, browser automation, screenshot, 网页截图, browser control, open page, navigate, 浏览器操作, 帮我截个图, take a screenshot, 打开百度
All browser tasks follow this ordered sequence. Do not skip steps.
docsys playwright open <url> — wait for page to load.docsys playwright fill <selector> <value> then docsys playwright click <selector>docsys playwright screenshot [--full] [--path <path>]docsys playwright close when done.| Target | Selector Examples |
|---|---|
| Input field | input[name=q], #kw, input[type=text] |
| Submit button | button[type=submit], #su, input[type=submit] |
| Link | a[href*="target"], .result a |
| Dynamic content | Use waitForSelector or 1-2s delay |
Maximum 5 steps per task. If task exceeds 5 steps (e.g., multi-site research), confirm with user before continuing.
docsys playwright open <url>
docsys playwright screenshot [--full] [--path <path>]
docsys playwright click <selector>
docsys playwright fill <selector> <value>
docsys playwright close
| Parameter | Type | Required | Description |
|---|---|---|---|
| operation | string | yes | Operation: open, screenshot, click, fill, close |
| url/selector/value | string | varies | URL for open, CSS selector for click/fill, path for screenshot |
User: "open https://example.com in browser"
Skill triggers → ⚠️ confirm: "Open https://example.com?" → calls: docsys playwright open https://example.com
Output: ✅ Page loaded: https://example.com
User: "take a screenshot of the current page"
Skill triggers → calls: docsys playwright screenshot
Output: ✅ Screenshot saved → /path/to/screenshot.png
User: "打开百度,搜索 Claude AI,然后把结果截图"
Skill triggers → Step 1: ⚠️ confirm "Open https://www.baidu.com?" → Step 2: calls docsys playwright open https://www.baidu.com → ✅ page loaded → Step 3: wait 1s for dynamic content → Step 4: calls docsys playwright fill #kw Claude AI → ✅ filled → Step 5: calls docsys playwright click #su → ✅ clicked → Step 6: wait 2s for results to settle → Step 7: calls docsys playwright screenshot → ✅ Screenshot saved
Output: ✅ Screenshot saved → /path/to/screenshot.png | Browser still open for further actions.
User: "research Claude AI on both baidu and google, take screenshots" Skill triggers → ⚠️ confirm "Open https://www.baidu.com?" → open baidu → fill "Claude AI" → click → wait → screenshot → close → ⚠️ confirm "Open https://www.google.com?" → open google → fill "Claude AI" → click → wait → screenshot → close Output: ✅ 2 screenshots saved (baidu, google)
| Field | Type | Description |
|---|---|---|
| operation | string | Action performed (open/screenshot/click/fill/close) |
| url | string | URL navigated to (for open) |
| selector | string | CSS selector used (for click/fill) |
| screenshot_path | string | Path to saved screenshot |
| browser_state | string | "open" or "closed" |
Success (open): ✅ Page loaded: {url} | browser_state: open
Success (screenshot): ✅ Screenshot saved → {screenshot_path} | browser_state: open
Success (click/fill): ✅ {operation} on {selector} | browser_state: open
Success (close): ✅ Browser closed.
Error: "URL required" | "Selector required" | "Browser not available" | "Navigation timeout"
ZH:
✅ 页面已加载: {url} | 浏览器状态: 开启|✅ 截图已保存 → {screenshot_path}
| Error | Cause |
|---|---|
| URL required | Missing URL for open |
| Selector required | Missing selector for click/fill |
| Browser not available | Playwright not initialized |
| Element not found | Selector matches nothing |
| Navigation timeout | Page took too long |
See references/ for related skills and API docs.
基于 SOC 职业分类