browser-automation · civitai — скилл для Claude Code: установка
Скилл browser-automation для Claude Code запускает браузер через HTTP-сервер, сохраняет авторизацию и поддерживает несколько сессий. Проверяет пользовательские потоки и повторяемые сценарии.
Apache-2.0 ★ 7 327 обновлён 2026-10-25
npx skills add civitai/civitai --skill browser-automation -a claude-codeЧто делает browser-automation
Скилл запускает HTTP-сервер на localhost:9222. Через него агент может создавать и закрывать браузерные сессии, открывать страницы, получать состояние страницы и скриншоты, выполнять код Playwright и переходить по URL. Для нескольких сессий используется параметр session.
Сценарии сохраняются как Playwright-скрипты в .browser/flows/*.js, а профили хранят данные авторизации в .browser/profiles/. Можно запускать готовые flows, сохранять профили пользователей и проверять сценарии с разными ролями. Без запуска server.mjs HTTP-эндпоинты недоступны.
Скилл подходит для проверки пользовательских потоков, сравнения HTML-макета с живой страницей и тестов с профилями creator, member, moderator или new-user. Скриншоты сессий сохраняются в .browser/sessions/{id}/screenshots/.
Какие задачи решает
- создать несколько браузерных сессий с разными профилями
- проверить пользовательский сценарий через Playwright-код
- сохранить авторизацию для повторных запусков
- сравнить локальный HTML-макет с живой страницей
- запустить сохранённый flow с нужным URL
Примеры запросов агенту
- Запусти
server.mjs, создай сессиюmemberи проверь страницуhttp://localhost:3000. - Создай две сессии
creatorиviewer, выполни действие публикации в первой и проверь результат во второй. - Сохрани текущую авторизацию как профиль
moderator, затем запусти flow из.browser/flows/.
Как установить browser-automation
1Через Skills CLI (Vercel)
npx skills add civitai/civitai --skill browser-automation -a claude-code2Вручную: положить файлы
~/.claude/skills/browser-automation/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/browser-automation/
1Через Skills CLI (Vercel)
npx skills add civitai/civitai --skill browser-automation -a codex2Вручную: положить файлы
.agents/skills/browser-automation/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add civitai/civitai --skill browser-automation -a cursor2Вручную: положить файлы
.cursor/skills/browser-automation/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install civitai/civitai .claude/skills/browser-automation2Вручную: положить файлы
.github/skills/browser-automation/SKILL.md1Через Skills CLI (Vercel)
npx skills add civitai/civitai --skill browser-automation -a gemini-cli2Командой платформы
gemini skills install https://github.com/civitai/civitai --path .claude/skills/browser-automationВручную: положить файлы
.devin/skills/browser-automation/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add civitai/civitai --skill browser-automation -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о browser-automation
Как установить browser-automation в Claude Code?
Выполните npx skills add civitai/civitai --skill browser-automation -a claude-code, затем откройте файл ~/.claude/skills/browser-automation/SKILL.md.
Что делает browser-automation?
Скилл управляет браузером через HTTP-сервер: создаёт сессии, выполняет Playwright-код, сохраняет flows и профили авторизации, а также отдаёт состояние страницы и скриншоты.
Как browser-automation поддерживает тесты с несколькими пользователями?
Создайте отдельные сессии с разными профилями и передавайте ?session=name в запросах. Так можно выполнить действие от имени creator, а затем проверить его результат в сессии viewer.
Исходный текст
SKILL.md · Apache-2.0
---
name: browser-automation
description: Browser automation via HTTP server. Supports multiple concurrent sessions for multi-user testing, saved flows, and profile-based auth persistence.
---
# Browser Automation Skill
Explore pages interactively, build reusable flows, and test multi-user scenarios.
## Quick Start
```bash
# Start server
node .claude/skills/browser-automation/server.mjs &
# Check available profiles
curl http://localhost:9222/profiles
# Create a session
curl -X POST http://localhost:9222/sessions \
-d '{"name": "test", "url": "http://localhost:3000", "profile": "member"}'
# Inspect the page
curl http://localhost:9222/inspect
# Execute code
curl -X POST http://localhost:9222/chunk \
-d '{"label": "Click button", "code": "await page.click(\"button.submit\");"}'
# Shutdown
curl -X POST http://localhost:9222/exit
```
## Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/profiles` | GET | List auth profiles with descriptions |
| `/sessions` | GET | List active sessions |
| `/sessions` | POST | Create session `{ name, url, profile?, headless? }` |
| `/sessions/:name` | DELETE | Close session |
| `/flows` | GET | List saved flows |
| `/flows/:name/run` | POST | Run flow `{ profile?, startUrl?, headless? }` |
| `/status` | GET | Session status |
| `/inspect` | GET | Page state + screenshot. Add `?fullPage=true` for full-page screenshot |
| `/chunk` | POST | Execute code `{ label, code }` |
| `/navigate` | POST | Navigate `{ url, fullPage? }`. Set `fullPage: true` for full-page screenshot |
| `/save-auth` | POST | Save auth `{ profile, description }` |
| `/review` | GET | Review recorded chunks |
| `/exit` | POST | Shutdown server |
Use `?session=name` when multiple sessions are active.
## Multi-User Testing
```bash
# Create two sessions with different profiles
curl -X POST http://localhost:9222/sessions \
-d '{"name": "creator", "url": "http://localhost:3000", "profile": "creator"}'
curl -X POST http://localhost:9222/sessions \
-d '{"name": "viewer", "url": "http://localhost:3000", "profile": "member"}'
# Creator does something
curl -X POST "http://localhost:9222/chunk?session=creator" \
-d '{"label": "Publish", "code": "await page.click(\"button.publish\");"}'
# Viewer sees it
curl -X POST "http://localhost:9222/navigate?session=viewer" \
-d '{"url": "http://localhost:3000/models"}'
```
## Profiles
```bash
# List profiles
curl http://localhost:9222/profiles
# Create new profile (description required)
curl -X POST http://localhost:9222/save-auth \
-d '{"profile": "moderator", "description": "User with mod permissions"}'
# Refresh existing profile
curl -X POST http://localhost:9222/save-auth \
-d '{"profile": "moderator"}'
```
| Profile | Description |
|---------|-------------|
| `moderator` | Mod permissions for content review |
| `creator` | Established user with published content |
| `member` | Standard logged-in user |
| `new-user` | Fresh account for onboarding flows |
## Flows
Saved flows are reusable Playwright scripts.
```bash
# List flows
curl http://localhost:9222/flows
# Run a flow
curl -X POST http://localhost:9222/flows/my-flow/run \
-d '{"profile": "member"}'
# Run with custom start URL
curl -X POST http://localhost:9222/flows/my-flow/run \
-d '{"profile": "member", "startUrl": "http://localhost:3000"}'
```
Flows are stored in `.browser/flows/*.js`.
## Playwright Code
Chunks execute with `page` available:
```javascript
await page.click('button.submit');
await page.fill('input[name="email"]', '[email protected]');
await page.waitForSelector('h1');
await page.goto('https://example.com');
const title = await page.textContent('h1');
```
## Mockup Comparison
Open local HTML mockups with `file://` URLs, then compare to live pages:
```bash
# 1. Open mockup and take full-page screenshot
curl -X POST http://localhost:9222/sessions \
-d '{"name": "compare", "url": "file:///C:/path/to/mockup.html"}'
curl "http://localhost:9222/inspect?session=compare&fullPage=true"
# 2. Navigate to live page and screenshot
curl -X POST "http://localhost:9222/navigate?session=compare" \
-d '{"url": "http://localhost:3000/page", "fullPage": true}'
# 3. Compare screenshots in session folder
```
## File Locations
- **Flows**: `.browser/flows/*.js`
- **Profile metadata**: `.browser/profiles/profiles.meta.json`
- **Auth state**: `.browser/profiles/*.json` (gitignored)
- **Screenshots**: `.browser/sessions/{id}/screenshots/`
© civitai · Apache-2.0 · civitai/civitai
Похожие скиллы
Все скиллы по теме «Браузер и парсинг» →Сначала — browser-automation от других авторов.