/mattpocock-skills:e2e-tracerfrom mattpocock-skills
Automate the Demo Path of a tracer-bullet ticket into a single lean, deterministic Playwright E2E test verifying vertical integration across UI, auth, API, and database. Use when completing ticket implementation, automating demo paths, writing Playwright browser tests, testing vertical integration, verifying full-stack wiring, or debugging UI hydration and serialization boundaries.
Ships in mattpocock-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Automate a ticket's Demo Path into exactly one lean, deterministic Playwright tracer-bullet test.
The tdd skill tests business logic and combinatorial edge cases inside deep modules against fast in-memory doubles (20ms to 100ms). But in modern full-stack applications, unit tests cannot detect fractures across the vertical wiring layer: browser, auth cookies, server actions or tRPC routers, serialization boundaries, and real database persistence.
e2e-tracer bridges this gap with the "90% Seam TDD + 10% Tracer-Bullet E2E" model. It converts the text Demo Path of a ticket into an automated regression guard without slowing down the development loop.
A ticket with 100% green unit tests can still fail completely in the browser due to four categories of wiring defects:
Date, Decimal, BigInt, Map, Set) work in memory, but throw runtime errors when crossing Server/Client Component boundaries or JSON/SuperJSON network payloads.middleware.ts, CORS headers, session cookies, or redirect loops.To keep browser tests fast, stable, and token-efficient, every tracer test must adhere to four strict rules:
Never test combinatorial business logic or edge cases in E2E.
tdd unit tests.e2e-tracer automates only the exact user steps declared in the ticket's Demo path: one happy path and at most one critical visible error state.Never use CSS structural selectors or brittle DOM paths (for example, page.locator('div.flex > button:nth-child(2)')), and avoid excessive reliance on data-testid.
page.getByRole(), page.getByLabel(), page.getByPlaceholder(), and page.getByText().getByRole('button', { name: 'Submit' }) fails to locate an element, the interface violates accessibility (WCAG) standards. Furthermore, during failures, the agent inspects concise text accessibility snapshots (ariaSnapshot) instead of wading through thousands of lines of raw HTML.Never use the browser interface to prepare test preconditions.
storageState to load pre-authenticated browser sessions.test.beforeEach using isolated, unique identifiers (e.g. UUID prefixes).Never introduce arbitrary pauses with page.waitForTimeout().
await expect(page.getByText('Success')).toBeVisible()).page.on("pageerror", (err) => {
throw new Error(`Uncaught page exception: ${err.message}`);
});
page.on("console", (msg) => {
if (msg.type() === "error") {
const text = msg.text();
if (text.includes("Hydration failed") || text.includes("Minified React error")) {
throw new Error(`Client runtime hydration error: ${text}`);
}
}
});
When verifying collaborative or real-time workflows (such as auction bidding, real-time chat, or permission changes), use isolated browser contexts rather than separate test files.
import { test, expect } from "@playwright/test";
import { seedOpenLot, getAuthStorageState } from "./helpers/seed";
test("Proxy bidding automatically outbids competing buyer across browser contexts", async ({
browser,
}) => {
// 1. Seed test data directly via backend helper
const lot = await seedOpenLot({
startingPrice: 50_000_000,
bidIncrement: 5_000_000,
});
// 2. Open isolated contexts with pre-seeded auth states
const buyerAContext = await browser.newContext({
storageState: await getAuthStorageState("buyer-a"),
});
const buyerBContext = await browser.newContext({
storageState: await getAuthStorageState("buyer-b"),
});
const pageA = await buyerAContext.newPage();
const pageB = await buyerBContext.newPage();
// Attach error listeners
for (const page of [pageA, pageB]) {
page.on("pageerror", (err) => {
throw new Error(`Page error detected: ${err.message}`);
});
}
await Promise.all([
pageA.goto(`/lots/${lot.id}`),
pageB.goto(`/lots/${lot.id}`),
]);
// 3. User A configures proxy ceiling
await pageA.getByRole("switch", { name: "Enable proxy ceiling" }).click();
await pageA.getByLabel("Maximum ceiling").fill("100000000");
await pageA.getByRole("button", { name: "Confirm proxy" }).click();
await expect(pageA.getByText("Current price: 55,000,000")).toBeVisible();
await expect(pageA.getByText("Your ceiling: 100,000,000")).toBeVisible();
await expect(pageB.getByText("100,000,000")).toBeHidden();
// 4. User B places a standard bid
await pageB.getByLabel("Bid amount").fill("70000000");
await pageB.getByRole("button", { name: "Place bid" }).click();
// 5. Verify real-time UI synchronization across both contexts
await expect(pageB.getByText("You were automatically outbid")).toBeVisible();
await expect(pageA.getByText("Current price: 75,000,000")).toBeVisible();
await expect(pageA.getByText("Winning")).toBeVisible();
await buyerAContext.close();
await buyerBContext.close();
});
When a tracer-bullet test fails, do not guess or modify business logic blindly. Follow this diagnostic sequence:
await page.accessibility.snapshot() or check the aria tree. If an expected role or label is missing, fix the UI accessibility attributes.tdd and reproduce the edge case with an in-memory unit test first.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub op3616windows/superskills --plugin mattpocock-skills50 skills in this plugin
/ask-mattAsk which skill or flow fits your situation. A router over the skills in this repo./brownfield-onboardSurvey an existing brownfield codebase, detect conflicting domain terminology, and bootstrap GLOSSARY.md and foundational ADRs./chief-of-staffPursue a long-running goal in a single session by co-ordinating subagents./claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately.