cypress
A comprehensive testing tool for web apps that runs in-browser tests for reliable, fast feedback.
Install
mkdir -p .claude/skills/cypress && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11703" && unzip -o skill.zip -d .claude/skills/cypress && rm skill.zipInstalls to .claude/skills/cypress
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Cypress is an end-to-end testing framework for web applications that runs tests directly in the browser for fast, reliable feedback. It provides element selection, network interception, component testing, and CI integration with parallelization and video recording.Key capabilities
- →Select elements using `data-testid` or `data-cy` attributes
- →Simulate user interactions like typing, clicking, and selecting
- →Intercept and stub API calls with `cy.intercept()`
- →Create reusable custom commands for common workflows
- →Mount and test components in isolation using framework-specific libraries
- →Configure CI integration with parallelization and video recording
How it works
Cypress runs tests directly in the browser, allowing for element selection, network interception, and component testing. It uses specific commands for user actions and assertions.
Inputs & outputs
When to use cypress
- →Write E2E tests for checkouts
- →Mock API responses
- →Automate UI user journeys
- →Integrate tests with CI/CD
About this skill
Cypress
Overview
Cypress is an end-to-end testing framework for web applications that runs tests directly in the browser for fast, reliable feedback. It provides element selection, network interception, component testing, and CI integration with parallelization and video recording.
Instructions
- When selecting elements, use
data-testidordata-cyattributes withcy.get("[data-testid='submit']")instead of CSS classes or IDs for resilient selectors. - When testing interactions, use
cy.get().type(),.click(),.select(), and.check()for user actions, and chain.should()assertions for expected outcomes. - When handling API calls, use
cy.intercept()to stub external APIs with fixtures or spy on requests, andcy.wait("@alias")after actions that trigger calls instead ofcy.wait(ms). - When writing custom commands, use
Cypress.Commands.add()for reusable patterns like login, database seeding, and common workflows, with TypeScript declarations for IntelliSense. - When testing components, use
cy.mount()with framework-specific mounting libraries (@cypress/react,@cypress/vue) to test components in isolation. - When configuring CI, use
cypress run --record --keyfor Cypress Cloud integration with--parallelto split tests across machines, and--browserto specify the browser. - When setting up the project, configure
cypress.config.tswithbaseUrl, viewport dimensions, timeouts, and environment variables.
Examples
Example 1: Write E2E tests for a checkout flow
User request: "Add Cypress tests for our e-commerce checkout process"
Actions:
- Set up test with
cy.visit("/products")and select a product - Intercept the cart API with
cy.intercept("POST", "/api/cart")and alias it - Fill in shipping form using
cy.get("[data-testid='email']").type(...) - Assert order confirmation with
cy.url().should("include", "/confirmation")
Output: A reliable E2E test covering the full checkout flow with stubbed API responses.
Example 2: Set up component testing for React
User request: "Configure Cypress component testing for our React project"
Actions:
- Install
@cypress/reactand configure component testing incypress.config.ts - Create stories for key components using
cy.mount(<Component />) - Test interactions with
cy.get().click()and assert DOM changes - Add to CI pipeline alongside E2E tests
Output: Isolated component tests running in a real browser with full Cypress API.
Guidelines
- Use
data-testidattributes for test selectors; never rely on CSS classes, text content, or DOM structure. - Keep tests independent: each test should set up its own state (login, seed data).
- Use
cy.intercept()to stub external APIs; do not let tests depend on third-party service availability. - Add
cy.wait("@alias")after actions that trigger API calls; do not usecy.wait(ms)for timing. - Write tests from the user's perspective: "fill in the form, click submit, see confirmation."
- Use fixtures for large API response data; inline small responses in
cy.intercept(). - Run Cypress in CI with
--recordfor test replay, screenshots, and video on failure.
When not to use it
- →When relying on CSS classes or IDs for element selection
- →When using `cy.wait(ms)` for timing instead of `cy.wait("@alias")`
Limitations
- →Tests run directly in the browser, limiting interaction with OS-level features
- →Element selection should use `data-testid` or `data-cy` attributes, not CSS classes or IDs
- →Tests should be independent and set up their own state
How it compares
Cypress runs tests directly in the browser with its own API for element selection and network interception, providing faster and more reliable feedback than traditional WebDriver-based testing.
Compared to similar skills
cypress side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| cypress (this skill) | 0 | 4mo | No flags | Intermediate |
| e2e-testing-patterns | 8 | 2mo | No flags | Intermediate |
| testing-workflow | 16 | 9mo | Review | Intermediate |
| perf-lighthouse | 13 | 5mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by ComeOnOliver
View all by ComeOnOliver →You might also like
e2e-testing-patterns
wshobson
Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.
testing-workflow
amo-tech-ai
Comprehensive testing workflow for E2E, integration, and unit tests. Use when testing applications layer-by-layer, validating user journeys, or running test suites.
perf-lighthouse
tech-leads-club
Run Lighthouse audits locally via CLI or Node API, parse and interpret reports, set performance budgets. Use when measuring site performance, understanding Lighthouse scores, setting up budgets, or integrating audits into CI. Triggers on: lighthouse, run lighthouse, lighthouse score, performance audit, performance budget.
xcodebuildmcp
cameroncooke
Official skill for XcodeBuildMCP. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).
verify
Use when you want to validate changes before committing, or when you need to check all React contribution requirements.
playwright-pro
alirezarezvani
Production-grade Playwright testing toolkit. Use when the user mentions Playwright tests, end-to-end testing, browser automation, fixing flaky tests, test migration, CI/CD testing, or test suites. Generate tests, fix flaky failures, migrate from Cypress/Selenium, sync with TestRail, run on BrowserStack. 55 templates, 3 agents, smart reporting.