cuawright-web
Ce qu’il fait
Cette compétence automatise une tâche web en plusieurs étapes dans un navigateur Playwright local et enregistre des scripts réutilisables, des captures d'écran et un journal. Elle s'adresse aux personnes qui veulent un flux web reproductible avec une preuve visuelle de son bon déroulement.
Quand l’utiliser
- ✓Quand vous voulez automatiser une tâche web comme une recherche ou le remplissage d'un formulaire.
- ✓Quand vous avez besoin d'un script réutilisable pour une tâche de navigateur répétée.
- ✓Quand vous voulez des captures d'écran et un journal qui prouvent que la tâche a été menée à bien.
Lien du skill
https://github.com/microsoft/CUAWright/blob/main/skills/cuawright-web/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Automatise la recherche de l'état de mon dossier sur le site fiscal de l'administration et enregistre une capture d'écran de chaque étape.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
La compétence pilote un navigateur Playwright local une commande à la fois, enregistre les captures d'écran et un journal des actions dans un dossier d'exécution, puis écrit un script que vous pouvez réutiliser. L'agent vérifie lui-même les captures pour confirmer la réussite.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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.pysolves the task for the literal values the user provided. Triggered by a plain prompt or by/cuawright:run <task>. - CLI tool (parameterized).
final_script.pyis a reusable CLI: one function with a Google-styleArgs:docstring + anargparsewrapper 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. Seereference/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 existingrun_*folder. - Inside each run folder:
final_runs/run_<id>/final_script.pyfinal_runs/run_<id>/screenshots/final_execution_<step_number>_<action>.pngfinal_runs/run_<id>/final_script_log.txt— reset at the start of each clean run; onestep <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 withERR_HTTP2_PROTOCOL_ERRORdue to TLS/H2 fingerprinting.) - Always use
viewport={"width": 1280, "height": 1800}. Never callpage.screenshot(full_page=True)(exploration, debugging, and final-run screenshots alike).
Workflow
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.
Explore. Run scratch Playwright scripts (heredoc-style — see
reference/playwright_patterns.md) to discover stable selectors and confirm filter controls exist. UseReadon saved PNGs to inspect UI state. Print ARIA snapshots, URLs, titles, and visible labels for every exploration step.Author
final_script.pyin a freshfinal_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.Execute the final script once. Capture stdout/stderr.
Self-verify (this replaces
cuawright.webwright.tools.self_reflection). Walkplan.md:- For each CP, identify a screenshot path AND/OR a log line that proves
it.
Readeach cited PNG and confirm the evidence is unambiguous
- For each CP, identify a screenshot path AND/OR a log line that proves
it.
Questions fréquentes
Faut-il une clé API ?
La description indique qu'aucune clé API de modèle n'est nécessaire pour cette compétence.
Qu'obtient-on à la fin ?
Vous obtenez des scripts réutilisables, un journal des actions et des captures d'écran dans un dossier d'exécution.
Est-elle destinée aux applications de bureau ?
Non, la description indique qu'elle concerne le navigateur, et les tâches de bureau utilisent un autre environnement d'exécution.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 6.1k
- Position au classement
- #14427
- Licence
- MIT
- Mis à jour
- 27/10/2026
Commentaires
- …
Skills similaires
diffs
394kPermet à votre agent de produire un diff réel et partageable de vos modifications, sous forme de lien ou d'image, plutôt qu'un résumé écrit à la main.
coding-agent
394kAide votre agent à confier une tâche de programmation plus importante à Codex, Claude Code ou OpenCode comme travailleur en arrière-plan, puis à suivre sa progression.
gh-issues
394kAide votre agent à trouver des tickets GitHub, choisir ceux à traiter et ouvrir des pull requests avec des correctifs, y compris le suivi des commentaires de relecture.