crawl

A command that finds discoverable routes in a web app and creates one Playwright smoke test for each route. A smoke test is a basic check that a page can be opened successfully.

In plain words
What is it for?
Use it to inspect router files, list static and dynamic routes, verify the app is reachable, and generate smoke-test specifications.
Why use it?
It turns route coverage into a repeatable set of browser checks instead of leaving pages untested.

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/crawl
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 804 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.00013 $0.00804
Opus 5 $0.00006 $0.00402
Sonnet 5 $0.00003 $0.00161
Haiku 4.5 $0.00001 $0.00080

Measured 2d ago against content hash aac15959e3f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

crawl 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 2d ago.

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.

2. Dev server must be reachable. `curl -sI $BASE_URL`.
plugins/e2e/commands/crawl.md · 82 lines

How it starts

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

The user wants a smoke test per discoverable route. Base URL is in $ARGUMENTS (defaults to playwright.config.ts baseURL).

Preflight

  1. playwright.config.ts must exist. If not, route them to /e2e:init.
  2. Dev server must be reachable. curl -sI $BASE_URL.
  3. Playwright MCP must be loaded (for the crawl phase).

Route discovery — two passes, both run

Pass 1: Static — read the router config

Detect the framework by what's in the repo:

Framework Where routes live
Next.js (app router) app/**/page.{ts,tsx,js,jsx} — route = path from app/ minus /page.*, with [param]:param
Next.js (pages router) pages/**/*.{ts,tsx,js,jsx} excluding _app, _document, api/
React Router grep for <Route path= and createBrowserRouter
Vue Router router/index.{ts,js} — read the routes array
SvelteKit src/routes/**/+page.{svelte,ts}
Remix app/routes/**/*.{ts,tsx,jsx}
Astro src/pages/**/*.{astro,md,mdx}

Use Grep/Glob. List every static route. For dynamic routes with params, generate a smoke spec only if the user can give you a sample value — otherwise note them as "dynamic — needs sample data" and skip generation.

Pass 2: Dynamic — BFS crawl from baseURL via MCP

browser_navigate to baseURL, browser_snapshot, extract all anchor hrefs pointing to same-origin paths, enqueue. Visit each, repeat. Depth limit 3, total page limit 50 — bail with a count if hit.

Union the two passes. Static catches routes hidden behind auth or feature flags; dynamic catches routes that exist but aren't in the obvious router config (e.g., generated, lazy-loaded). Deduplicate.

Generate specs

For each route, emit tests/smoke/<slug>.spec.ts where slug is the route with /- (root → index):

import { test, expect } from '@playwright/test';

test.describe('smoke: <route>', () => {
  test('renders without errors', async ({ page }) => {
    const consoleErrors: string[] = [];
    page.on('console', msg => {
      if (msg.type() === 'error') consoleErrors.push(msg.text());
    });

    const response = await page.goto('<route>');
    expect(response?.status()).toBeLessThan(400);

    await expect(page.locator('main, [role="main"]').first()).toBeVisible();
    expect(consoleErrors).toEqual([]);
  });
});

Read the full file on GitHub · 82 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. 2d ago First seen · 82 lines · 13 tokens per session scan A aac15959e3f2

Subscribe to this mod's changes

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