playwright
Skill1 starsChanged 2 months agoMITView on GitHub
Playwright E2E test patterns for Astro — project setup, serving the static build, and ready-to-use specs for navigation, SEO meta, a11y (axe-core), i18n locales, contact forms, and theme toggling. Use when writing new E2E specs, debugging failing tests, setting up playwright.config.ts, or running `pnpm test:e2e`. Critical: tests run against the static dist/ build — always build first, and don't try to test SSR-only endpoints from E2E.
- Reads credentials
55 other projects use a version of this.
Adopted by
Most recently taken up by
- hmjBill/skillstheir own version, first seen Oct 5, 2026
- fmind/dottheir own version, first seen Oct 5, 2026
- hencter/hencte.toptheir own version, first seen Oct 4, 2026
- HanksChen0110/skillstheir own version, first seen Oct 3, 2026
- hahuyhungdev/ai-coding-configtheir own version, first seen Oct 2, 2026
- Enjoyoer/loadouttheir own version, first seen Sep 30, 2026
Used with
Projects with it also use doc, edit-article and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JetBrainsSkilldoc
Use when the task involves reading, creating, or editing `.docx` documents, especially when formatting or layout fidelity matters; prefer `python-docx` plus the bundled `scripts/render_docx.py` for visual checks.
Also in 5 projects that use this
kayamanSkilledit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Also in 4 projects that use this
kennethkeimSkillubiquitous-language
Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".
Also in 4 projects that use this
qhkmSkillobsidian-vault
Manage Obsidian vaults using built-in filesystem tools. Understands vault structure, frontmatter, wikilinks, tags, tasks, daily notes, and templates.
Also in 4 projects that use this
kayamanSkillrequest-refactor-plan
Guides creating a detailed refactor plan with tiny commits via user interview, then files it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.
Also in 3 projects that use this
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 3 projects that use this
Other versions55 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 55
- openai/openai-agents-python★ 30ksame name
- openai/skills★ 28ksame name
- freestylefly/wesight★ 941same name
- JetBrains/skills★ 360same name
- Mindrally/skills★ 266same name
- alexeykrol/claude-code-starter★ 194same name
- kandada/aacode★ 134same name
- magnus919/agent-skills★ 109same name
- matyasstoch/david-skills★ 59same name
- letitbk/claude-academic-setup★ 46same name
45 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository81 other files it gives its agents.
- accessibility-action-planSkill
- accessibility-auditSkill
- accessibility-finding-explainerSkill
- accessibility-report-summarySkill
- agent-config-authoringSkill
- agents-sdkSkill
- ai-ux-patternsSkill
- alt-text-generatorSkill
- anti-ai-copySkill
- aria-usage-reviewSkill
- astro-architectureSkill
- astro-client-scriptsSkill
- astro-component-a11y-reviewSkill
- before-after-accessibility-commsSkill
- bfsg-risk-language-softenerSkill
- biomeSkill
- blog-from-transcriptSkill
- brand-voice-dnaSkill
- case-study-from-auditSkill
- client-email-after-auditSkill
- cloudflare-email-serviceSkill
- cloudflare-one-migrationsSkill
- cloudflare-oneSkill
- cloudflareSkill
- complexity-judgmentSkill
- component-doc-writerSkill
- content-clarity-a11y-checkSkill
- content-qaSkill
- conversation-retrospectiveSkill
- darkmodeSkill
- deep-researchSkill
- design-directionsSkill
- design-systemsSkill
- durable-objectsSkill
- faq-from-issuesSkill
- form-accessibility-reviewSkill
- frontend-designSkill
- handoffSkill
- i18nSkill
- image-to-webpSkill
- keyboard-navigation-reviewSkill
- knowledge-baseSkill
- landing-and-site-builderSkill
- landingpage-from-briefingSkill
- lighthouse-axe-result-explainerSkill
- linkedin-post-from-contentSkill
- llm-councilSkill
- local-business-seoSkill
- mcp-builderSkill
- mdx-contentSkill
- motion-designSkill
- native-html-uiSkill
- newsletter-from-auditSkill
- overlay-tool-risk-explainerSkill
- post-auditSkill
- remotionSkill
- sandbox-migrate-to-nextSkill
- sandbox-nextSkill
- sandbox-sdkSkill
- sandbox-stableSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 50 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Keep tests under e2e/, grouped per app or feature:
- Distinctive: line 25
Run each app as its own Playwright project against the static build:
- Very specific: line 166
Use descriptive test.describe groups.
- Distinctive: line 167
Test both locales when the feature is i18n-aware.
“Common” is measured: kept by at least 6 in 10 of the 50 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright
Project layout
Keep tests under e2e/, grouped per app or feature:
e2e/
<app>/
a11y.spec.ts
navigation.spec.ts
seo.spec.ts
i18n.spec.ts
theme.spec.ts
forms.spec.tsConfiguration
Run each app as its own Playwright project against the static build:
// playwright.config.ts
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
projects: [
{
name: 'site',
use: { ...devices['Desktop Chrome'], baseURL: 'http://localhost:5173' },
testMatch: 'site/**/*.spec.ts',
},
],
webServer: [
{ command: 'npx serve dist/client -l 5173', port: 5173, reuseExistingServer: false },
],
});Tests require a build first. Web servers serve the static dist/client/ output — server-side features (form actions, sessions) are not exercisable from E2E against the static build.
Commands
pnpm test:e2e # everything
pnpm test:e2e --project=site # single project
playwright test -g "SEO" # filter by name
playwright test --ui # interactive runnerTest patterns
Navigation
import { expect, test } from '@playwright/test';
test.describe('Navigation', () => {
test('homepage renders', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/.+/);
await expect(page.locator('h1')).toBeVisible();
});
test('contact link works', async ({ page }) => {
await page.goto('/');
await page.click('a[href="/contact"]');
await expect(page).toHaveURL('/contact');
});
});SEO
test('homepage has OG meta tags', async ({ page }) => {
await page.goto('/');
await expect(page.locator('meta[property="og:title"]')).toHaveAttribute('content', /./);
await expect(page.locator('meta[property="og:image"]')).toHaveAttribute('content', /\.png$/);
});
test('robots.txt contains Sitemap', async ({ page }) => {
const res = await page.goto('/robots.txt');
expect(res?.status()).toBe(200);
expect(await res?.text()).toContain('Sitemap:');
});
test('sitemap is valid XML', async ({ page }) => {
const res = await page.goto('/sitemap.xml');
expect(res?.status()).toBe(200);
expect(await res?.text()).toContain('<urlset');
});
test('JSON-LD present', async ({ page }) => {
await page.goto('/');
const jsonLd = page.locator('script[type="application/ld+json"]').first();
await expect(jsonLd).toBeAttached();
const parsed = JSON.parse((await jsonLd.textContent())!);
expect(parsed['@context']).toBe('https://schema.org');
});Accessibility (axe-core)
import AxeBuilder from '@axe-core/playwright';
test('homepage has no a11y violations', async ({ page }) => {
await page.goto('/');
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag22aa'])
.analyze();
expect(results.violations).toEqual([]);
});i18n
test('german homepage has lang="de"', async ({ page }) => {
await page.goto('/de');
await expect(page.locator('html')).toHaveAttribute('lang', 'de');
});
test('language switcher navigates', async ({ page }) => {
await page.goto('/');
await page.click('a:has-text("DE")');
await expect(page).toHaveURL('/de');
});Forms
test('contact form renders all fields', async ({ page }) => {
await page.goto('/contact');
await expect(page.locator('input[name="name"]')).toBeVisible();
await expect(page.locator('input[name="email"]')).toBeVisible();
await expect(page.locator('textarea[name="message"]')).toBeVisible();
await expect(page.locator('button[type="submit"]')).toBeVisible();
});Theme toggle
test('theme toggle flips dark class', async ({ page }) => {
await page.goto('/');
const html = page.locator('html');
const toggle = page.locator('button[aria-label*="dark" i], button[aria-label*="light" i]');
await toggle.click();
await expect(html).toHaveClass(/dark/);
});Writing new tests
- Use descriptive
test.describegroups. - Test both locales when the feature is i18n-aware.
- For SEO tests, verify OG tags, canonical URLs, meta descriptions.
- For a11y tests, use
AxeBuilderand expect zero violations. - Build before running — E2E serves
dist/client/, not the dev server.
Common mistakes
- Forgetting to build first — tests run against the static output.
page.waitForNavigation()— preferawait expect(page).toHaveURL(...).- Hardcoding ports — use relative URLs;
baseURLis set per project. - Testing server-only logic — E2E cannot exercise SSR-only endpoints when running against a static build.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

