Skip to content
OpenSmartRoute
Skillv1.0.0

browser-automation

Programmatic web automation using Playwright Python — data extraction, form filling, multi-step workflows, auth session management, screenshot/PDF capture, and anti-detection patterns. Use for scripte

by oimiragieo(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from oimiragieo/agent-studio (.claude/skills/browser-automation/SKILL.md). Install upstream with npx skills add oimiragieo/agent-studio --skill browser-automation. Copyright stays with the author.

Browser Automation Skill

Setup

pip install playwright && playwright install chromium
pip install playwright-stealth  # optional, for anti-detection

Skill Comparison

Skill Use Case
browser-automation Scripted automation, data pipelines, form bots
webapp-testing QA assertions, visual regression, test suites
chrome-browser Interactive MCP DevTools control

Iron Law

NEVER USE time.sleep() — use page.wait_for_selector() or wait_for_load_state()

Core Patterns

Navigation and Extraction

with sync_playwright() as p:
    context = p.chromium.launch(headless=True).new_context(
        user_agent="Mozilla/5.0 ...", viewport={"width": 1280, "height": 720})
    page = context.new_page()
    page.goto(url); page.wait_for_load_state("networkidle")
    items = [i.inner_text() for i in page.get_by_role("listitem").all()]

Form Filling

page.get_by_label("Email").fill("user@example.com")
page.get_by_label("Password").fill("secret")
with page.expect_navigation():
    page.get_by_role("button", name="Submit").click()

Screenshot and PDF

page.screenshot(path="full.png", full_page=True)
page.pdf(path="page.pdf", format="A4", print_background=True)

Auth Session Management

# Save session
context.storage_state(path="auth-state.json")
# Reuse session
context = browser.new_context(storage_state="auth-state.json")

Anti-Detection

browser = p.chromium.launch(args=["--disable-blink-features=AutomationControlled"])
context = browser.new_context(user_agent="...", locale="en-US", timezone_id="America/New_York")
page.add_init_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")

Agent Usage

  • Save extracted data to .claude/context/tmp/ as structured JSON
  • Save screenshots/PDFs to .claude/context/artifacts/
  • Never commit auth-state.json — add to .gitignore

Anti-Patterns

Anti-Pattern Correct Approach
time.sleep() for waits page.wait_for_selector() / wait_for_load_state()
CSS selectors for forms get_by_label(), get_by_role()
Re-login each run context.storage_state() persistence
Committing auth state Add auth-state.json to .gitignore

Memory Protocol (MANDATORY)

Before starting: Read .claude/context/memory/learnings.md

After completing:

  • New extraction pattern -> .claude/context/memory/learnings.md
  • Bot detection encountered -> .claude/context/memory/issues.md

ASSUME INTERRUPTION: If it's not in memory, it didn't happen.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/oimiragieo-agent-studio-browser-automation/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

oimiragieo-agent-studio-browser-automation.ocm.jsonjson
{
  "ocm": "1",
  "id": "oimiragieo-agent-studio-browser-automation",
  "kind": "skill",
  "name": "browser-automation",
  "description": "Programmatic web automation using Playwright Python — data extraction, form filling, multi-step workflows, auth session management, screenshot/PDF capture, and anti-detection patterns. Use for scripted automation tasks, not interactive MCP-based browser control.",
  "publisher": "oimiragieo",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding"
    ],
    "tags": [
      "skill-md",
      "playwright",
      "browser",
      "automation",
      "scraping",
      "data-extraction",
      "forms",
      "screenshots",
      "pdf",
      "auth"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Programmatic web automation using Playwright Python — data extraction, form filling, multi-step workflows, auth session management, screenshot/PDF capture, and anti-detection patterns. Use for scripted automation tasks, not interactive MCP-based browser control."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/oimiragieo/agent-studio",
      "path": ".claude/skills/browser-automation/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/oimiragieo/agent-studio/blob/HEAD/.claude/skills/browser-automation/SKILL.md",
      "key": "oimiragieo/agent-studio/.claude/skills/browser-automation/SKILL.md"
    }
  },
  "instructions": "# Browser Automation Skill\n\n## Setup\n\n```bash\npip install playwright && playwright install chromium\npip install playwright-stealth  # optional, for anti-detection\n```\n\n## Skill Comparison\n\n| Skill                | Use Case                                       |\n| -------------------- | ---------------------------------------------- |\n| `browser-automation` | Scripted automation, data pipelines, form bots |\n| `webapp-testing`     | QA assertions, visual regression, test suites  |\n| `chrome-browser`     | Interactive MCP DevTools control               |\n\n## Iron Law\n\n```\nNEVER USE time.sleep() ",
  "cost": {
    "context_tokens": 737
  }
}

Fetch it by URL: GET /api/v1/registry/oimiragieo-agent-studio-browser-automation/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.