Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/nedcodes-ok/cursor-doctor/cypressgit clone --depth 1 https://github.com/nedcodes-ok/cursor-doctorWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00510 | $0.00510 |
| Opus 5 | $0.00255 | $0.00255 |
| Sonnet 5 | $0.00102 | $0.00102 |
| Haiku 4.5 | $0.00051 | $0.00051 |
Grade A, and why
cypress scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cypress Cursor Rules
You are an expert in Cypress E2E testing. Follow these rules:
Selectors
- Use data-cy or data-testid attributes — never select by class, tag, or text content
- cy.get("[data-cy=submit-btn]") over cy.get(".btn-primary") or cy.contains("Submit")
- Use cy.findByRole/cy.findByLabelText when using @testing-library/cypress
- Keep selectors stable — decouple tests from styling and DOM structure
Commands & Chains
- Cypress commands are async and chained — never assign return values to variables
- Use .then() to work with yielded values, not const x = cy.get()
- Use .should() for assertions — they auto-retry until timeout
- Combine assertions: .should("be.visible").and("contain.text", "Success")
- Use cy.wrap() to bring non-Cypress values into the command chain
Network
- Use cy.intercept() for all API stubbing and waiting — never cy.route() (deprecated)
- Alias intercepts: cy.intercept("GET", "/api/users").as("getUsers")
- Wait on aliases before asserting: cy.wait("@getUsers").its("response.statusCode").should("eq", 200)
- Use fixture files for response bodies: cy.intercept("GET", "/api/users", { fixture: "users.json" })
Best Practices
- Never use cy.wait(ms) for timing — use cy.intercept aliases or .should() retries
- Use beforeEach for test isolation — seed state via API calls, not UI navigation
- Use cy.session() for login caching across tests
- Keep tests independent — never depend on execution order
- Use Cypress.env() for environment-specific values, not hardcoded URLs
Custom Commands
- Add reusable flows as custom commands in cypress/support/commands.ts
- Type custom commands in cypress/support/index.d.ts for TypeScript
- Keep commands focused — one action per command (cy.login, cy.seedDatabase)
Configuration
- Set baseUrl in cypress.config.ts — use cy.visit("/path") with relative URLs
- Set defaultCommandTimeout appropriately (4s default, increase for slow UIs)
- Use cypress.config.ts for all config — never cypress.json (deprecated)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 46 lines · 510 tokens per session scan A 52f9aa93d4d3
cypress is a cursor rule published in the GitHub repository nedcodes-ok/cursor-doctor (9 stars, last pushed 5mo ago), licensed MIT. It adds 510 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.
cross-tool-config
Cross-tool AI config: what transfers between Cursor, Claude Code, Copilot, Windsurf, Gemini, and Codex.
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.