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.
git clone --depth 1 https://github.com/fumito-ito/mdcvalultWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/fumito-ito/mdcvalult/best-practices-for-writing-playwright-e2e-testing)<a href="https://agentmods.dev/rules/fumito-ito/mdcvalult/best-practices-for-writing-playwright-e2e-testing"><img src="https://agentmods.dev/badge/rules/fumito-ito/mdcvalult/best-practices-for-writing-playwright-e2e-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/fumito-ito/mdcvalult/best-practices-for-writing-playwright-e2e-testing"><img src="https://agentmods.dev/badge/rules/fumito-ito/mdcvalult/best-practices-for-writing-playwright-e2e-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01010 |
| Opus 5.5 | $0.00000 | $0.00404 |
| Sonnet 5.5 | $0.00000 | $0.00202 |
| Haiku 4.5 | $0.00000 | $0.00101 |
Grade A, and why
best-practices-for-writing-playwright-e2e-testing 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 3mo 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 — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Playwright Testing Standards
Configuration
Base Setup
requirements:
version: "^1.50.1"
dependencies:
- "@playwright/test"
files:
- playwright.config.ts: Test configuration
- tests/e2e/: Test files
Project Configuration
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: false,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [
['html'],
['list'],
['json', { outputFile: 'test-results/test-results.json' }]
],
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry',
video: 'on-first-retry',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'npm run dev',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
});
Test Structure
Test Organization
directory_structure:
tests/e2e:
- auth/: Authentication tests
- pages/: Page tests
- api/: API tests
- components/: Component tests
- utils/: Test utilities
Test File Pattern
// tests/e2e/auth/login.spec.ts
import { test, expect } from '@playwright/test';
test.describe('Login Flow', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/login');
});
test('successful login', async ({ page }) => {
// Test implementation
});
test('invalid credentials', async ({ page }) => {
// Test implementation
});
});
Testing Standards
Page Object Pattern
// tests/e2e/pages/login.page.ts
export class LoginPage {
constructor(private page: Page) {}
async goto() {
await this.page.goto('/login');
}
async login(email: string, password: string) {
await this.page.fill('[name=email]', email);
await this.page.fill('[name=password]', password);
await this.page.click('button[type=submit]');
}
async getErrorMessage() {
return this.page.textContent('.error-message');
}
}
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.
- 3mo ago First seen · 220 lines · 0 tokens per session scan A 8ff62199a224
best-practices-for-writing-playwright-e2e-testing is a cursor rule published in the GitHub repository fumito-ito/mdcvalult (33 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,010 tokens. 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.
best-practices-for-writing-playwright-e2e-testing compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| best-practices-for-writing-playwright-e2e-testingfumito-ito/mdcvalult | Cursor rule | 33 | 1y ago | MIT | A | 0 | Cursor |
| puppeteersanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 10d ago | CC0-1.0 | A | 1,826 | Cursor |
| web-pages-e2e-test-maintenanceTACC/HPCPerfStats | Cursor rule | 60 | today | LGPL-2.1 | A | 0 | Cursor |
| local-compose-db-lifecycle-for-web-testsTACC/HPCPerfStats | Cursor rule | 60 | today | LGPL-2.1 | A | 9 | Cursor |
| cypress-e2e-testing-cursorrules-prompt-fileXD3an/awesome-ai-coding-all-in-one | Cursor rule | 14 | yesterday | none | A | 709 | Cursor |
| vasu-playwright-utilsvasu31dev/playwright-ts-lib | Cursor rule | 25 | 8mo ago | MIT | A | 14 | Cursor |
| ponytailDietrichGebert/ponytail | Cursor rule | 204k | 12d ago | MIT | A | 604 | Cursor |