‹ 首页

cypress-docs

@cypress-io · 收录于 1 周前 · 上游提交 3 周前★ 社区精选

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.

适合你,如果正在使用Cypress进行测试开发

/ 通过 npx 安装 校验哈希
npx oh-my-skill add cypress-io/ai-toolkit/cypress-docs
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- cypress-io/ai-toolkit/cypress-docs
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify cypress-io/ai-toolkit/cypress-docs
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
36GitHub stars
~1K上下文体积 · 单文件
索引托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · 9c9038e

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)
  • https://docs.cypress.io
  • https://www.cypress.io
🤖 LLM-Optimized Docs Strategy

When accessing docs.cypress.io:

  1. Fetch /llms.txt
  1. Parse it to discover:
  2. LLM-friendly documentation paths
  3. Structured content endpoints
  1. 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.
  1. Why:
  2. Markdown / JSON format
  3. Cleaner structure
  4. Less noise than HTML
  1. Fallback:
  2. 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 Type | Search 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:
  6. Explanation
  7. Syntax
  8. Example
  9. Notes
Summary

This skill ensures:

  • Accurate answers from official sources
  • Reduced hallucination
  • Structured, high-quality outputs
  • Adaptability to evolving Cypress docs
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。