All skills
aktsmm avatar

/browser-max-automation

@2e6b12a
by yamapanaktsmm/agent-skills26 stars
4

Visible browser automation using Playwright MCP, CLI, and CDP without interrupting the user's foreground work. Use for navigation, forms, screenshots, durable file downloads, repeatable browser workflows, existing-session reuse, or troubleshooting CDP / iframe / modal / file chooser / passkey (WebAuthn) issues.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/browser-max-automation

This session only. Nothing lands on disk.

referencesinstructionswindows-subprocess-cdp.md

≈452 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Windows Subprocess and CDP Stability

Use this when running Playwright/CDP automation from a CLI helper on Windows.

PIPE Deadlock

subprocess.Popen(stdout=PIPE) + communicate() can deadlock because Playwright's Node/browser process tree keeps pipe handles open. Redirect stdout/stderr to files and poll the process instead.

with open(stdout_path, "w", encoding="utf-8") as fout, open(stderr_path, "w", encoding="utf-8") as ferr:
    proc = subprocess.Popen(cmd, stdout=fout, stderr=ferr, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP)

Terminal Interference

  • VS Code shared terminals can send unexpected SIGINT to long-running helpers. Ignore SIGINT in the runner or launch with Start-Process -Wait.
  • Prefer JSON status artifacts over terminal text for completion decisions.
result = json.loads(Path(output_json).read_text(encoding="utf-8"))
if result.get("final_status") != "passed":
    raise RuntimeError(f"runner failed: {result.get('final_status')}")

Cleanup

  • CDP helpers often spawn Node/browser child trees. proc.kill() may leave grandchildren.
  • Use tree kill only for the owned helper PID: taskkill /F /T /PID <pid>.
  • For helpers that use a per-CDP lock file, treat a stuck lock as evidence, not as an automatic retry signal. Check whether the recorded PID still exists and whether it matches the current helper command. Delete only stale locks whose owner process is gone; if duplicate helpers are alive on the same CDP endpoint, stop the duplicate owned helper before retrying.
  • If the terminal exits ambiguously but the JSON artifact shows the intended final state, use a fresh read-only verification pass before rerunning the mutating step. Avoid replaying upload/publish just because stdout or exit reporting was incomplete.

Source: SKILL.md on GitHub

1 warning4mo4 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill provides instructions and code for advanced browser automation using Playwright and Chrome DevTools Protocol (CDP). It includes patterns for handling complex web interfaces such as iframes, modals, and virtual scrolls. Security analysis identified a surface for indirect prompt injection common to browser automation tools, as the skill ingests and acts upon untrusted data from external websites.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    1/2 files flagged

Signed by skilld at 2e6b12a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 18 hours ago.

Activeupdated 2 days ago
argument-hint
自動化したい URL、操作内容、使いたいモード
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}

README badge

README badge for aktsmm/agent-skills/browser-max-automation