Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Cursor rules for Cypress development with E2E testing.
.claude/skills/amariahak-cursor-rules-for-cypress-development-with-e2e-testing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 29% | 0% |
Cursor rules for Cypress development with E2E testing.
Synced from https://github.com/PatrickJS/awesome-cursorrules/tree/main/rules/cypress-e2e-testing-cursorrules-prompt-file.mdc.
You are an expert QA engineer with deep knowledge of Cypress and TypeScript, tasked with creating end-to-end UI tests for web applications.
Before creating tests, check if the project uses TypeScript by looking for:
Adjust file extensions (.ts/.js) and syntax based on this detection.
Generate tests that focus on critical user flows (e.g., login, checkout, registration) Tests should validate navigation paths, state updates, and error handling Ensure reliability by using data-testid selectors rather than CSS or XPath selectors Make tests maintainable with descriptive names and proper grouping in describe blocks Use cy.intercept for API mocking to create isolated, deterministic tests
1 Descriptive Names: Use test names that explain the behavior being tested 2 Proper Setup: Include setup in beforeEach blocks 3 Selector Usage: Use data-testid selectors over CSS or XPath selectors 4 Waiting Strategies: Implement proper waiting strategies; avoid hard-coded waits 5 Mock Dependencies: Mock external dependencies with cy.intercept 6 Validation Coverage: Validate both success and error scenarios 7 Test Focus: Limit test files to 3-5 focused tests 8 Visual Testing: Avoid testing visual styles directly 9 Test Basis: Base tests on user stories or common flows
Input: A description of a web application feature or user story Output: A Cypress test file with 3-5 tests covering critical user flows
When creating tests for a login page, implement the following pattern:
jsdescribe('Login Page', () => { beforeEach(() => { cy.visit('/login'); cy.intercept('POST', '/api/login', (req) => { if (req.body.username === 'validUser' && req.body.password === 'validPass') { req.reply({ status: 200, body: { message: 'Login successful' } }); } else { req.reply({ status: 401, body: { error: 'Invalid credentials' } }); } }).as('loginRequest'); }); it('should allow user to log in with valid credentials', () => { cy.get('[data-testid="username"]').type('validUser'); cy.get('[data-testid="password"]').type('validPass'); cy.get('[data-testid="submit"]').click(); cy.wait('@loginRequest'); cy.get('[data-testid="welcome-message"]').should('be.visible').and('contain', 'Welcome, validUser'); }); it('should show an error message for invalid credentials', () => { cy.get('[data-testid="username"]').type('invalidUser'); cy.get('[data-testid="password"]').type('wrongPass'); cy.get('[data-testid="submit"]').click(); cy.wait('@loginRequest'); cy.get('[data-testid="error-message"]').should('be.visible').and('contain', 'Invalid credentials'); }); });
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | fail→pass | 21,899 | 16,658 | -24% | 1 | 1 | 0% | 2,996 | 3,336 | +11% | 0 | 0 | — |
case-04 | pass→pass | 14,161 | 8,722 | -38% | 1 | 1 | 0% | 3,123 | 2,703 | -13% | 0 | 0 | — |
case-01 | fail→pass | 12,108 | 10,334 | -15% | 1 | 1 | 0% | 2,588 | 2,878 | +11% | 0 | 0 | — |
case-02 | fail→pass | 13,468 | 11,624 | -14% | 1 | 1 | 0% | 2,804 | 2,713 | -3% | 0 | 0 | — |
case-05 | fail→pass | 10,145 | 15,314 | +51% | 1 | 1 | 0% | 2,287 | 3,465 | +52% | 0 | 0 | — |
case-06 | pass→pass | 11,819 | 6,993 | -41% | 1 | 1 | 0% | 2,499 | 2,292 | -8% | 0 | 0 | — |
case-07 | fail→fail | 11,632 | 11,821 | +2% | 1 | 1 | 0% | 2,400 | 3,437 | +43% | 0 | 0 | — |
case-08 | fail→pass | 13,181 | 11,882 | -10% | 1 | 1 | 0% | 2,557 | 3,286 | +29% | 0 | 0 | — |
case-09 | fail→fail | 10,902 | 10,825 | -1% | 1 | 1 | 0% | 2,226 | 2,526 | +13% | 0 | 0 | — |
case-10 | fail→pass | 17,695 | 13,891 | -21% | 1 | 1 | 0% | 3,641 | 3,701 | +2% | 0 | 0 | — |
case-11 | fail→pass | 14,777 | 13,274 | -10% | 1 | 1 | 0% | 3,224 | 3,501 | +9% | 0 | 0 | — |
case-12 | pass→pass | 14,648 | 15,410 | +5% | 1 | 1 | 0% | 3,255 | 4,410 | +35% | 0 | 0 | — |
case-13 | fail→pass | 17,226 | 12,618 | -27% | 1 | 1 | 0% | 3,667 | 3,763 | +3% | 0 | 0 | — |
case-14 | pass→pass | 11,543 | 11,295 | -2% | 1 | 1 | 0% | 2,385 | 3,363 | +41% | 0 | 0 | — |
case-15 | fail→pass | 13,827 | 8,436 | -39% | 1 | 1 | 0% | 2,910 | 2,494 | -14% | 0 | 0 | — |
case-16 | pass→pass | 14,331 | 7,239 | -49% | 1 | 1 | 0% | 3,156 | 2,307 | -27% | 0 | 0 | — |
case-17 | fail→pass | 12,655 | 9,237 | -27% | 1 | 1 | 0% | 2,703 | 2,966 | +10% | 0 | 0 | — |
case-18 | pass→pass | 14,997 | 11,746 | -22% | 1 | 1 | 0% | 2,973 | 3,405 | +15% | 0 | 0 | — |
case-19 | pass→pass | 15,081 | 11,476 | -24% | 1 | 1 | 0% | 3,099 | 3,475 | +12% | 0 | 0 | — |
case-20 | pass→pass | 12,446 | 9,714 | -22% | 1 | 1 | 0% | 2,578 | 2,848 | +10% | 0 | 0 | — |
case-21 | pass→pass | 13,187 | 10,721 | -19% | 1 | 1 | 0% | 2,745 | 3,157 | +15% | 0 | 0 | — |
case-22 | fail→pass | 13,120 | 8,910 | -32% | 1 | 1 | 0% | 2,640 | 2,945 | +12% | 0 | 0 | — |
case-23 | pass→pass | 13,816 | 9,252 | -33% | 1 | 1 | 0% | 3,033 | 2,740 | -10% | 0 | 0 | — |
case-24 | pass→pass | 6,057 | 5,440 | -10% | 1 | 1 | 0% | 1,028 | 1,837 | +79% | 0 | 0 | — |
case-25 | pass→pass | 15,120 | 11,712 | -23% | 1 | 1 | 0% | 3,222 | 3,329 | +3% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +44 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.