write

A command that creates and runs a Playwright end-to-end test, which checks a complete user interaction in a real browser.

In plain words
What is it for?
Use it to test flows such as forms, logins, clicks, and multi-page actions, provided Playwright is configured and the application is reachable.
Why use it?
It turns a described user flow into a repeatable browser test and checks that the project and development server are ready first.

Command

Install

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.

agentmods
npx agentmods add commands/alphabravo-oss/guild/write
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,072 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01072
Opus 5 $0.00011 $0.00536
Sonnet 5 $0.00004 $0.00214
Haiku 4.5 $0.00002 $0.00107

Measured yesterday against content hash 696416f4cf8c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

4. Confirm their dev server is reachable at the baseURL in `playwright.config.ts`. Try `curl -sI $BASE_URL` (default `http://localhost:3000`). If unreachable, ask the user to start it.
plugins/e2e/commands/write.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The user wants you to write a Playwright E2E test for a specific user flow. Flow description is in $ARGUMENTS.

Preflight

  1. Confirm playwright.config.ts exists in cwd. If not, tell them to run /e2e:init first and STOP.
  2. Read ${CLAUDE_PLUGIN_ROOT}/skills/author/SKILL.md (or invoke the author skill) — it has the selector/wait/idempotency rules you must follow.
  3. Confirm Playwright MCP tools are loaded (browser_navigate, browser_snapshot, etc.). If they aren't loaded, tell the user to restart Claude Code and STOP.
  4. Confirm their dev server is reachable at the baseURL in playwright.config.ts. Try curl -sI $BASE_URL (default http://localhost:3000). If unreachable, ask the user to start it.

For non-trivial flows: delegate to the spec-writer subagent

If the flow description is more than one screen of interaction (multi-step form, login + action, cross-page workflow), spawn the e2e:spec-writer agent. It runs in isolated context which keeps the MCP snapshot noise out of the main thread. Pass it the flow description, baseURL, and any constraints.

For simple single-action flows (one click, one assertion), do it inline — spawning an agent is overhead.

Procedure (inline path)

1. Slug the spec

Convert the flow description to a kebab-case slug. Example: "user logs in and sees dashboard" → login-shows-dashboard. Target path: tests/<slug>.spec.ts. If a file already exists at that path, append -2, -3, etc. — never silently overwrite.

2. Drive the browser

Use Playwright MCP:

  1. browser_navigate to baseURL (and the starting route, if the flow names one).
  2. browser_snapshot — read the accessibility tree. Identify the elements you'll interact with by their roles and accessible names.
  3. For each step in the user flow: pick the MCP tool that matches (browser_click, browser_type, browser_select, browser_press_key, etc.) and execute.
  4. After each step, take another browser_snapshot to confirm the DOM changed as expected and to capture the post-state for assertions.
  5. Note any console errors during the flow — they belong as assertions in the spec.

Read the full file on GitHub · 74 lines

Changes

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.

  1. yesterday First seen · 74 lines · 22 tokens per session scan A 696416f4cf8c

Subscribe to this mod's changes

write is a command published in the GitHub repository alphabravo-oss/guild (2 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,072 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.