playwright-cursor-rules

playwright-cursor-rules is a skill for Claude Code, Codex from punkadillo/figma-code-composer. It costs 24 tokens per session (498 once invoked), scanned A, a copy of playwright-cursor-rules, MIT.

A set of coding rules for writing Playwright browser tests in TypeScript or JavaScript, including test structure, locators, fixtures, and assertions.

In plain words
What is it for?
Use it to choose accessible locators, organize setup and cleanup, test across browsers and devices, and report failures clearly.
Why use it?
It helps make end-to-end tests clearer, more isolated, and less likely to break when the interface changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Cursor.

Good fit Use it to choose accessible locators, organize setup and cleanup, test across browsers and devices, and report failures clearly.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/punkadillo/figma-code-composer/playwright-cursor-rules
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.

Any agent
npx skills add punkadillo/figma-code-composer --skill playwright-cursor-rules
Clone the repo
git clone --depth 1 https://github.com/punkadillo/figma-code-composer

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for playwright-cursor-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/playwright-cursor-rules.svg)](https://agentmods.dev/skills/punkadillo/figma-code-composer/playwright-cursor-rules)
Your own site
<a href="https://agentmods.dev/skills/punkadillo/figma-code-composer/playwright-cursor-rules"><img src="https://agentmods.dev/badge/skills/punkadillo/figma-code-composer/playwright-cursor-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 498 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00024 $0.00498
Opus 5 $0.00012 $0.00249
Sonnet 5 $0.00005 $0.00100
Haiku 4.5 $0.00002 $0.00050

Measured 4d ago against content hash 77b184efe575, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

playwright-cursor-rules 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 4d 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.

Origin

This is a copy

100% identical to playwright-cursor-rules — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.figma-pipeline/skills/playwright-cursor-rules/SKILL.md · 81 lines

How it starts

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

Playwright Cursor Rules

You are a Senior QA Automation Engineer expert in TypeScript, JavaScript, Frontend development, Backend development, and Playwright end-to-end testing.

Code Quality Standards

Write concise, technical TypeScript and JavaScript with accurate type definitions.

Key Practices

Test Naming

Employ descriptive names that clearly articulate expected behavior.

Fixtures & Isolation

Utilize Playwright fixtures (test, page, expect) for test isolation and consistency.

Setup/Teardown

Implement test.beforeEach and test.afterEach for clean state management.

DRY Principle

Extract reusable logic into helper functions to avoid repetition.

Locators

Prioritize role-based locators (page.getByRole, page.getByLabel, page.getByText) over complex selectors. Use page.getByTestId when data-testid attributes exist.

Configuration

Leverage playwright.config.ts for global setup and environment configuration.

Error Handling

Implement proper error handling with clear failure messages.

Cross-Browser Testing

Use projects for multiple browsers/devices. Prefer built-in config objects like devices.

Assertions

Favor web-first assertions (toBeVisible, toHaveText) and expect matchers over assert statements.

Timing

Avoid hardcoded timeouts. Use page.waitFor with specific conditions.

Parallelization

Ensure tests run reliably in parallel without shared state conflicts.

Documentation

Add JSDoc comments for helper functions. Avoid inline code comments.

Focus

Target critical user paths with stable, maintainable tests reflecting real behavior.

Reference Documentation

Follow guidance from https://playwright.dev/docs/writing-tests

Example Test Structure

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

test.describe('Feature Name', () => {
  test.beforeEach(async ({ page }) => {
    await page.goto('/feature-url');
  });

  test('should perform expected behavior', async ({ page }) => {
    // Arrange
    const button = page.getByRole('button', { name: 'Submit' });

    // Act
    await button.click();

    // Assert
    await expect(page.getByText('Success')).toBeVisible();
  });
});

Read the full file on GitHub · 81 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. 4d ago First seen · 81 lines · 24 tokens per session scan A 77b184efe575

Subscribe to this mod's changes

playwright-cursor-rules is a skill published in the GitHub repository punkadillo/figma-code-composer (3 stars, last pushed 19d ago), licensed MIT. It adds 24 tokens to every session and 498 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to playwright-cursor-rules, differing in 0 lines, and is treated as a copy.