本文へスキップ
Skillpedia
一般的なプログラミング6.1k · #14427

cuawright-web

できること

このスキルは、複数の手順からなるウェブ作業をローカルのPlaywrightブラウザで自動化し、スクリーンショットと操作ログ、再利用できるスクリプトを保存します。繰り返し使えるウェブの作業と、うまくいった証拠がほしい人のためのものです。

使う場面

  • ✓検索やフォーム入力などのウェブ作業を自動化したいとき。
  • ✓繰り返し行うブラウザ作業のための再利用できるスクリプトが必要なとき。
  • ✓作業が完了したことを示すスクリーンショットとログがほしいとき。

スキルのリンク

https://github.com/microsoft/CUAWright/blob/main/skills/cuawright-web/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/microsoft/CUAWright/blob/main/skills/cuawright-web/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“政府の税務サイトで私のフォームの状況を検索する作業を自動化してください。各手順のスクリーンショットを保存してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、コマンドを一つずつ使ってローカルのPlaywrightブラウザを操作し、実行フォルダにスクリーンショットと操作ログを保存します。さらに、再利用できるスクリプトを書きます。エージェントは成功したかどうかをスクリーンショットで自分で確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

CUAWright browser skill

This skill drives the Webwright browser subsystem in cuawright.webwright. For OSWorld desktop tasks, use the separate cuawright-desktop runtime described in docs/desktop.md at the repository root.

You are the Webwright agent. Webwright is normally an LLM-driven loop that emits one JSON-wrapped bash_command per turn against a local terminal + Playwright workspace. In Claude Code, you replace that loop directly: use the Bash tool the same way the bash_command field is used in src/cuawright/webwright/config/base.yaml. You do NOT need to wrap your output in JSON — that constraint only existed because the original harness parsed model output.

This skill keeps the workspace contract (plan.md, final_runs/run_<id>/ folders, instrumented final_script.py, screenshots, action log) but replaces the OpenAI-backed image_qa and self_reflection tools with your own native abilities: you read PNGs with Read and verify success against plan.md yourself. No OPENAI_API_KEY or other model API keys required.

Modes

  • Default (one-shot). final_script.py solves the task for the literal values the user provided. Triggered by a plain prompt or by /cuawright:run <task>.
  • CLI tool (parameterized). final_script.py is a reusable CLI: one function with a Google-style Args: docstring + an argparse wrapper whose flags default to the concrete task values, so the user can rerun it later with different arguments. Triggered by /cuawright:craft <task> or when the user asks to "parameterize", "make it reusable", "turn this into a CLI", etc. See reference/cli_tool_mode.md.

Prerequisites (one-time)

From the CUAWright repo root:

pip install -e .
playwright install firefox

No API keys needed for this skill.

Workspace Contract

Mirror what base.yaml's instance_template requires:

  • Pick a WORKSPACE_DIR (e.g. outputs/<task_id>/) and work only there. Keep all generated code, screenshots, logs, and notes inside it.
  • The required final artifact path is final_script.py.
  • Every clean execution of the final script lives in its own final_runs/run_<id>/ folder. <id> is an integer higher than any existing run_* folder.
  • Inside each run folder:
    • final_runs/run_<id>/final_script.py
    • final_runs/run_<id>/screenshots/final_execution_<step_number>_<action>.png
    • final_runs/run_<id>/final_script_log.txt — reset at the start of each clean run; one step <n> action: <reason and action> line per constraint-relevant interaction; the final datum (price, code, winner, quote, etc.) printed at the end.
  • Browser mode is local: every Playwright run launches a fresh Firefox via playwright.firefox.launch(headless=True). There is no persistent browser state — each script reconstructs state from scratch. (Firefox is used instead of Chromium because some sites fail under Chromium with ERR_HTTP2_PROTOCOL_ERROR due to TLS/H2 fingerprinting.)
  • Always use viewport={"width": 1280, "height": 1800}. Never call page.screenshot(full_page=True) (exploration, debugging, and final-run screenshots alike).

Workflow

  1. Plan. Parse the task into a numbered checklist of critical points — every explicit constraint, filter, sort, selection, or required datum that must be satisfied. Write it to WORKSPACE_DIR/plan.md:

    # Critical Points
    - [ ] CP1: <description>
    - [ ] CP2: <description>
    

    Each CP must be independently verifiable from a screenshot or a log line.

  2. Explore. Run scratch Playwright scripts (heredoc-style — see reference/playwright_patterns.md) to discover stable selectors and confirm filter controls exist. Use Read on saved PNGs to inspect UI state. Print ARIA snapshots, URLs, titles, and visible labels for every exploration step.

  3. Author final_script.py in a fresh final_runs/run_<id>/. Instrument it per the contract: reset the log, write a step line for every constraint-relevant action, save a uniquely-named screenshot for every critical point, and print the final datum into the log at the end.

  4. Execute the final script once. Capture stdout/stderr.

  5. Self-verify (this replaces cuawright.webwright.tools.self_reflection). Walk plan.md:

    • For each CP, identify a screenshot path AND/OR a log line that proves it. Read each cited PNG and confirm the evidence is unambiguous
よくある質問

AIのAPIキーが必要ですか?

説明文によると、このスキルにモデルのAPIキーは必要ありません。

最後に何が手に入りますか?

実行フォルダに、再利用できるスクリプト、操作ログ、スクリーンショットが入ります。

デスクトップアプリ向けですか?

いいえ。ブラウザ向けです。デスクトップの作業は別の実行環境を使います。

詳細

作者による元の説明

Solve a user-specified web task code-as-action style by driving a local Playwright browser through one bash command at a time, saving screenshots and an action log into `final_runs/run_<id>/`, and visually verifying the result. Use when the user asks to automate a web task (search, filter, form-fill, multi-step flow, data extraction) and wants reusable scripts plus screenshot evidence rather than a one-shot answer.

repo: microsoft/CUAWright

人気

GitHubのスター
6.1k
ランキング
#14427
ライセンス
MIT
更新日
2026/10/27

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

似ているスキル