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.
npx agentmods add skills/payloadcms/payload/e2e-write-visual-testnpx skills add payloadcms/payload --skill e2e-write-visual-testgit clone --depth 1 https://github.com/payloadcms/payloadWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00050 | $0.02119 |
| Opus 5 | $0.00025 | $0.01059 |
| Sonnet 5 | $0.00010 | $0.00424 |
| Haiku 4.5 | $0.00005 | $0.00212 |
Grade A, and why
e2e-write-visual-test 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 112 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing and Running Visual Regression Tests
Overview
Visual regression tests are normal Playwright e2e tests tagged @visual that compare a screenshot against a committed baseline PNG instead of (or in addition to) asserting on the DOM. They live alongside normal e2e tests — there is no separate test type or directory to register a test in.
Key pieces:
test/__helpers/e2e/visual.ts— thevisual()helper. Declares a test tagged@visualwithout the tag needing to be typed (and possibly forgotten) at each call site. Prefer this overtest()with a manual tag for any normal visual regression test.test/__helpers/e2e/expectScreenshot.ts— the helper that takes the screenshot and diffs it against the baseline.test/playwright.config.ts—toHaveScreenshot.maxDiffPixelRatio(anti-aliasing tolerance) andsnapshotPathTemplate(where baselines are stored)..github/scripts/visual/find-visual-suites.mjs— discovers every suite that has an@visual-tagged test by scanningtest/**/e2e.spec.tsfor either the string@visualor avisual()helper import. Nothing needs to be registered anywhere else — add avisual()test and it's picked up automatically next time visual tests run..github/scripts/visual/run-visual-suites.sh— loopspnpm test:e2e:prod:server:run:noturbo <suite> --grep @visualover either an explicit suite or every discovered suite. Shared by CI and the local Docker script.
Writing a new visual test
Use the visual() helper instead of test() and call expectScreenshot instead of (or alongside) normal assertions:
import { expectScreenshot } from '../__helpers/e2e/expectScreenshot.js'
import { visual } from '../__helpers/e2e/visual.js'
visual('renders the posts list view', async () => {
await page.goto(url.list)
// Assert the page actually loaded before screenshotting — a screenshot of an error
// page or a spinner will "pass" the pixel diff and hide a real bug.
const textCell = page.locator('.row-1 .cell-title')
await expect(textCell).toBeVisible()
await expectScreenshot({ name: 'posts-list-view.png', page })
})
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.
- 2d ago First seen · 112 lines · 50 tokens per session scan A a76665593d3d
e2e-write-visual-test is a skill published in the GitHub repository payloadcms/payload (44,499 stars, last pushed 4d ago), licensed MIT. It adds 50 tokens to every session and 2,119 once invoked, about $0.0003 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-30.
Other skills, from other repositories
webiny-api-cms-content-models
Creating Headless CMS content models via code using the ModelFactory pattern. Use this skill when the developer wants to create, modify, or understand content model definitions, define fields and validators, set up reference fields between models, configure field layouts (including nested layouts inside object or…
webiny-form-model
Building forms with the FormModel system — field types, renderers, layout, validation, conditional rules, computed fields, and dynamic zones. Use this skill when the developer needs to define form fields with the builder API, choose renderers, build layouts with tabs/rows/separators, add validation (Zod or…
webiny-api-architect
The hub skill for all API/backend architecture in Webiny. Covers architecture overview, Services vs UseCases, feature naming and organization, feature structure templates, DI decision tree, anti-patterns, createFeature, createAbstraction, container registration, domain errors, entity patterns, naming conventions…
webiny-admin-architect
Admin-side architecture patterns for Webiny extensions. Use this skill when building frontend features with headless features (UseCase/Repository/Gateway), presentation features (Presenter/ViewModel/hooks/components), MobX-based presenters, RegisterFeature, and Admin BuildParams. Covers the admin/ directory structure…
webiny-v5-to-v6-migration
Migration patterns for converting v5 Webiny code to v6 architecture. Use this skill when migrating existing v5 plugins to v6 features, converting context plugins to DI services, adapting v5 event subscriptions to v6 EventHandlers, or understanding how v5 patterns translate to v6. Targeted at AI agents performing…
webiny-cognito-federation
Configuring Cognito Federation for Webiny projects — federated sign-in via external identity providers (Google, Facebook, Apple, Amazon, OIDC/Entra ID) while keeping Cognito as the user pool. Use this skill when the developer asks about Cognito federation, SSO with Cognito, adding Google/Microsoft/OIDC login to…