On this page

Instead of manually setting up your Cypress project, you can use **Agent Skills** to let your AI coding assistant generate production-ready Cypress test automation for you.

The [cypress-skill](https://github.com/LambdaTest/agent-skills/tree/main/cypress-skill) is part of [TestMu AI Agent Skills](https://github.com/LambdaTest/agent-skills/) - structured packages that teach AI coding assistants how to write production-grade test automation code.

## What Are Agent Skills?

Agent Skills are self-contained packages of instructions, code patterns, debugging guides, and CI/CD configurations for specific testing frameworks. Once installed, your AI assistant works like a **Senior QA automation architect** with knowledge of:

- Proper project structure for each framework
- Correct dependency versions and configurations
- Both local and TestMu AI cloud execution patterns
- Common pitfalls and debugging approaches
- CI/CD integration with GitHub Actions

## Prerequisites

- A TestMu AI account. If you don't have one, [sign up for free](https://stage.testmuinternal.ai/).
- Your TestMu AI **Username** and **Access Key** from the [Automation Dashboard](https://automation.lambdatest.com/).
- An AI coding assistant: [Claude Code](https://claude.ai/code), [GitHub Copilot](https://github.com/features/copilot), [Cursor](https://cursor.sh/), [Gemini CLI](https://github.com/google-gemini/gemini-cli), or any compatible tool.

## Installing the Cypress Agent Skill

Clone the repository and copy the Cypress skill into your AI tool's skills directory:

```bash
git clone https://github.com/LambdaTest/agent-skills.git

# For Claude Code
cp -r agent-skills/cypress-skill .claude/skills/

# For Cursor
cp -r agent-skills/cypress-skill .cursor/skills/

# For GitHub Copilot
cp -r agent-skills/cypress-skill .github/skills/

# For Gemini CLI
cp -r agent-skills/cypress-skill .gemini/skills/
```

If you prefer installing **all available framework skills**, clone the repository directly into your tool's skills directory (e.g., `.claude/skills/`, `.cursor/skills/`).

## Set Up Your Authentication

Configure your TestMu AI credentials as environment variables:

```bash
export LT_USERNAME="YOUR_LAMBDATEST_USERNAME"
export LT_ACCESS_KEY="YOUR_LAMBDATEST_ACCESS_KEY"
```

## Running Your First Test Using Agent Skills

Once installed, simply ask your AI assistant to write tests in natural language:

```text
"Write Cypress E2E tests for the login page and run them on TestMu AI cloud using Chrome and Firefox"
```

```text
"Set up Cypress component tests for the React dashboard and upload screenshots on failure"
```

```text
"Run Cypress tests across multiple browsers in parallel on TestMu AI"
```

The Agent Skill automatically handles:

1. **Project setup** - Creates the right folder structure, dependencies, and config files
2. **Test type detection** - Routes to E2E (`cypress/e2e/`), Component (`cypress/component/`), or API tests
3. **Execution target** - Configures local or TestMu AI cloud execution via `lambdatest-config.json`
4. **Best practices** - Uses `data-cy` selectors, `cy.intercept()` for network, `cy.session()` for auth

## What's Included in the Cypress Skill

```text
cypress-skill/
├── SKILL.md
└── reference/
    ├── playbook.md
    └── advanced-patterns.md
```

| Section             | Details                                                                                               |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| **Project Setup**   | Dependencies, versions, configuration files, project structure                                        |
| **Core Patterns**   | Complete, runnable code examples with Cypress chaining best practices                                 |
| **Cloud Integration**| TestMu AI `lambdatest-config.json` and `npx lambdatest-cypress run` setup                           |
| **CI/CD Integration**| GitHub Actions workflows with reporting and parallel execution                                        |
| **Debugging Guide** | 15+ common issues mapped to solutions                                                                  |
| **Best Practices**  | Actionable recommendations for production code                                                        |

## Supported AI Tools

| Tool              | Type       | Installation Path          |
| ----------------- | ---------- | -------------------------- |
| Claude Code       | CLI        | `.claude/skills/`         |
| GitHub Copilot    | Extension  | `.github/skills/`         |
| Cursor            | IDE        | `.cursor/skills/`         |
| Gemini CLI        | CLI        | `.gemini/skills/`         |
| Codex CLI         | CLI        | `.codex/skills/`          |
| OpenCode          | CLI        | `.opencode/skills/`       |
| Claude.ai         | Web        | Settings > Features > Skills |

## Test across 3000+ combinations of browsers, real devices & OS.
