本文へ移動
cccskills
無料GitHub で公開

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 scripted automation tasks, not interactive MCP-based browser control.

インストール方法を見る

含まれるファイル(10)

  • SKILL.md4.1 KB
  • commands/browser-automation.md118 B
  • hooks/post-execute.cjs189 B
  • hooks/pre-execute.cjs295 B
  • references/research-requirements.md1.8 KB
  • rules/browser-automation.md1.3 KB
  • schemas/input.schema.json1001 B
  • schemas/output.schema.json619 B
  • scripts/main.cjs727 B
  • templates/implementation-template.md778 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Browser Automation Skill

Setup

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

Skill Comparison

SkillUse Case
browser-automationScripted automation, data pipelines, form bots
webapp-testingQA assertions, visual regression, test suites
chrome-browserInteractive 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-PatternCorrect Approach
time.sleep() for waitspage.wait_for_selector() / wait_for_load_state()
CSS selectors for formsget_by_label(), get_by_role()
Re-login each runcontext.storage_state() persistence
Committing auth stateAdd 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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Ensure accessibility in UI components including semantic HTML, ARIA attributes, keyboard navigation, and WCAG 2.2 AA compliance.

日本語の概要は準備中です。原文の説明を表示しています。

oimiragieo/agent-studio432026年7月14日 更新

Use when you want to improve response quality through meta-cognitive reasoning. Applies 15+ reasoning methods to reconsider and refine initial outputs.

日本語の概要は準備中です。原文の説明を表示しています。

oimiragieo/agent-studio432026年7月14日 更新

N-round opposing-stance debates for trade-off analysis. Assigns pro/con roles to agents, runs structured debate rounds with quality scoring, and produces a moderator synthesis with confidence-rated recommendation. Generalizable to architecture, technology, security, and design decisions.

日本語の概要は準備中です。原文の説明を表示しています。

oimiragieo/agent-studio432026年7月14日 更新

Force adversarial code review stance that eliminates confirmation bias — reviewer must find issues or re-analyze

日本語の概要は準備中です。原文の説明を表示しています。

oimiragieo/agent-studio432026年7月14日 更新

Creates specialized AI agents on-demand when no existing agent matches a request. Use when the Router cannot find a suitable agent for a task. Enables self-evolution by generating persistent agents.

日本語の概要は準備中です。原文の説明を表示しています。

oimiragieo/agent-studio432026年7月14日 更新

LLM-as-judge evaluation framework with 5-dimension rubric (accuracy, groundedness, coherence, completeness, helpfulness) for scoring AI-generated content quality with weighted composite scores and evidence citations

日本語の概要は準備中です。原文の説明を表示しています。

oimiragieo/agent-studio432026年7月14日 更新

oimiragieo のスキルをすべて見る

このスキルの問題を報告する