browser-automation

Delegate browser automation tasks to a subagent to keep main context clean. Use this skill when you need to perform browser interactions (navigate, click, type, screenshot, etc.) without bloating the main agent's context window. Trigger phrases: "browser", "web page", "navigate to", "click on", "fill form", "screenshot", "test UI"

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "browser-automation" with this command: npx skills add hienlh/claude-skill-browser-automation/hienlh-claude-skill-browser-automation-browser-automation

Browser Automation Skill

Delegate browser tasks to subagent → main context stays clean (~100 tokens vs ~3000 tokens).

Quick Template

Task({
  subagent_type: "general-purpose",
  description: "Browser: [description]",
  prompt: `BROWSER TASK: [what to do]
    Use Playwright MCP. Prefer browser_run_code.
    Return: SUCCESS/FAILED/NEEDS_INPUT + AgentId if pausing.`
})

Interactive Flow (NEEDS_INPUT)

1. Subagent returns:    Status: NEEDS_INPUT | Fields: email, password | AgentId: abc123
2. Main agent:          AskUserQuestion for credentials
3. Resume subagent:     Task({ resume: "abc123", prompt: "email: x, password: y" })

Key Tools

ToolUse
browser_run_codePREFERRED - Batch actions
browser_navigateGo to URL
browser_snapshotPage state (large output)

browser_run_code Pattern

mcp__playwright__browser_run_code({
  code: `async (page) => {
    await page.goto('http://localhost:3001/login');
    await page.fill('#email', 'user@test.com');
    await page.click('button[type="submit"]');
    return { success: true, url: page.url() };
  }`
})

Stuck Detection → Auto Reload

When page/UI stuck (loading, frozen, no response), reload:

// 1. Internal loading stuck (spinners, skeletons)
const hasLoading = await page.$('.spinner, .loading, [class*="loading"]');
if (hasLoading) { await page.reload(); }

// 2. UI frozen (can't click) - try Escape first, then reload
await page.keyboard.press('Escape');
await page.waitForTimeout(500);
if (stillStuck) { await page.reload(); }

// 3. Action no response - verify result, retry or reload
await page.click('button');
await page.waitForTimeout(1000);
if (noChange) { await page.reload(); }

See references/troubleshooting.md for comprehensive patterns.

Response Format

Status: SUCCESS/FAILED/NEEDS_INPUT
Action: [what was done]
AgentId: [for resume if NEEDS_INPUT]
Fields: [required fields if NEEDS_INPUT]

References

  • references/interactive-flow.md - Login/auth/user input handling
  • references/examples.md - Detailed task examples
  • references/troubleshooting.md - Error handling patterns

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

PinchTab Browser Ops

Browser automation via PinchTab CLI (nav/snap/find/click/fill/press/text) with low-token accessibility-tree flow. Use when the user asks to operate websites,...

Registry SourceRecently Updated
500Profile unavailable
Coding

Safari Browser Control

Control the user's real Safari browser on macOS using AppleScript and screencapture. Read pages, click elements, type text, take screenshots, navigate tabs —...

Registry SourceRecently Updated
1400Profile unavailable
Coding

Claude for Safari

Control the user's real Safari browser on macOS using AppleScript and screencapture. This skill should be used when the user asks to interact with Safari, br...

Registry SourceRecently Updated
1160Profile unavailable
Coding

Playwright CLI Automation

官方Microsoft Playwright CLI网页自动化工具,支持所有主流浏览器的无头/有头自动化操作,包括页面导航、元素交互、截图、录制、测试等功能。当用户提到网页自动化、浏览器操作、爬虫、截图、录制用户操作、E2E测试时触发。

Registry SourceRecently Updated
1992Profile unavailable