Official agent skill

CUAWright Web Task Automation

by microsoft in microsoft/CUAWright

Solves web tasks by driving a local Playwright browser one bash command at a time, saving a reusable script, screenshots and an action log for each run.

OfficialMITAuto-check: notesProductivity & Automation

Install CUAWright Web Task Automation

skills CLI
$ npx skills add microsoft/CUAWright --skill cuawright-web -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/CUAWright cuawright-web --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/CUAWright.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cuawright-web .claude/skills/cuawright-web && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cuawright-web
GitHub stars
6k
Token cost
~2k tokens
SKILL.md length
930 words
Files
6
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Solves web tasks by driving a local Playwright browser one bash command at a time, saving a reusable script, screenshots and an action log for each run.

  • Works in 6 steps: Plan. Parse the task into a numbered… → Explore. Run scratch Playwright scripts… → Author final_script.py in a fresh… → …
  • Automating a multi-step web flow such as a search, filter or form fill
  • SKILL.md covers Modes, Prerequisites (one-time), Workspace Contract and Workflow, plus 3 more sections
  • Calls pip and playwright; needs OPENAI_API_KEY

What it does

In Claude Code the agent takes the place of the Webwright loop. It runs Playwright commands against a local browser through the Bash tool, reads its own screenshots with the Read tool and checks success against a plan.md file, so no model API keys are needed. Work stays inside one chosen workspace directory under a fixed contract: a final_script.py, and for each clean execution a numbered folder under final_runs holding the script, screenshots named by step and action, and a final_script_log.txt.

There are two modes. The default solves the task for the literal values you gave and starts from a plain prompt or /cuawright:run. The CLI-tool mode, started with /cuawright:craft or by asking to parameterize the script, produces a reusable command-line script with a Google-style Args docstring and argparse flags that default to the concrete values. Setup is pip install -e . from the repo root plus playwright install firefox. Reference files cover Playwright patterns, the workflow and CLI tool mode, and desktop tasks use a separate runtime.

When your agent uses it

  • Automating a multi-step web flow such as a search, filter or form fill
  • Extracting data from a site while keeping screenshot evidence
  • Turning a one-off browser task into a reusable parameterized CLI script

Example prompts

  • “Search the city permit site for my street address and save a screenshot at each step.”
  • “/cuawright:craft download last month's invoices from the vendor portal as a CLI I can rerun for another month.”
  • “Fill in the contact form on our staging site and verify the confirmation page.”

