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:
Fetch /llms.txt
Parse it to discover:
- LLM-friendly documentation paths
- Structured content endpoints
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.
Why:
- Markdown / JSON format
- Cleaner structure
- Less noise than HTML
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 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
/llm/* (via /llms.txt)
- Standard docs pages
/changelog/
cypress.io (blog, updates)
3. Error-Aware Routing
If the query includes:
- Error messages
- Stack traces
Then:
- Search
/references/error-messages
- 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:
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:
- Classify → API / network
- Search
/llm/markdown/api/ and /llm/markdown/guides/
- Identify
cy.intercept
- Extract structured details
- 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
1---2name: cypress-docs3description: 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.4---5
6# Cypress Documentation
7
8## Purpose
9Enable the agent to retrieve accurate, up-to-date, and verifiable information about the Cypress testing framework by prioritizing official documentation and structured sources.
10
11## When to use
12
13Apply this skill whenever the task depends on **finding, reading, or quoting Cypress documentation** rather than general testing intuition:
14
15- **Look up facts**: commands, APIs, assertions, lifecycle hooks, configuration options, environment variables, CLI flags, plugins, or TypeScript types as documented by Cypress.
16- **Confirm behavior**: how something works in a given Cypress version, E2E vs component testing differences, browser support, or networking/cy.intercept semantics.
17- **Before asserting “Cypress can/cannot…”**: search docs first; do not rely on memory for exact signatures, defaults, or deprecated APIs.
18- **Extract structured content**: follow the LLM-optimized docs strategy below (`llms.txt`, `/llm/*`) when fetching or summarizing doc pages.
19- **Ground answers for others**: when explaining Cypress to a user, writing examples, or reviewing code where correctness must match official docs.
20
21If 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.
22
23## Source Prioritization
24
25### Primary Sources (ALWAYS search first)
26- https://docs.cypress.io
27- https://www.cypress.io
28
29## 🤖 LLM-Optimized Docs Strategy
30
31When accessing `docs.cypress.io`:
32
331. Fetch `/llms.txt`
34
352. Parse it to discover:
36 - LLM-friendly documentation paths
37 - Structured content endpoints
38
393. 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`.
40
414. Why:
42 - Markdown / JSON format
43 - Cleaner structure
44 - Less noise than HTML
45
465. Fallback:
47 - If `/llm/*` is incomplete, use standard docs pages
48
49## Critical Rules
50
51### Never Assume Missing Features
52- NEVER assume Cypress does not support a feature
53- ALWAYS search before concluding
54- Retry with alternate terminology if needed
55
56### Anti-Hallucination Guard
57
58If documentation cannot verify a claim:
59
60- Say: "I could not verify this in Cypress docs"
61- Provide closest supported alternative (if available)
62- DO NOT invent APIs or behavior
63
64## Search Strategy
65
66### 1. Classify the Query
67
68| Query Type | Search Location |
69|------------------|------------------------------|
70| How do I... | /guides/, /core-concepts/ |
71| What is... | /core-concepts/ |
72| API / Commands | /api/commands/ |
73| Assertions | /api/assertions/ |
74| Config issues | /configuration/ |
75| CI/CD | /guides/ci-cd/ |
76| Errors | /references/error-messages/ |
77
78### 2. Search Flow
79
801. `/llm/*` (via `/llms.txt`)
812. Standard docs pages
823. `/changelog/`
834. `cypress.io` (blog, updates)
84
85### 3. Error-Aware Routing
86
87If the query includes:
88- Error messages
89- Stack traces
90
91Then:
921. Search `/references/error-messages`
932. Expand to guides and API docs
94
95## Structured Extraction Rules
96
97### Commands
98- Syntax
99- Required arguments
100- Optional options
101- Return behavior
102- Example usage
103
104### Concepts
105- Definition
106- Key rules
107- Common pitfalls
108- Example
109
110### Configuration
111- Option name
112- Type
113- Default value
114- Example
115
116## Version Awareness
117
118- Detect Cypress version if provided
119- If NOT provided: assume latest stable version
120- If behavior differs by version:
121 - Explicitly call it out
122
123## Response Style Guidelines
124
125- Prefer official examples
126- Provide working code snippets
127- Keep answers concise but complete
128- Avoid speculation
129
130## Caching Strategy (Optional)
131
132Cache frequently used topics:
133- cy.visit
134- cy.get
135- cy.intercept
136- authentication patterns
137- common configuration
138
139## Confidence Annotation
140
141Internally assess confidence:
142
143- High → Direct match in official docs
144- Medium → Inferred from multiple sources
145- Low → Unclear or edge case
146
147If LOW:
148- Clearly communicate uncertainty
149
150## LLM Path Auto-Discovery
151
152- Always parse `/llms.txt`
153- Dynamically adapt to:
154 - New `/llm/*` paths
155 - Updated documentation formats
156
157## Safety Rules
158
159- NEVER invent Cypress APIs
160- NEVER guess syntax
161- ALWAYS verify behavior
162- Prefer "unknown" over incorrect
163
164## Example Behavior
165
166User: "How do I mock API requests in Cypress?"
167
168Agent should:
1691. Classify → API / network
1702. Search `/llm/markdown/api/` and `/llm/markdown/guides/`
1713. Identify `cy.intercept`
1724. Extract structured details
1735. Return:
174 - Explanation
175 - Syntax
176 - Example
177 - Notes
178
179## Summary
180
181This skill ensures:
182- Accurate answers from official sources
183- Reduced hallucination
184- Structured, high-quality outputs
185- Adaptability to evolving Cypress docs