$npx skillfedfor your agent

cypress

This skill equips you with professional Cypress testing strategies and patterns for building reliable end-to-end test suites. Drawn from a curated collection of 240+ Claude Code skills, it delivers actionable guidance on test structure, assertions, and automation workflows to strengthen your QA processes.

Cypress excels at end-to-end testing when you follow core best practices: use data-testid selectors instead of brittle CSS classes, avoid hardcoded waits in favor of Cypress's built-in retry logic, structure tests with clear Given-When-Then patterns, and leverage custom commands to reduce duplication. The skill emphasizes proper element selection strategies, reliable assertions, and network mocking with intercept to simulate API responses. By combining these patterns, you build test suites that are maintainable, fast, and resistant to flakiness.

AI-generated summary based on this skill's SKILL.md

202 30 Apache-2.0updated by Mindrally

Decision gist · record as of 2026-06-09

Cypress excels at end-to-end testing when you follow core best practices: use data-testid selectors instead of brittle CSS classes, avoid hardcoded waits in favor of Cypress's built-in retry logic, structure tests with clear Given-When-Then patterns, and leverage custom commands to reduce duplication. The skill emphasizes proper element selection strategies, reliable assertions, and network mocking with intercept to simulate API responses. By combining these patterns, you build test suites that are maintainable, fast, and resistant to flakiness.

manual: git clone https://github.com/Mindrally/skills → cp -r skills/cypress ~/.claude/skills/cypress
cypress/SKILL.md · version 73fac2f2

Use it when

  • Cypress test reliability depends on selector quality and async handling.
  • Cypress test organization starts with a clear folder structure separating specs by feature or page.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

Mindrally/skills/cypress

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What are the best practices for cypress end-to-end testing?

Cypress excels at end-to-end testing when you follow core best practices: use data-testid selectors instead of brittle CSS classes, avoid hardcoded waits in favor of Cypress's built-in retry logic, structure tests with clear Given-When-Then patterns, and leverage custom commands to reduce duplication. The skill emphasizes proper element selection strategies, reliable assertions, and network mocking with intercept to simulate API responses. By combining these patterns, you build test suites that are maintainable, fast, and resistant to flakiness.

How can I improve test reliability by avoiding flaky patterns and using proper selectors in Cypress?

Cypress test reliability depends on selector quality and async handling. The skill teaches you to prefer data-testid attributes over fragile CSS or XPath selectors, ensuring your tests survive UI refactors. Avoid flaky patterns like hardcoded waits (setTimeout) and instead rely on Cypress's automatic retry mechanism for commands and assertions. Use cy.intercept() to mock network calls predictably, implement proper test isolation so tests don't interfere with each other, and structure authentication via session strategies rather than repeated login steps. These practices eliminate race conditions and timing issues that cause intermittent failures.

What is the recommended approach for structuring and organizing Cypress tests effectively?

Cypress test organization starts with a clear folder structure separating specs by feature or page, then uses custom commands and helper functions to keep tests DRY. The skill recommends the Given-When-Then pattern to make test intent explicit: set up state (Given), perform user actions (When), and verify outcomes (Then). Group related assertions together, use page objects or command libraries to abstract selectors, and implement test isolation so each test runs independently without relying on execution order. This structure makes tests readable, maintainable, and easier to debug when failures occur.

How do I master custom commands and async operations in Cypress?

Cypress custom commands reduce boilerplate and centralize reusable logic—define them in support files and chain them like native Cypress commands. For async operations, understand that Cypress automatically retries commands and assertions, so avoid manual waits; instead, let cy.get(), cy.intercept(), and assertion retries handle timing. The skill covers how to properly chain commands, handle network requests with intercept for API mocking, and structure commands that respect Cypress's async queue. Mastering these patterns lets you write concise, reliable tests that handle real-world timing challenges without flakiness.

What strategies does Cypress offer for test isolation and authentication in e2e testing?

