react-vite2: Command for Claude Code

.claude/commands/create_e2e_tests.md

create_e2e_tests is a command for Claude Code from erezcohen/react-vite2. It costs 0 tokens per session (1,181 once invoked), scanned A, original, MIT.

A command for creating Playwright end-to-end tests for pages, components, or user flows. End-to-end tests imitate a user moving through the running application.

In plain words
What is it for?
Use it to test flows such as login, navigation, registration, checkout, or settings updates in a browser.
Why use it?
It supplies a test structure and recommends user-facing selectors, reducing brittle tests that break when internal markup changes.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is erezcohen/react-vite2's own configuration. It tells Claude Code how to work on react-vite2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything react-vite2 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to erezcohen/react-vite2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/erezcohen/react-vite2/master/.claude/commands/create_e2e_tests.md
Clone the repo
git clone --depth 1 https://github.com/erezcohen/react-vite2

Made for: Claude Code.

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 create_e2e_tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/erezcohen/react-vite2/create_e2e_tests/github.svg)](https://agentmods.dev/commands/erezcohen/react-vite2/create_e2e_tests)
Your own site
<a href="https://agentmods.dev/commands/erezcohen/react-vite2/create_e2e_tests"><img src="https://agentmods.dev/badge/commands/erezcohen/react-vite2/create_e2e_tests/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.

agentmods 80×15 button for create_e2e_tests

Your own site · 80×15
<a href="https://agentmods.dev/commands/erezcohen/react-vite2/create_e2e_tests"><img src="https://agentmods.dev/badge/commands/erezcohen/react-vite2/create_e2e_tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,181 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 original No closer match found 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.00000 $0.01181
Opus 5.5 $0.00000 $0.00472
Sonnet 5.5 $0.00000 $0.00236
Haiku 4.5 $0.00000 $0.00118

Measured 25d ago against content hash dd663303d074, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create_e2e_tests 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 25d 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.

.claude/commands/create_e2e_tests.md · 145 lines

How it starts

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

Writing Playwright E2E Tests

You are an expert QA developer with extensive experience in end-to-end testing using Playwright. Your expertise includes writing robust, maintainable tests that follow industry best practices and can withstand application changes.

Command Usage

This command helps you create comprehensive Playwright E2E tests. You can optionally specify:

  • --page or -p: The specific page/feature to test (e.g., "login", "dashboard", "checkout")
  • --component or -c: Specific component to focus on (e.g., "navigation", "form", "modal")
  • --user-flow or -f: User flow to test (e.g., "user registration", "purchase flow", "settings update")

Examples:

  • create_e2e_tests --page login
  • create_e2e_tests --component navigation --page dashboard
  • create_e2e_tests --user-flow "complete purchase"

Best Practices

Follow these best practices when creating Playwright tests:

  1. Test Structure: Place test files in the tests/ directory with .spec.ts extension
  2. Use Resilient Locators: Prefer user-facing attributes over CSS selectors
    • Use page.getByRole(), page.getByText(), page.getByTestId()
    • Avoid brittle selectors like CSS classes or XPath
  3. Test Isolation: Each test should be independent with its own setup/teardown
    • Use test.beforeEach() for common setup like navigation or login
    • Avoid dependencies between tests
  4. Web-First Assertions: Use Playwright's auto-waiting assertions
    • await expect(locator).toBeVisible() instead of manual waits
    • Leverage built-in retry mechanisms
  5. Mock External Dependencies: Use page.route() to mock API calls and third-party services
  6. Page Object Model: For complex applications, consider using page objects to organize locators and actions
  7. Debug Tools: Use the provided debug commands for troubleshooting:
    • npm run test:e2e:debug for step-by-step debugging
    • npm run test:e2e:ui for interactive test runner
    • npm run test:e2e:report to view detailed test reports

Read the full file on GitHub · 145 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. 25d ago First seen · 145 lines · 0 tokens per session scan A dd663303d074

Subscribe to this mod's changes

create_e2e_tests is a command published in the GitHub repository erezcohen/react-vite2 (0 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,181 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-10-02.