vril-labs/skill-jam/cypress

Claude Code and agent skill by vril-labs/skill-jam

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Cypress end-to-end testing best practices for web applications, covering test structure, commands, and reliability patterns.

Install

npx vskill@latest install vril-labs/skill-jam/cypress

SKILL.md

The same SKILL.md was published earlier as mindrally/skills/cypress.

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
javascript
// 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 in cypress/support/commands.js
  • Document custom commands with JSDoc comments
javascript
Cypress.Commands.add('login', (email, password) => {
cy.session([email, password], () => {
cy.visit('/login');
cy.get('[data-testid="email"]').type(email);
cy.get('[data-testid="password"]').type(password);
cy.get('[data-testid="submit"]').click();
cy.url().should('include', '/dashboard');
});
});
Handling Async Operations
  • Cypress commands are automatically queued; don't mix with async/await
  • Use cy.intercept() to mock or wait for network requests
  • Use cy.wait() with aliases, not arbitrary timeouts
javascript
cy.intercept('GET', '/api/users').as('getUsers');
cy.visit('/users');
cy.wait('@getUsers');
cy.get('[data-testid="user-list"]').should('be.visible');
Test Isolation
  • Each test should be independent and repeatable
  • Use beforeEach hooks for setup
  • Use cy.session() for efficient authentication
Anti-Patterns to Avoid
  • Using cy.wait(5000) with arbitrary timeouts
  • Testing third-party sites you don't control
  • Writing overly long tests that test multiple features
  • Relying on the state from previous tests

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/vril-labs/skill-jam/cypress/badge)](https://verified-skill.com/skills/vril-labs/skill-jam/cypress)

Something wrong with this skill or its page? Tell us.