Cypress test isolation ensures each test is independent and can run in any order. The skill teaches session-based authentication strategies—use cy.session() to cache login state across tests, avoiding repeated login steps while maintaining security. Implement test isolation by resetting state between tests, using intercept to mock API responses consistently, and avoiding shared test data. For login testing specifically, authenticate once per session and reuse credentials across related tests rather than logging in for every spec. These strategies speed up test execution, improve reliability, and prevent cascading failures where one test's state breaks subsequent tests.

How does Cypress handle network mocking and API call interception?

Cypress network mocking via cy.intercept() lets you stub API responses, verify requests, and simulate error conditions without hitting real backends. The skill shows how to intercept API calls by URL pattern, return mock data or error statuses, and assert that your app makes the correct requests. This approach isolates your e2e tests from external dependencies, makes them faster and more reliable, and lets you test edge cases like network failures. By combining intercept with proper test structure, you build comprehensive test coverage that validates both UI behavior and API integration without flakiness from real service latency.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Cypress Testing Best Practices

You are an expert in Cypress end-to-end testing.

Core Principles

Test Structure
  • Use descriptive test names that clearly explain expected behavior
  • Organize tests by feature or user flow
  • Keep tests focused on critical user paths
  • Follow the Given-When-Then pattern for clarity
Selecting Elements
  • Prefer data-testid or data-cy attributes for test selectors
  • Use cy.contains() for text-based selection when appropriate
  • Avoid brittle selectors like CSS classes or tag hierarchies
// Recommended
cy.get('[data-testid="submit-button"]').click();
cy.contains('Submit').click();

// Avoid
cy.get('.btn-primary').click();
Commands and Assertions
  • Chain commands fluently for readability
  • Use built-in retry-ability; avoid explicit waits
  • Prefer .should() assertions over .then() for automatic retries
  • Use .within() to scope commands to a specific element
Custom Commands
  • Create custom commands for repeated actions
  • Place custom commands

(truncated - see the full file via the links below)

File tree — 1 file
cypress/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn Cypress end-to-end testing best practices and patterns”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

cypress-skill
by LambdaTest · LambdaTest/agent-skills

cypress-skill enables you to create production-grade end-to-end and component tests using Cypress, streamlining test automation workflows. This skill generates comprehensive test suites that validate application behavior across browsers and environments, helping teams catch regressions early and maintain code quality.

MITupdated Jul 2026
★ 339repo stars
cypress
by bobmatnyc · bobmatnyc/claude-mpm-skills

Cypress enables you to build robust automated browser testing workflows with intelligent selector strategies and predictable wait handling. This skill integrates with SkillFed's agent ecosystem to streamline end-to-end test development, helping you catch regressions early and maintain test reliability across your application.

MITupdated Jul 2026
★ 62repo stars
e2e-testing-patterns
by HermeticOrmus · HermeticOrmus/LibreUIUX-Claude-Code

This skill teaches you how to architect and implement end-to-end tests using industry-standard frameworks like Playwright and Cypress. You'll discover proven patterns for organizing test code, handling asynchronous operations, and maintaining test reliability as your application grows. Gain practical knowledge for building test suites that catch real-world issues before they reach production.

MITupdated May 2026
★ 86repo stars
testing-expert
by personamanagmentlayer · personamanagmentlayer/pcl

Testing Expert guides you through building robust test suites using proven methodologies and modern frameworks. Learn the test pyramid, mocking strategies, and coverage targets across multiple languages including Vitest, Pytest, Go testing, and JUnit 5.

Apache-2.0updated Mar 2026
★ 38repo stars
playwright
by Mindrally · Mindrally/skills

This skill equips you with Playwright testing expertise drawn from proven coding standards. Discover patterns and best practices for building reliable browser automation tests across modern web applications, leveraging insights from expert developers who've refined these techniques in production environments.

Apache-2.0updated Jun 2026
★ 202repo stars
E2e Testing
by eyadsibai · eyadsibai/ltk

Master the fundamentals of end-to-end testing by setting up comprehensive test suites that validate complete application workflows. This skill covers environment configuration, test automation strategies, and best practices for ensuring your application behaves correctly across all user scenarios.

no license declared → metadata onlyupdated Jan 2026
★ 6repo stars
Tags
ui-automationtest-reliabilityselector-strategyasync-handlingtest-independenceapi-mockingweb-testingqa-patterns