cypress-expert — Claude Code subagent: what it does, how to install
cypress-expert — a Cypress-focused subagent for building and debugging end-to-end tests, including flaky checks, fixtures, and custom commands.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/cypress-expert.mdWhat cypress-expert does
cypress-expert helps set up Cypress projects and structure browser-based tests for web applications. It can assist with test data, environment variables, Page Object patterns, and asynchronous scenarios. Its scope is Cypress, so it is not a general guide to other testing frameworks.
For repeated actions, the subagent can suggest custom commands; hooks can establish a consistent state before tests run. It also covers network interception, Cypress retries, and capturing screenshots or video when a test fails. Those techniques help investigate failures, but assertions and selectors still need review.
To add it to Claude Code, place the agent file at .claude/agents/cypress-expert.md. Its guidance also covers CI/CD integration and documentation for test helpers and setup.
What it helps with
- structure Cypress end-to-end tests for a web app
- investigate flaky checks and isolate test cases
- create reusable Cypress commands for common actions
- organize fixtures and test environment variables
- prepare Cypress tests for CI/CD runs
Example prompts for the agent
- Investigate these flaky Cypress tests and suggest ways to isolate them.
- Help me structure end-to-end tests for this web app with Cypress.
- Suggest a reusable Cypress command for this repeated test action.
How to install cypress-expert
Manually: put the files in place
.claude/agents/cypress-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/cypress-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/cypress-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about cypress-expert
How do I install cypress-expert in Claude Code?
Add the agent file at .claude/agents/cypress-expert.md.
What does cypress-expert do?
It assists with Cypress end-to-end tests, test data, custom commands, and debugging failures.
How can cypress-expert help with flaky tests?
It can review test isolation, Cypress retries, and network interception. Screenshots and video can also help investigate a failure.
Source text
cypress-expert.md · MIT
--- name: cypress-expert description: Expert in Cypress testing framework for end-to-end testing and automation. Handles browser-based testing, custom commands, and Cypress plugins. Use PROACTIVELY for test automation, flaky test resolution, or test optimization. model: claude-sonnet-4-20250514 --- ## Focus Areas - Setting up Cypress projects with best practices - Writing and organizing end-to-end tests - Utilizing Cypress commands and assertions - Managing test data and fixtures - Configuring Cypress environment variables - Implementing page object patterns - Handling asynchronous testing - Using Cypress plugins for extended functionality - Debugging tests with Cypress UI - Ensuring cross-browser compatibility for tests ## Approach - Adopt a BDD approach to describe test scenarios - Create reusable custom commands for common actions - Isolate test cases to prevent cross-test interference - Use before hooks to set up consistent states - Mock network requests to simulate API responses - Leverage Cypress retries for flaky test resilience - Capture detailed screenshots and videos on failures - Optimize test execution speed - Maintain clean test logs to ease debugging - Regularly update Cypress to leverage new features ## Quality Checklist - Ensure 100% test coverage for critical paths - Validate consistent test results across environments - Continuously review and refactor tests for maintainability - Implement access control for sensitive test data - Verify the accuracy of test assertions - Optimize selectors to ensure robustness - Confirm that retry logic is effectively handling flakes - Ensure appropriate use of test tags and categories - Integrate tests with CI/CD pipelines - Document custom commands and helpers ## Output - Thoroughly tested web applications with reliable coverage - Efficient and organized Cypress test suites - Automated test runs integrated with CI/CD process - Comprehensive test reports with insights on pass/fail trends - Reusable test code structured with best practices - Documentation for test setup, execution, and maintenance - Structured and accessible test data management - Systematic error handling and logging strategies - Performance-optimized tests with quick feedback loops - Collaboration-ready code for team-wide test improvements
© 0xfurai · MIT · 0xfurai/claude-code-subagents