New to Claude Skills? Learn how to install them →

Bcivitai on GitHub

Browser Automation

Free

Automate web interactions with ease.

by civitai7.2k stars on civitai/civitai
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Browser Automation does

The Browser Automation skill provides a robust framework for automating web interactions through an HTTP server interface. It allows users to explore web pages interactively, build reusable automation flows, and conduct multi-user testing scenarios. This skill is particularly useful for developers and testers looking to streamline their testing processes or automate repetitive tasks in web applications.

With support for multiple concurrent sessions, users can create distinct sessions with different profiles, allowing for varied user experiences during testing. The skill enables the creation of sessions with specific URLs and profiles, making it easy to simulate different user roles, such as creators or moderators. Additionally, the ability to save authentication states means that users can maintain session persistence across tests, enhancing the reliability of automation scripts.

The skill also features a collection of endpoints that facilitate various operations, including session management, flow execution, and page inspection. Users can execute JavaScript code snippets directly in the browser context, which allows for precise control over web elements. The automation flows can be saved and reused, enabling efficient testing of common scenarios without the need to rewrite scripts each time.

This tool is ideal for software developers, QA engineers, and anyone involved in web application testing who needs to automate interactions and validate functionality across different user scenarios. By leveraging this skill, teams can enhance their testing efficiency and ensure a smoother user experience in their applications.

When to use it

Use this skill when you need to automate web testing or simulate user interactions across multiple profiles.

When not to use it

This skill may not be suitable for simple tasks that don't require automation or for non-web-based applications.

What you can build with it

Automating User Registration Tests

Use the skill to create a session that automates the user registration flow, ensuring all fields are validated correctly.

Simulating Multi-User Scenarios

Test a web application by simulating different user roles interacting with the same application simultaneously.

Reusing Common Automation Flows

Save frequently used automation scripts as flows and execute them easily without rewriting the code.

How to install Browser Automation

View source

1. Install with the skills CLI

npx skills add civitai/civitai/browser-automation --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by civitai

Browser Automation Skill

Explore pages interactively, build reusable flows, and test multi-user scenarios.

Quick Start

# 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

EndpointMethodDescription
/profilesGETList auth profiles with descriptions
/sessionsGETList active sessions
/sessionsPOSTCreate session { name, url, profile?, headless? }
/sessions/:nameDELETEClose session
/flowsGETList saved flows
/flows/:name/runPOSTRun flow { profile?, startUrl?, headless? }
/statusGETSession status
/inspectGETPage state + screenshot. Add ?fullPage=true for full-page screenshot
/chunkPOSTExecute code { label, code }
/navigatePOSTNavigate { url, fullPage? }. Set fullPage: true for full-page screenshot
/save-authPOSTSave auth { profile, description }
/reviewGETReview recorded chunks
/exitPOSTShutdown server

Use ?session=name when multiple sessions are active.

Multi-User Testing

# 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

# 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"}'
ProfileDescription
moderatorMod permissions for content review
creatorEstablished user with published content
memberStandard logged-in user
new-userFresh account for onboarding flows

Flows

Saved flows are reusable Playwright scripts.

# 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:

await page.click('button.submit');
await page.fill('input[name="email"]', 'test@example.com');
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:

# 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/

Frequently asked questions about Browser Automation

Similar skills