E2e
Write end-to-end tests for user flows using Cypress. Use when user asks to "write e2e tests", "/e2e", "add Cypress tests", or wants to test a user flow end-to-end. Don't use for unit tests, component tests, or projects using Playwright, Puppeteer, or other non-Cypress frameworks.From its SKILL.md
npx -y skills add helderberto/agent-skills --skill e2eAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.3 KB, 531 tokens by cl100k_base, as published. Nobody here has run it
End-to-End Tests (Cypress)
Detection
Run in parallel:
- Check
package.jsonforcypressversion - Read
cypress.config.tsfor baseUrl and test file patterns - Read 1-2 existing test files in
cypress/e2e/to match conventions
Workflow
- Read existing tests and config to match project style
- Understand the user flow — ask if unclear
- Identify selectors (see selectors.md)
- Write tests in
cypress/e2e/— one file per flow or feature
Format
describe('login flow', () => {
beforeEach(() => {
cy.visit('/login')
})
it('logs in with valid credentials', () => {
cy.findByLabelText('Email').type('[email protected]')
cy.findByLabelText('Password').type('password')
cy.findByRole('button', { name: 'Sign in' }).click()
cy.url().should('include', '/dashboard')
cy.findByRole('heading', { name: 'Dashboard' }).should('be.visible')
})
it('shows error with invalid credentials', () => {
cy.findByLabelText('Email').type('[email protected]')
cy.findByLabelText('Password').type('wrong')
cy.findByRole('button', { name: 'Sign in' }).click()
cy.findByRole('alert').should('contain.text', 'Invalid credentials')
})
})
Selector priority
Prefer @testing-library/cypress commands when installed, e.g. cy.findByRole('button', { name: 'Submit' }); use cy.get('[data-testid="submit"]') only as a last resort.
See selectors.md for the full priority guide.
Rules
- Use
@testing-library/cypressselectors when available, elsecy.get - Use
data-testidonly as last resort - One logical outcome per
itblock - Test behavior, not implementation details
- Never use
cy.wait(<number>)— usecy.findBy*auto-retry instead
Error Handling
- If
cypressis not inpackage.json→ stop and ask user to install Cypress first - If
cypress.config.tsis missing → ask user to runnpx cypress opento initialize config - If
baseUrlis unreachable → verify the dev server is running before writing tests that require it
What ships with it: 1 file
1.2 KB alongside SKILL.md
references/
- selectors.md1.2 KB
Gives 0 of the 12 instructions most e2e browser skills give in 531 tokens
Counted across 499 of the 513 authors here whose files we hold, read 2026-09-06
- Capture screenshots, videos, and traces on failurein 32 of 499, across 23 files
- Close the browser when donein 22 of 499
- Interact with elements using snapshot refsin 21 of 499, across 20 files
- Wait for specific network responses instead of fixed timeoutsin 20 of 499, across 10 files
- Keep tests independent with no shared statein 19 of 499, across 17 files
- Use Page Object Model classes to encapsulate page interactionsin 19 of 499, across 9 files
- Locate elements with data-testid attributesin 19 of 499, across 10 files
- Quarantine flaky tests with fixme or skipin 17 of 499, across 7 files
- Upload test artifacts after every CI runin 17 of 499, across 8 files
- Wait on conditions instead of using fixed sleepsin 17 of 499, across 13 files
- Clean up test data after each testin 17 of 499, across 16 files
- Test user-visible behavior, not implementation detailsin 16 of 499, across 10 files
Said here and by no other author read
- Check package.json for cypress version
- Read cypress config for baseUrl and test patterns
- Read existing tests to match project style
- Write one test file per flow or feature
- Prefer testing-library selectors when installed
- Write one logical outcome per it block
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.