Cypress Docs

作者 cypress-ioda6ea17dfa67無授權條款45 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 天前更新

Search and extract Cypress information from official documentation (docs.cypress.io, cypress.io); prefer LLM markdown under /llm/* and refuse unverified API or behavior claims.

AI 產生的概覽

從官方來源檢索並引用 Cypress 測試框架文件,優先採用針對 LLM 最佳化的 Markdown 頁面。

功能
此技能引導代理從 docs.cypress.io 與 cypress.io 的官方文件查找 Cypress 的事實、API、指令、斷言、設定選項與錯誤訊息。它要求先取得 /llms.txt,優先使用 /llm/* 下的 Markdown 內容,並退回標準頁面或更新日誌。它也訂定結構化擷取與版本感知的規則,並要求拒絕陳述未經查證的 API 或行為說法。
適用情境
當任務取決於查找、閱讀或引用 Cypress 文件,而非一般測試直覺時使用。適用於事實查詢、行為確認、錯誤訊息導引,以及讓回答或範例以官方文件為依據。不適用於撰寫或修正測試,也不適用於無需查閱文件的測試解說。
執行需求
需要連線至 docs.cypress.io 與 cypress.io 的網路存取。未包含指令碼、套件或憑證;僅為指示性內容。

Cypress Documentation

Purpose

Enable the agent to retrieve accurate, up-to-date, and verifiable information about the Cypress testing framework by prioritizing official documentation and structured sources.

When to use

Apply this skill whenever the task depends on finding, reading, or quoting Cypress documentation rather than general testing intuition:

  • Look up facts: commands, APIs, assertions, lifecycle hooks, configuration options, environment variables, CLI flags, plugins, or TypeScript types as documented by Cypress.
  • Confirm behavior: how something works in a given Cypress version, E2E vs component testing differences, browser support, or networking/cy.intercept semantics.
  • Before asserting “Cypress can/cannot…”: search docs first; do not rely on memory for exact signatures, defaults, or deprecated APIs.
  • Extract structured content: follow the LLM-optimized docs strategy below (llms.txt, /llm/*) when fetching or summarizing doc pages.
  • Ground answers for others: when explaining Cypress to a user, writing examples, or reviewing code where correctness must match official docs.

If the user only needs writing or fixing tests without a documentation lookup, prefer cypress-author; if they only need test explanation without fetching docs, prefer cypress-explain. Use this skill when official documentation is the source of truth.

Source Prioritization

Primary Sources (ALWAYS search first)

🤖 LLM-Optimized Docs Strategy

When accessing docs.cypress.io:

  1. Fetch /llms.txt

  2. Parse it to discover:

    • LLM-friendly documentation paths
    • Structured content endpoints
  3. Prefer content under /llm/*. Every path on the site has an optimized version hosted under /llm - for example, https://docs.cypress.io/app/faq is available at https://docs.cypress.io/llm/markdown/app/faq.md.

  4. Why:

    • Markdown / JSON format
    • Cleaner structure
    • Less noise than HTML
  5. Fallback:

    • If /llm/* is incomplete, use standard docs pages

Critical Rules

Never Assume Missing Features

  • NEVER assume Cypress does not support a feature
  • ALWAYS search before concluding
  • Retry with alternate terminology if needed

Anti-Hallucination Guard

If documentation cannot verify a claim:

  • Say: "I could not verify this in Cypress docs"
  • Provide closest supported alternative (if available)
  • DO NOT invent APIs or behavior

Search Strategy

1. Classify the Query

Query TypeSearch Location
How do I.../guides/, /core-concepts/
What is.../core-concepts/
API / Commands/api/commands/
Assertions/api/assertions/
Config issues/configuration/
CI/CD/guides/ci-cd/
Errors/references/error-messages/

2. Search Flow

  1. /llm/* (via /llms.txt)
  2. Standard docs pages
  3. /changelog/
  4. cypress.io (blog, updates)

3. Error-Aware Routing

If the query includes:

  • Error messages
  • Stack traces

Then:

  1. Search /references/error-messages
  2. Expand to guides and API docs

Structured Extraction Rules

Commands

  • Syntax
  • Required arguments
  • Optional options
  • Return behavior
  • Example usage

Concepts

  • Definition
  • Key rules
  • Common pitfalls
  • Example

Configuration

  • Option name
  • Type
  • Default value
  • Example

Version Awareness

  • Detect Cypress version if provided
  • If NOT provided: assume latest stable version
  • If behavior differs by version:
    • Explicitly call it out

Response Style Guidelines

  • Prefer official examples
  • Provide working code snippets
  • Keep answers concise but complete
  • Avoid speculation

Caching Strategy (Optional)

Cache frequently used topics:

  • cy.visit
  • cy.get
  • cy.intercept
  • authentication patterns
  • common configuration

Confidence Annotation

Internally assess confidence:

  • High → Direct match in official docs
  • Medium → Inferred from multiple sources
  • Low → Unclear or edge case

If LOW:

  • Clearly communicate uncertainty

LLM Path Auto-Discovery

  • Always parse /llms.txt
  • Dynamically adapt to:
    • New /llm/* paths
    • Updated documentation formats

Safety Rules

  • NEVER invent Cypress APIs
  • NEVER guess syntax
  • ALWAYS verify behavior
  • Prefer "unknown" over incorrect

Example Behavior

User: "How do I mock API requests in Cypress?"

Agent should:

  1. Classify → API / network
  2. Search /llm/markdown/api/ and /llm/markdown/guides/
  3. Identify cy.intercept
  4. Extract structured details
  5. Return:
    • Explanation
    • Syntax
    • Example
    • Notes

Summary

This skill ensures:

  • Accurate answers from official sources
  • Reduced hallucination
  • Structured, high-quality outputs
  • Adaptability to evolving Cypress docs

來源與署名

來源:cypress-io/ai-toolkit位於skills/cypress-docs提交da6ea17

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架