
Webwright
Turn a one-off browser automation request into a parameterized Python CLI you can rerun with different search terms, dates, or filters.
Install
npx skills add https://github.com/microsoft/webwright --skill webwrightWhat is this skill?
- Extracts vary-able inputs into a `# Parameters` table in `plan.md` with types, defaults, and formats
- Keeps fixed site facts (start URL, selectors) hard-coded while exposing CLI flags for real variables
- Authors `final_script.py` with a domain-named function, Google-style docstring, and matching argparse defaults
- Defaults match the original task so `python final_script.py` with no args reproduces the first run
- Runs work under fresh `final_runs/run_<id>/` folders for traceable iterations
Adoption & trust: 124 installs on skills.sh; 5.2k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Agent Browservercel-labs/agent-browser
Lark Imlarksuite/cli
Lark Calendarlarksuite/cli
Lark Sheetslarksuite/cli
Lark Vclarksuite/cli
Lark Contactlarksuite/cli
Journey fit
Primary fit
Canonical shelf is Build because the deliverable is a reusable automation script and plan artifact for your agent toolchain. Agent-tooling fits Webwright’s CLI tool mode: procedural skill that shapes how the agent authors `final_script.py`, `plan.md`, and argparse wiring.
Common Questions / FAQ
Is Webwright safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Webwright
You are operating as the Webwright agent in **CLI tool mode**. First read the `SKILL.md` of the `webwright` skill (the parent directory of this `commands/` folder) and the `reference/cli_tool_mode.md` next to it, then parameterize the following task so the resulting `final_script.py` can be re-run later with different argument values: $ARGUMENTS Steps: 1. **Identify parameters.** Extract every requirement the user could plausibly vary (search terms, locations, dates, filter values, etc.). Items truly fixed for the site (start URL, site name, selector strategy) are NOT parameters — keep them hard-coded. 2. **Write `plan.md`.** Add a `# Parameters` table with columns `name | type | source phrase | default | allowed/format`, plus the usual `# Critical Points` checklist. Defaults must equal the concrete task values so `python final_script.py` (no args) reproduces the task. 3. **Author `final_script.py`** in a fresh `final_runs/run_<id>/`: - One reusable function named after the task domain (e.g. `def search_<domain>(arg_a, arg_b, ...): ...`). - Google-style docstring with summary, full `Args:` block (name, type, meaning, format/units, default), and `Returns:`. - `argparse` CLI under `if __name__ == "__main__":` whose flags exactly mirror the function arguments and whose defaults equal the concrete task values. - **Side-effect-free at import time** — no browser launch, no network call, no file write at module top-level. - First log line after reset must be `step 0 params: <name>=<value> <name>=<value> ...`. - Same instrumentation as default mode: viewport 1280×1800, headless local Firefox, no `full_page=True`, screenshots and final datum saved into the run folder. 4. **Reproduce the task with no arguments.** Run `python final_runs/run_<id>/final_script.py` and confirm it succeeds end-to-end. 5. **Import-safety smoke test.** Load the module in a separate Python process and confirm no browser is launched and the reusable function is importable. 6. **Self-verify** every critical point against the saved screenshots and the action log (replaces `self_reflection`). If any CP fails, diagnose, fix the script (preserving the CLI shape), re-run inside `final_runs/run_<id+1>/`, and re-verify. 7. **Show the user `--help`.** End by running `python final_runs/run_<id>/final_script.py --help` and reporting both the final datum and the help text so the user knows how to call the tool again with different arguments. Refer to `reference/cli_tool_mode.md` for the complete contract and `reference/playwright_patterns.md` for the Playwright skeleton. --- description: Run a one-shot web task with the Webwright Playwright workflow. argument-hint: <natural-language web task> --- You are operating as the Webwright agent. Solve the following 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. Task: $ARGUMENTS For the full operating contract, first read the `SKILL.md` of the `webwright` skill (the parent directory of this `commands/` folder). Then follow the standard Webwright workflow: 1. Pick a `WORKSPACE_DIR` and write `plan.md` with a numbered list of critical points. 2. Explore with scratch Playwright scripts; open PNG screenshots to inspect UI state. 3. Author and run an instrumented `final_script.py` inside a fresh `final_runs/run_<id>/` (viewport 1280×1800, headless local Firefox, no `full_page=True`). 4. Self-verify every critical point against the saved screenshots and `final_script_log.txt`. Diagnose, fix, and re-run in a new `run_<id+1>/` until every CP is ticked with cited evidence. 5. Report the final dat