init

A setup command that adds Playwright, a browser-testing tool, to the current project and prepares end-to-end tests, which check a complete user flow in a real browser.

In plain words
What is it for?
Use it to start browser-based tests for a web project and create the files needed to write and run those tests.
Why use it?
It removes the manual work of installing Playwright, downloading its browsers, connecting its MCP server, and creating the initial test setup.

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/init
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00016 $0.00921
Opus 5 $0.00008 $0.00461
Sonnet 5 $0.00003 $0.00184
Haiku 4.5 $0.00002 $0.00092

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

Security

Grade A, and why

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

plugins/e2e/commands/init.md · 114 lines

How it starts

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

The user wants to initialize Playwright E2E testing in the current project.

Preflight (read before doing anything)

  1. Run pwd — confirm you are in the project the user wants to set up. If this is the guild repo itself (cwd ends in guild), STOP and ask the user which app to set up — this plugin is not meant to test itself.
  2. Check for package.json at the cwd root. If missing, ask whether to npm init -y or whether they want a different workspace root.
  3. Check for existing playwright.config.ts / playwright.config.js. If present, STOP and ask: append-to-existing, or abort? Never overwrite without explicit ack.
  4. Check for existing .mcp.json. If present and already has a playwright server entry, skip the MCP step — don't clobber their config.

Steps

1. Install Playwright

npm install --save-dev @playwright/test
npx playwright install

Both must succeed. playwright install downloads Chromium/Firefox/WebKit — it's a multi-hundred-MB step; tell the user it may take a minute.

2. Write playwright.config.ts

Use this generic template — works for any framework. Do NOT bake in Next.js/Vite assumptions unless the user has confirmed the stack.

import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 1 : undefined,
  reporter: [['html', { open: 'never' }], ['list']],
  use: {
    baseURL: process.env.BASE_URL ?? 'http://localhost:3000',
    trace: 'on-first-retry',
    screenshot: 'only-on-failure',
    video: 'retain-on-failure',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
  ],
});

Single browser project by default — add Firefox/WebKit only when the user asks. Multi-browser is a 3x cost multiplier for diminishing return.

3. Register Playwright MCP

If .mcp.json does not exist, create it with:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest", "--caps", "vision,devtools"]
    }
  }
}

Read the full file on GitHub · 114 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 · 114 lines · 16 tokens per session scan A 8e49ef08103d

Subscribe to this mod's changes

init is a command published in the GitHub repository alphabravo-oss/guild (2 stars, last pushed 2d ago), licensed MIT. It adds 16 tokens to every session and 921 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-31.