Requirements

  • Python with the CUAWright package installed through pip install -e .
  • Playwright with Firefox installed
  • Pre-approved tools (allowed-tools): Bash, Read, Write, Edit, bash, read_file, write_file

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Plan. Parse the task into a numbered checklist of critical points
  2. Explore. Run scratch Playwright scripts (heredoc-style — see
  3. Author final_script.py in a fresh final_runs/run_/. Instrument
  4. Execute the final script once. Capture stdout/stderr.
  5. Self-verify (this replaces cuawright.webwright.tools.self_reflection). Walk
  6. Done. Only when every CP in plan.md is checked off with cited

What it can do on your machine

Read from SKILL.md and the folder at commit ff44a05. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Edit
    • bash
    • read_file
    • write_file

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • playwright

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

CUAWright Web Task Automation loads about 2k tokens when it runs. Until then it costs about 108 tokens; SKILL.md has 930 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Edit, bash, read_file, write_file

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/CUAWright at commit ff44a05, republished under its MIT licence (© microsoft). 930 words, ~1,995 tokens.

Download SKILL.mdSave it as .claude/skills/cuawright-web/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
cuawright-web
description
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.
allowed-tools
Bash, Read, Write, Edit, bash, read_file, write_file

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:

bash
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:

    markdown
    # 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 (the filter chip is visible, the date matches exactly, the result list reflects the constraint, etc.).
    • Tick the CP only when evidence is concrete. Be harsh with ambiguous, occluded, or partially-applied states.
    • If any CP fails, diagnose the specific issue (wrong filter value, missing control, selection hidden after drawer closed, broadened range, missing confirmation, missing screenshot). Fix final_script.py, re-run inside final_runs/run_<id+1>/, and re-verify.
  6. Done. Only when every CP in plan.md is checked off with cited evidence. Report the final datum to the user.

Show full SKILL.md (295 more words)Show less

Hard Rules

  • One bash command per step; observe its output before issuing the next.
  • Use stable selectors and current-run evidence — never guess UI state.
  • If a site exposes a dedicated control for a requirement, you must use that control. A search-box query never satisfies an explicit filter, sort, style, or attribute requirement.
  • Ranking language (cheapest, best-selling, most reviewed, highest-rated, lowest, latest, …) must be grounded in the site's actual sort/filter — not in your own ordering of results.
  • Numeric, date, quantity, and unit constraints are exact. Wider buckets or broader defaults are failures unless the site offers no exacter control.
  • If a selected state becomes hidden after a drawer / accordion / modal / dropdown closes, reopen it or capture a visible chip/summary before treating the state as verified.
  • Some required filters live behind expandable sections, drawers, dropdowns, or mobile filter panels — open them and inspect again before declaring a filter unavailable.
  • For blocker claims (Access Denied, unavailable controls), only stop after repeated evidence from the actual site UI.
  • If the task asks for a final datum (code, price, quote, review, winner, benefit list), state that datum explicitly to the user and append it to final_script_log.txt.
  • Do not install extra packages with pip/apt. playwright, httpx, pydantic, etc. are already installed.
  • Once final_script.py exists, prefer incremental edits (Edit) over rewriting the whole file.

Reference Files

  • reference/playwright_patterns.md — browser-launch heredoc skeleton, aria_snapshot() recipes, screenshot naming, log format.
  • reference/workflow.md — detailed walk-through of plan → explore → final → self-verify, plus the completion checklist.
  • reference/cli_tool_mode.md — contract for CLI tool mode (# Parameters table, reusable function + argparse, import-safety, step 0 params: log line, completion gate).

Slash Commands

Optional shortcuts under commands/:

  • /cuawright:run <task> — default one-shot mode.
  • /cuawright:craft <task> — CLI tool mode.

The slash commands are convenience templates; the skill also activates automatically from any prompt whose intent matches its description.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in skills/cuawright-web of microsoft/CUAWright.

  • SKILL.md
  • commands/craft.md
  • commands/run.md
  • reference/cli_tool_mode.md
  • reference/playwright_patterns.md
  • reference/workflow.md

Open the folder on GitHubat commit ff44a05

Compare with similar skills

CUAWright Web Task Automation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

CUAWright Web Task Automation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
CUAWright Web Task Automation this skillmicrosoft/CUAWright6k—~2kAutomated safety check: NotesMIT
Skyvern Browser AutomationSkyvern-AI/skyvern23k1 repos~2.9kAutomated safety check: PassAGPL-3.0
AI Search Hubminsight-ai-info/AI-Search-Hub1.3k—~1.3kAutomated safety check: PassNone
Ego Browserkwakseongjae/oh-my-design5312 repos~4.9kAutomated safety check: PassMIT
Browser Controlanomalyco/browser-control440—~8.3kAutomated safety check: PassMIT
Playwright Bowserdisler/bowser265—~1.1kAutomated safety check: NotesNone

Similar skills

  • Skyvern Browser Automation

    Skyvern-AI/skyvern

    Picks the right Skyvern CLI command for a web task, from quick yes/no checks to reusable multi-page workflows, instead of falling back to plain page fetching.

    23k GitHub starsUsed in 1 repo~2.9k tokens
    Productivity & AutomationAuto-check passed
  • AI Search Hub

    minsight-ai-info/AI-Search-Hub

    Run the AI Search Hub browser automation scripts for Yuanbao, LongCat, Doubao, Qwen, Gemini, Grok, and MiniMax.

    1.3k GitHub stars~1.3k tokensUpdated 5 mo ago
    Productivity & AutomationAuto-check passed
  • Ego Browser

    kwakseongjae/oh-my-design

    When you need a browser, read this Skill by default. An agent skill from kwakseongjae/oh-my-design.

    531 GitHub starsUsed in 2 repos~4.9k tokens
    Productivity & AutomationAuto-check passed
  • Browser Control

    anomalyco/browser-control

    Drive the user's existing Chromium-family browser with deterministic Playwright.

    440 GitHub stars~8.3k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Playwright Bowser

    disler/bowser

    Headless browser automation using Playwright CLI. An agent skill from disler/bowser.

    265 GitHub stars~1.1k tokensUpdated 7 mo ago
    Productivity & AutomationAuto-check: notes
  • Verify

    rengwu/wayfinder-maps

    Build, launch and drive wayfinder-maps to verify a change end-to-end (server + headless browser).

    134 GitHub stars~738 tokensUpdated yesterday
    Productivity & AutomationAuto-check passed

Works with

Questions about CUAWright Web Task Automation

What does CUAWright Web Task Automation do?

Solves web tasks by driving a local Playwright browser one bash command at a time, saving a reusable script, screenshots and an action log for each run. In Claude Code the agent takes the place of the Webwright loop.md file, so no model API keys are needed.

When should I use CUAWright Web Task Automation?

CUAWright Web Task Automation fits situations like: automating a multi-step web flow such as a search, filter or form fill; extracting data from a site while keeping screenshot evidence; turning a one-off browser task into a reusable parameterized CLI script.

How do I install CUAWright Web Task Automation in Claude Code?

Run `npx skills add microsoft/CUAWright --skill cuawright-web -a claude-code`. Or copy the skill folder (skills/cuawright-web in microsoft/CUAWright) into .claude/skills/cuawright-web in your project. Claude Code loads it when a task matches its description.

How do I install CUAWright Web Task Automation in Codex?

Run `npx skills add microsoft/CUAWright --skill cuawright-web -a codex`. Or copy the skill folder (skills/cuawright-web in microsoft/CUAWright) into .agents/skills/cuawright-web in your project. Codex loads it when a task matches its description.

Can I use CUAWright Web Task Automation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/CUAWright --skill cuawright-web -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cuawright-web, .gemini/skills/cuawright-web, .github/skills/cuawright-web and .opencode/skills/cuawright-web in your project.

What does CUAWright Web Task Automation need to run?

Going by SKILL.md and its folder, CUAWright Web Task Automation needs the command-line tools its instructions call (pip and playwright) and credentials named OPENAI_API_KEY. Our summary lists: Python with the CUAWright package installed through pip install -e .; Playwright with Firefox installed. Its frontmatter pre-approves these tools: Bash, Read, Write, Edit, bash, read_file, write_file.

Does CUAWright Web Task Automation access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is CUAWright Web Task Automation safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does CUAWright Web Task Automation use?

CUAWright Web Task Automation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does CUAWright Web Task Automation use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to CUAWright Web Task Automation?

Skills that share tags, products or a category with CUAWright Web Task Automation: Skyvern Browser Automation (Skyvern-AI/skyvern, 23k stars), AI Search Hub (minsight-ai-info/AI-Search-Hub, 1.3k stars), Ego Browser (kwakseongjae/oh-my-design, 531 stars) and Browser Control (anomalyco/browser-control, 440 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains CUAWright Web Task Automation?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/CUAWright, which has 6,043 GitHub stars. The repository was last updated on October 6, 2026.

Source: microsoft/CUAWright on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.