{
  "schemaVersion": "1.0",
  "item": {
    "slug": "cypress",
    "name": "Cypress",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ivangdavila/cypress",
    "canonicalUrl": "https://clawhub.ai/ivangdavila/cypress",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/cypress",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=cypress",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "ci.md",
      "commands.md",
      "memory-template.md",
      "network.md",
      "selectors.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/cypress"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/cypress",
    "agentPageUrl": "https://openagent3.xyz/skills/cypress/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cypress/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cypress/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Setup",
        "body": "On first use, read setup.md for integration guidelines."
      },
      {
        "title": "When to Use",
        "body": "User needs E2E tests, component tests, or API tests with Cypress. Agent writes tests, debugs flaky specs, configures CI/CD, and creates custom commands."
      },
      {
        "title": "Architecture",
        "body": "Project tests live in the standard Cypress structure:\n\ncypress/\n├── e2e/              # E2E test specs\n├── component/        # Component tests (if enabled)\n├── fixtures/         # Test data JSON files\n├── support/\n│   ├── commands.ts   # Custom commands\n│   ├── e2e.ts        # E2E support file\n│   └── component.ts  # Component support file\n└── downloads/        # Downloaded files during tests\ncypress.config.ts     # Main configuration"
      },
      {
        "title": "Quick Reference",
        "body": "TopicFileSetup processsetup.mdMemory templatememory-template.mdSelectors & queriesselectors.mdCustom commandscommands.mdNetwork & APInetwork.mdCI/CD configurationci.md"
      },
      {
        "title": "1. Selectors: data-testid First",
        "body": "// ✅ Resilient — survives refactors\ncy.get('[data-testid=\"submit-btn\"]')\ncy.get('[data-cy=\"user-list\"]')\n\n// ❌ Fragile — breaks on style/structure changes\ncy.get('.btn-primary.submit')\ncy.get('#root > div > form > button:nth-child(3)')\ncy.get('button').contains('Submit')  // OK for text, not structure\n\nPriority order: data-testid > data-cy > aria-* > text content > CSS selectors."
      },
      {
        "title": "2. Never Use Fixed Waits",
        "body": "// ❌ Flaky and slow\ncy.wait(3000)\ncy.get('.loader').should('exist')\ncy.wait(2000)\n\n// ✅ Wait for actual state\ncy.get('.loader').should('not.exist')\ncy.get('[data-testid=\"results\"]').should('be.visible')\ncy.intercept('GET', '/api/users').as('getUsers')\ncy.wait('@getUsers')"
      },
      {
        "title": "3. Intercept Network Requests",
        "body": "// Setup intercepts BEFORE triggering actions\ncy.intercept('POST', '/api/login', { statusCode: 200, body: { token: 'abc' } }).as('login')\ncy.get('[data-testid=\"login-btn\"]').click()\ncy.wait('@login')"
      },
      {
        "title": "4. One Assertion Focus per Test",
        "body": "// ✅ Clear failure message\nit('shows error on invalid email', () => {\n  cy.get('[data-testid=\"email\"]').type('invalid')\n  cy.get('[data-testid=\"submit\"]').click()\n  cy.get('[data-testid=\"email-error\"]').should('contain', 'Valid email required')\n})\n\n// ❌ Multiple concerns — unclear which failed\nit('validates the entire form', () => {\n  // Tests 5 different validation rules\n})"
      },
      {
        "title": "5. Commands for Repeated Actions",
        "body": "// cypress/support/commands.ts\nCypress.Commands.add('login', (email: string, password: string) => {\n  cy.session([email, password], () => {\n    cy.visit('/login')\n    cy.get('[data-testid=\"email\"]').type(email)\n    cy.get('[data-testid=\"password\"]').type(password)\n    cy.get('[data-testid=\"submit\"]').click()\n    cy.url().should('include', '/dashboard')\n  })\n})\n\n// Usage\ncy.login('user@example.com', 'password123')"
      },
      {
        "title": "6. Fixtures for Test Data",
        "body": "// cypress/fixtures/user.json\n{\n  \"validUser\": { \"email\": \"test@example.com\", \"password\": \"Test123!\" },\n  \"adminUser\": { \"email\": \"admin@example.com\", \"password\": \"Admin123!\" }\n}\n\ncy.fixture('user').then((users) => {\n  cy.login(users.validUser.email, users.validUser.password)\n})"
      },
      {
        "title": "7. Isolation: Reset State Before Tests",
        "body": "beforeEach(() => {\n  cy.intercept('GET', '/api/notifications', { body: [] })\n  cy.clearCookies()\n  cy.clearLocalStorage()\n  // Or: cy.task('db:seed') if using database reset\n})"
      },
      {
        "title": "Common Traps",
        "body": "TrapConsequenceFixcy.wait(ms) fixed delaysFlaky tests, slow CIUse cy.intercept().as() + cy.wait('@alias')CSS selectors for actionsBreak on redesignUse data-testid attributesTest interdependenceOne failure cascadesEach test must setup its own stateAsserting too earlyFalse positivesChain .should() to auto-retryForgetting baseUrlHardcoded URLs everywhereSet baseUrl in configSkipping viewport testsMobile bugs in prodAdd cy.viewport() testsIgnoring retry-abilityFlaky assertionsUse Cypress queries, not jQuery"
      },
      {
        "title": "Time Travel",
        "body": "Click any command in the Command Log to see DOM snapshot at that moment."
      },
      {
        "title": "Pause and Step",
        "body": "cy.get('[data-testid=\"item\"]').then(($el) => {\n  debugger  // Opens DevTools\n})\n// Or\ncy.pause()  // Pause execution, step manually"
      },
      {
        "title": "Console Debugging",
        "body": "cy.get('[data-testid=\"items\"]')\n  .should('have.length.gt', 0)\n  .then(($items) => {\n    console.log('Found items:', $items.length)\n  })"
      },
      {
        "title": "cypress.config.ts Essentials",
        "body": "import { defineConfig } from 'cypress'\n\nexport default defineConfig({\n  e2e: {\n    baseUrl: 'http://localhost:3000',\n    viewportWidth: 1280,\n    viewportHeight: 720,\n    defaultCommandTimeout: 10000,\n    requestTimeout: 10000,\n    retries: { runMode: 2, openMode: 0 },\n    video: false,  // Enable for CI debugging\n    screenshotOnRunFailure: true,\n    setupNodeEvents(on, config) {\n      // Plugins here\n    },\n  },\n  component: {\n    devServer: {\n      framework: 'react',  // or 'vue', 'angular', etc.\n      bundler: 'vite',     // or 'webpack'\n    },\n  },\n})"
      },
      {
        "title": "TypeScript Support",
        "body": "// cypress/support/commands.ts\ndeclare global {\n  namespace Cypress {\n    interface Chainable {\n      login(email: string, password: string): Chainable<void>\n      getByTestId(testId: string): Chainable<JQuery<HTMLElement>>\n    }\n  }\n}\n\nCypress.Commands.add('getByTestId', (testId: string) => {\n  return cy.get(`[data-testid=\"${testId}\"]`)\n})"
      },
      {
        "title": "Running Tests",
        "body": "CommandPurposenpx cypress openInteractive modenpx cypress runHeadless (CI)npx cypress run --spec \"cypress/e2e/login.cy.ts\"Single specnpx cypress run --headedHeadless but visiblenpx cypress run --browser chromeSpecific browser"
      },
      {
        "title": "External Endpoints",
        "body": "This skill does not call external APIs. Cypress runs entirely locally or in your own CI environment."
      },
      {
        "title": "Security & Privacy",
        "body": "Data that stays local:\n\nAll test code and fixtures remain in project directory\nCypress runs locally or in your own CI environment\n\nThis skill does NOT:\n\nSend data to external services\nRequire API keys or authentication\nAccess files outside project directory\n\nNote: Cypress Cloud (optional, paid) can receive test results if configured with CYPRESS_RECORD_KEY. This skill does not configure or recommend it."
      },
      {
        "title": "Related Skills",
        "body": "Install with clawhub install <slug> if user confirms:\n\nplaywright — alternative E2E framework\ntypescript — TypeScript best practices\njavascript — JS fundamentals and patterns\nreact — React component testing"
      },
      {
        "title": "Feedback",
        "body": "If useful: clawhub star cypress\nStay updated: clawhub sync"
      }
    ],
    "body": "Setup\n\nOn first use, read setup.md for integration guidelines.\n\nWhen to Use\n\nUser needs E2E tests, component tests, or API tests with Cypress. Agent writes tests, debugs flaky specs, configures CI/CD, and creates custom commands.\n\nArchitecture\n\nProject tests live in the standard Cypress structure:\n\ncypress/\n├── e2e/              # E2E test specs\n├── component/        # Component tests (if enabled)\n├── fixtures/         # Test data JSON files\n├── support/\n│   ├── commands.ts   # Custom commands\n│   ├── e2e.ts        # E2E support file\n│   └── component.ts  # Component support file\n└── downloads/        # Downloaded files during tests\ncypress.config.ts     # Main configuration\n\nQuick Reference\nTopic\tFile\nSetup process\tsetup.md\nMemory template\tmemory-template.md\nSelectors & queries\tselectors.md\nCustom commands\tcommands.md\nNetwork & API\tnetwork.md\nCI/CD configuration\tci.md\nCore Rules\n1. Selectors: data-testid First\n// ✅ Resilient — survives refactors\ncy.get('[data-testid=\"submit-btn\"]')\ncy.get('[data-cy=\"user-list\"]')\n\n// ❌ Fragile — breaks on style/structure changes\ncy.get('.btn-primary.submit')\ncy.get('#root > div > form > button:nth-child(3)')\ncy.get('button').contains('Submit')  // OK for text, not structure\n\n\nPriority order: data-testid > data-cy > aria-* > text content > CSS selectors.\n\n2. Never Use Fixed Waits\n// ❌ Flaky and slow\ncy.wait(3000)\ncy.get('.loader').should('exist')\ncy.wait(2000)\n\n// ✅ Wait for actual state\ncy.get('.loader').should('not.exist')\ncy.get('[data-testid=\"results\"]').should('be.visible')\ncy.intercept('GET', '/api/users').as('getUsers')\ncy.wait('@getUsers')\n\n3. Intercept Network Requests\n// Setup intercepts BEFORE triggering actions\ncy.intercept('POST', '/api/login', { statusCode: 200, body: { token: 'abc' } }).as('login')\ncy.get('[data-testid=\"login-btn\"]').click()\ncy.wait('@login')\n\n4. One Assertion Focus per Test\n// ✅ Clear failure message\nit('shows error on invalid email', () => {\n  cy.get('[data-testid=\"email\"]').type('invalid')\n  cy.get('[data-testid=\"submit\"]').click()\n  cy.get('[data-testid=\"email-error\"]').should('contain', 'Valid email required')\n})\n\n// ❌ Multiple concerns — unclear which failed\nit('validates the entire form', () => {\n  // Tests 5 different validation rules\n})\n\n5. Commands for Repeated Actions\n// cypress/support/commands.ts\nCypress.Commands.add('login', (email: string, password: string) => {\n  cy.session([email, password], () => {\n    cy.visit('/login')\n    cy.get('[data-testid=\"email\"]').type(email)\n    cy.get('[data-testid=\"password\"]').type(password)\n    cy.get('[data-testid=\"submit\"]').click()\n    cy.url().should('include', '/dashboard')\n  })\n})\n\n// Usage\ncy.login('user@example.com', 'password123')\n\n6. Fixtures for Test Data\n// cypress/fixtures/user.json\n{\n  \"validUser\": { \"email\": \"test@example.com\", \"password\": \"Test123!\" },\n  \"adminUser\": { \"email\": \"admin@example.com\", \"password\": \"Admin123!\" }\n}\n\ncy.fixture('user').then((users) => {\n  cy.login(users.validUser.email, users.validUser.password)\n})\n\n7. Isolation: Reset State Before Tests\nbeforeEach(() => {\n  cy.intercept('GET', '/api/notifications', { body: [] })\n  cy.clearCookies()\n  cy.clearLocalStorage()\n  // Or: cy.task('db:seed') if using database reset\n})\n\nCommon Traps\nTrap\tConsequence\tFix\ncy.wait(ms) fixed delays\tFlaky tests, slow CI\tUse cy.intercept().as() + cy.wait('@alias')\nCSS selectors for actions\tBreak on redesign\tUse data-testid attributes\nTest interdependence\tOne failure cascades\tEach test must setup its own state\nAsserting too early\tFalse positives\tChain .should() to auto-retry\nForgetting baseUrl\tHardcoded URLs everywhere\tSet baseUrl in config\nSkipping viewport tests\tMobile bugs in prod\tAdd cy.viewport() tests\nIgnoring retry-ability\tFlaky assertions\tUse Cypress queries, not jQuery\nDebugging\nTime Travel\n\nClick any command in the Command Log to see DOM snapshot at that moment.\n\nPause and Step\ncy.get('[data-testid=\"item\"]').then(($el) => {\n  debugger  // Opens DevTools\n})\n// Or\ncy.pause()  // Pause execution, step manually\n\nConsole Debugging\ncy.get('[data-testid=\"items\"]')\n  .should('have.length.gt', 0)\n  .then(($items) => {\n    console.log('Found items:', $items.length)\n  })\n\nConfiguration\ncypress.config.ts Essentials\nimport { defineConfig } from 'cypress'\n\nexport default defineConfig({\n  e2e: {\n    baseUrl: 'http://localhost:3000',\n    viewportWidth: 1280,\n    viewportHeight: 720,\n    defaultCommandTimeout: 10000,\n    requestTimeout: 10000,\n    retries: { runMode: 2, openMode: 0 },\n    video: false,  // Enable for CI debugging\n    screenshotOnRunFailure: true,\n    setupNodeEvents(on, config) {\n      // Plugins here\n    },\n  },\n  component: {\n    devServer: {\n      framework: 'react',  // or 'vue', 'angular', etc.\n      bundler: 'vite',     // or 'webpack'\n    },\n  },\n})\n\nTypeScript Support\n// cypress/support/commands.ts\ndeclare global {\n  namespace Cypress {\n    interface Chainable {\n      login(email: string, password: string): Chainable<void>\n      getByTestId(testId: string): Chainable<JQuery<HTMLElement>>\n    }\n  }\n}\n\nCypress.Commands.add('getByTestId', (testId: string) => {\n  return cy.get(`[data-testid=\"${testId}\"]`)\n})\n\nRunning Tests\nCommand\tPurpose\nnpx cypress open\tInteractive mode\nnpx cypress run\tHeadless (CI)\nnpx cypress run --spec \"cypress/e2e/login.cy.ts\"\tSingle spec\nnpx cypress run --headed\tHeadless but visible\nnpx cypress run --browser chrome\tSpecific browser\nExternal Endpoints\n\nThis skill does not call external APIs. Cypress runs entirely locally or in your own CI environment.\n\nSecurity & Privacy\n\nData that stays local:\n\nAll test code and fixtures remain in project directory\nCypress runs locally or in your own CI environment\n\nThis skill does NOT:\n\nSend data to external services\nRequire API keys or authentication\nAccess files outside project directory\n\nNote: Cypress Cloud (optional, paid) can receive test results if configured with CYPRESS_RECORD_KEY. This skill does not configure or recommend it.\n\nRelated Skills\n\nInstall with clawhub install <slug> if user confirms:\n\nplaywright — alternative E2E framework\ntypescript — TypeScript best practices\njavascript — JS fundamentals and patterns\nreact — React component testing\nFeedback\nIf useful: clawhub star cypress\nStay updated: clawhub sync"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ivangdavila/cypress",
    "publisherUrl": "https://clawhub.ai/ivangdavila/cypress",
    "owner": "ivangdavila",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/cypress",
    "downloadUrl": "https://openagent3.xyz/downloads/cypress",
    "agentUrl": "https://openagent3.xyz/skills/cypress/agent",
    "manifestUrl": "https://openagent3.xyz/skills/cypress/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/cypress/agent.md"
  }
}