agentleFS
jovd83jovd83/cypress-skill/core/SKILL.md

cypress-core

Skill0 starsChanged 35 days agoMITView on GitHub

Battle-tested Cypress patterns for E2E, API, component, visual, accessibility, and security testing. Covers selectors, assertions, hooks, intercepts, auth flows, debugging, and framework recipes for React, Next.js, Vue, and Angular.

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use semantic locators first: prefer findByRole/findByLabelText over brittle CSS chains.

    line 25
  2. Very specific:

    Do not use arbitrary sleeps: avoid cy.wait(2000) for synchronization.

    line 26
  3. Distinctive:

    Keep tests isolated: no shared mutable state or order dependencies.

    line 28
  4. Very specific:

    Use baseUrl and environment config: avoid hardcoded URLs.

    line 29
  5. Very specific:

    Use cy.intercept() for external dependencies: avoid mocking your app internals.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cypress Core Testing

Opinionated, production-tested Cypress guidance with explicit "when to use" and "when not to use" rules.

46 reference guides covering selectors, assertions, waiting, data setup, auth, network control, accessibility, component tests, visual checks, and debugging.

Golden Rules

  1. Use semantic locators first: prefer findByRole/findByLabelText over brittle CSS chains.
  2. Do not use arbitrary sleeps: avoid cy.wait(2000) for synchronization.
  3. Use retryable assertions: cy.get(...).should(...) is the default stability model.
  4. Keep tests isolated: no shared mutable state or order dependencies.
  5. Use baseUrl and environment config: avoid hardcoded URLs.
  6. Use cy.intercept() for external dependencies: avoid mocking your app internals.
  7. Use cy.session() for repeat auth flows: cache login safely for speed.
  8. Avoid { force: true } as a habit: fix actionability or UI state first.
  9. Assert user-facing feedback for mutations: validate toasts, banners, and state changes.
  10. Capture artifacts in CI: screenshots/videos on failure are mandatory for triage.

Official References

Version Compatibility

DependencySupported rangeWhy it matters
Cypress>=13.0.0Core guides rely on Cypress retryability and cy.session() patterns from v13+.
Node.js (by Cypress major)Cypress 13-14: >=18; Cypress 15+: 20.x, 22.x, >=24.xRunning unsupported Node versions causes install/runtime failures.
TypeScript (optional)Cypress <=14: >=4; Cypress 15+: >=5Needed for typed config, commands, and examples in TS projects.
@testing-library/cypress10.xEnables semantic query examples such as findByRole.

Guide Index

Writing Tests

What you're doingGuideDeep dive
Choosing selectorslocators.mdlocator-strategy.md
Assertions & waitingassertions-and-waiting.md
Organizing test suitestest-organization.mdtest-architecture.md
Cypress configconfiguration.md
Fixtures & hooksfixtures-and-hooks.md
Test datatest-data-management.md
Auth & loginauthentication.mdauth-flows.md
API testing (REST/GraphQL)api-testing.md
Visual regressionvisual-regression.md
Accessibilityaccessibility.md
Mobile & responsivemobile-and-responsive.md
Component testingcomponent-testing.md
Network mockingnetwork-mocking.mdwhen-to-mock.md
Forms & validationforms-and-validation.md
File uploads/downloadsfile-operations.mdfile-upload-download.md
Error & edge caseserror-and-edge-cases.md
CRUD flowscrud-testing.md
Drag and dropdrag-and-drop.md
Search & filter UIsearch-and-filter.md
Route behavior & navigation parityroute-behavior.md
Locator strictness & resiliencelocator-resilience.md
Testability hooks & automation contractstestability-hooks.md
API handler hardeningapi-handler-hardening.md
Contract-first mockingcontract-first-mocking.md
Environment preflight checkspreflight.md

Debugging & Fixing

ProblemGuide
General debugging workflowdebugging.md
Specific error messageerror-index.md
Flaky / intermittent testsflaky-tests.md
Common beginner mistakescommon-pitfalls.md
Stability diagnosticsstability-diagnostics.md

Framework Recipes

FrameworkGuide
Next.js (App Router + Pages Router)nextjs.md
React (CRA, Vite)react.md
Vue 3 / Nuxtvue.md
Angularangular.md

Specialized Topics

TopicGuide
Multi-user & collaborationmulti-user-and-collaboration.md
WebSockets & real-timewebsockets-and-realtime.md
Browser APIs (geo, clipboard, permissions)browser-apis.md
iframes & Shadow DOMiframes-and-shadow-dom.md
Canvas & WebGLcanvas-and-webgl.md
Service workers & PWAservice-workers-and-pwa.md
Electron appselectron-testing.md
Browser extensionsbrowser-extensions.md
Security testingsecurity-testing.md
Performance & benchmarksperformance-testing.md
i18n & localizationi18n-and-localization.md
Multi-tab & popupsmulti-context-and-popups.md
Clock & time mockingclock-and-time-mocking.md
Third-party integrationsthird-party-integrations.md

Architecture Decisions

QuestionGuide
Which locator strategy?locator-strategy.md
E2E vs component vs API?test-architecture.md
Mock vs real services?when-to-mock.md

Download now (ZIP)

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. jovd83/Cypress-skill★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository7 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.