record

A command that opens Playwright’s browser recorder so a person can click through a website and save the actions as a TypeScript end-to-end test.

In plain words
What is it for?
Use it to record a browser flow into a new .spec.ts test file, using the project’s configured web address.
Why use it?
It captures interactions that are difficult to describe to an agent, such as dragging, uploading files, or entering sensitive credentials.

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/record
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 735 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.00018 $0.00735
Opus 5 $0.00009 $0.00367
Sonnet 5 $0.00004 $0.00147
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

record 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/record.md · 65 lines

How it starts

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

The user wants to record a flow manually with Playwright's recorder. Slug is in $ARGUMENTS.

When to use this vs /e2e:write:

  • /e2e:write — Claude drives the browser via MCP. Good for flows Claude can perform autonomously (clear instructions, deterministic).
  • /e2e:record — Human drives. Good for flows that are hard to describe in words (drag gestures, file uploads, anything with sensitive credentials Claude shouldn't see).

Preflight

  1. playwright.config.ts exists.
  2. Dev server is reachable at baseURL.
  3. The cwd has access to a display — playwright codegen opens a real browser window. If on a headless server, this command does not apply; tell the user and exit.

Procedure

1. Slug + path

Convert $ARGUMENTS to kebab-case. Target: tests/<slug>.spec.ts. Refuse to overwrite an existing file — bump to <slug>-2.spec.ts.

2. Launch codegen

npx playwright codegen --output tests/<slug>.spec.ts $BASE_URL

Where $BASE_URL comes from playwright.config.ts (read it, don't hardcode). The recorder opens a browser window AND an inspector — the user clicks around, the inspector writes code in real time.

Tell the user:

  • "A browser window has opened. Perform the flow you want to capture."
  • "Close the browser window when done. Codegen will save the spec automatically."

3. Wait for codegen to exit

This is a foreground command — it blocks until the user closes the recorded browser. Don't run it in the background; you need the exit signal.

4. Post-process

When codegen exits, read the generated file. It will be functional but rough — codegen produces CSS selectors and literal sleeps, not the hygiene rules in the author skill.

Apply these minimum cleanups (read the author skill for the full list):

  • Wrap actions in test.describe('<flow>', () => { test('<step>', async ({ page }) => { ... }) }) — codegen emits a flat script
  • Replace CSS selectors with getByRole/getByLabel where the accessible name is unambiguous
  • Remove any page.waitForTimeout — replace with expect(...).toBeVisible() waits against the next stable element
  • Add at least one expect() assertion at the end — codegen captures actions, not assertions

Read the full file on GitHub · 65 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 · 65 lines · 18 tokens per session scan A 65d8ba249f75

Subscribe to this mod's changes

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