Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/microsoft/webwright/craftgit clone --depth 1 https://github.com/microsoft/WebwrightWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00014 | $0.00706 |
| Opus 5 | $0.00007 | $0.00353 |
| Sonnet 5 | $0.00003 | $0.00141 |
| Haiku 4.5 | $0.00001 | $0.00071 |
Grade A, and why
craft scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
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:
-
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.
-
Write
plan.md. Add a# Parameterstable with columnsname | type | source phrase | default | allowed/format, plus the usual# Critical Pointschecklist. Defaults must equal the concrete task values sopython final_script.py(no args) reproduces the task. -
Author
final_script.pyin a freshfinal_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), andReturns:. argparseCLI underif __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.
- One reusable function named after the task domain
(e.g.
-
Reproduce the task with no arguments. Run
python final_runs/run_<id>/final_script.pyand confirm it succeeds end-to-end. -
Import-safety smoke test. Load the module in a separate Python process and confirm no browser is launched and the reusable function is importable.
-
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 insidefinal_runs/run_<id+1>/, and re-verify. -
Show the user
--help. End by runningpython final_runs/run_<id>/final_script.py --helpand 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.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 63 lines · 14 tokens per session scan A 8ef662037e41
craft is a command published in the GitHub repository microsoft/Webwright (5,954 stars, last pushed 28d ago), licensed MIT. It adds 14 tokens to every session and 706 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
e2e
使用 Playwright 对 Web UI 进行端到端测试(支持视频录制、Trace 录制、控制台/网络日志捕获).
auto-browse
Auto-browse — learn, optimize, and graduate browser operations or web data-mining workflows.
research-perplexity
Run a deep research query using Perplexity's /research mode via Playwright browser automation. This is an alternative to /export-to-council that uses Perplexity's dedicated research mode instead of multi-model council.
review
Compare a reference design against an implementation. Accepts Figma URL, image file, or browser URL as reference.
graphify
Turn your vault into a clustered knowledge graph with HTML and JSON outputs.
laravel-playwright
E2E Playwright patterns; use the laravel:e2e-playwright skill exactly as written.