Skip to content

KahlilR23/cypress-agent-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 cypress-agent-skill

The ultimate Cypress testing skill for AI coding agents.
Works with Claude Code, Codex CLI, OpenClaw, Cursor, and any agent that reads SKILL.md files.

License: MIT Cypress AgentSkills Compatible Validate


What This Is

A production-grade AI agent skill for writing, debugging, and optimizing Cypress tests. Covers every major Cypress pattern — selector strategy, network stubbing, auth with cy.session, CI parallelization, component testing, flake elimination — in a format AI agents read and apply directly.

One SKILL.md at the root. No nested directories. Agents clone this repo and read SKILL.md immediately.


Quick Install

OpenClaw (global — available to all agents)

git clone https://github.com/KahlilR23/cypress-agent-skill \
  ~/.openclaw/skills/cypress-agent-skill

Claude Code (project-level)

git clone https://github.com/KahlilR23/cypress-agent-skill \
  .claude/skills/cypress-agent-skill

Claude Code (personal — available in all projects)

git clone https://github.com/KahlilR23/cypress-agent-skill \
  ~/.claude/skills/cypress-agent-skill

Codex CLI

git clone https://github.com/KahlilR23/cypress-agent-skill \
  .agents/skills/cypress-agent-skill

Cursor

git clone https://github.com/KahlilR23/cypress-agent-skill \
  .cursor/skills/cypress-agent-skill

Global (works with Codex, Gemini CLI, Kiro, Antigravity simultaneously)

git clone https://github.com/KahlilR23/cypress-agent-skill \
  ~/.agents/skills/cypress-agent-skill

One-liner bash installer

# Detects platform automatically
bash <(curl -fsSL https://raw.githubusercontent.com/KahlilR23/cypress-agent-skill/main/install.sh)

# Or with explicit agent
bash <(curl -fsSL https://raw.githubusercontent.com/KahlilR23/cypress-agent-skill/main/install.sh) --agent open-claw

LobeHub CLI

npx -y @lobehub/market-cli register --name "YourAgent" --source open-claw
npx -y @lobehub/market-cli skills install cypress-expert --agent open-claw

ClawHub (OpenClaw native)

clawhub install cypress-agent-skill

skills.sh (Vercel ecosystem — Claude Code, Codex, Cursor, Windsurf, and more)

npx skills add KahlilR23/cypress-agent-skill

Repo Structure

cypress-agent-skill/           ← clone target / skill root
├── SKILL.md                   ← THE skill — agents read this
├── README.md
├── install.sh                 ← bash installer for all platforms
├── LICENSE                    ← MIT
├── CONTRIBUTING.md
├── .github/
│   └── workflows/
│       └── validate.yml       ← CI: validates structure, frontmatter, JS syntax
├── references/
│   ├── network.md             ← cy.intercept deep-dive
│   ├── assertions.md          ← complete assertion cheatsheet
│   ← selectors.md            ← stability hierarchy + data-testid guide
│   ├── commands.md            ← full cy.* command reference
│   ├── config.md              ← complete cypress.config.js options
│   ├── ci.md                  ← GitHub Actions, GitLab, CircleCI, Jenkins
│   ├── component-testing.md   ← React/Vue/Angular component tests
│   └── patterns.md            ← visual regression, API testing, multi-tab
└── examples/
    ├── auth-flow.cy.js        ← cy.session auth (complete test suite)
    ├── api-intercept.cy.js    ← network stubbing patterns
    ├── page-objects.cy.js     ← full POM implementation
    └── custom-commands.js     ← drop-in command library + TypeScript types

Why flat? When an agent installs this skill (e.g. to ~/.openclaw/skills/cypress-agent-skill/), the repo root is the skill root. The main SKILL.md lives directly at that path with no subdirectories to navigate. Clean, direct, agent-friendly.


Coverage

Topic Covered
Installation & Configuration
Selector Strategy (data-testid, ARIA, cy.contains)
Assertions (should, expect, chaining)
Network Stubbing (cy.intercept)
Request/Response Assertions
Authentication (cy.session)
Custom Commands + TypeScript types
Page Object Model
Component Testing (React, Vue, Angular)
Forms, File Upload, Tables
Modals, Alerts, iframes
Local Storage / Cookies
Flake Prevention
CI/CD (GitHub Actions, GitLab, CircleCI, Jenkins)
Parallelization (Cypress Cloud)
Environment Variables
Fixtures & Data Management
Accessibility (cypress-axe)
TypeScript Support
Visual Regression (Percy)
API Testing (cy.request)
Multi-tab Handling
Date/Time Manipulation (cy.clock)
Database Seeding via Tasks
Download Testing
Drag and Drop

How Agents Use This Skill

When an AI agent installs this skill:

  1. Agent reads SKILL.md automatically when you ask it to write or fix Cypress tests
  2. For deep dives, the agent reads specific files from references/ on demand
  3. examples/ files serve as copy-paste-ready templates

The skill uses AgentSkills format with OpenClaw-native metadata for gating (only activates when cypress or npx is on PATH).


Platform Install Paths

Agent Path Scope
OpenClaw ~/.openclaw/skills/cypress-agent-skill/ Global
Claude Code ./.claude/skills/cypress-agent-skill/ Project
Claude Code ~/.claude/skills/cypress-agent-skill/ Personal
Codex CLI ./.agents/skills/cypress-agent-skill/ Project
Cursor ./.cursor/skills/cypress-agent-skill/ Project
Global ~/.agents/skills/cypress-agent-skill/ All agents

Contributing

See CONTRIBUTING.md. PRs welcome — real-world patterns only, no toy examples.

License

MIT

Related

About

Cypress E2E testing skill for AI agents — Claude Code, Codex, OpenClaw, Cursor, and more. Covers selectors, network stubbing, auth, CI, flake prevention, POM, and TypeScript. Cypress 15.x compatible.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages