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