Skip to content
Back to skills

Cypress

ASecurity

Cypress E2E and component tests: cy.intercept(), cy.session(), custom commands and CI artifacts. Use when writing or debugging Cypress specs, or running Cypress in CI.

  • 80 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 28, 2026
ai-agentsgobashtestingdebugging

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 3 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add monkilabs/opencastle --skill cypress-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cypress?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cypress
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkilabs-cypress/badge)](https://www.skillsdirectory.com/skills/monkilabs-cypress)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cypress-testing
description: "Cypress E2E and component tests: cy.intercept(), cy.session(), custom commands and CI artifacts. Use when writing or debugging Cypress specs, or running Cypress in CI."
---

# Cypress Testing

Project test config and breakpoints: `.opencastle/stack/testing-config.md`. Docs: https://docs.cypress.io

## Layout

Specs `cypress/e2e/` • fixtures `cypress/fixtures/` • custom commands `cypress/support/commands.ts` • failure artifacts `cypress/screenshots/` and `cypress/videos/`.

## Gotchas

- `cy.session(key, setupFn)` caches and restores auth state across specs — the cache key must include every credential that changes the session, or you will silently reuse the wrong user.
- Give each spec **unique** `@alias` names for `cy.intercept()` routes. Shared alias names cause cross-test `cy.wait()` collisions when specs run in parallel.
- Prefer `cy.intercept()` with fixed fixture payloads over seeding real data — it is the only reliable fix for network flake.
- Selector priority: `data-testid` → `aria-*` / `role`. Never auto-generated classes or deep CSS paths.
- After `npm install --save-dev cypress`, run `npx cypress verify` — a corrupted binary cache fails later with confusing errors.

## Commands

```bash
npx cypress open                                              # interactive
npx cypress run                                               # headless / CI, assert exit 0
npx cypress run --spec "cypress/e2e/auth/login.cy.ts" --headed # single-spec smoke check
```

On failure, re-run the failing spec alone and inspect the screenshot/video artifacts. In CI, upload those artifacts only on failure.

Files in this skill

  • REFERENCE.md218 B
  • SKILL.md3.4 KB
  • config.ts441 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.