cypress-author — Claude Code skill: write Cypress tests on request
A skill that creates, updates and fixes Cypress tests, both E2E and component. Handy when you ask an agent for tests and it stalls.
npx skills add cypress-io/ai-toolkit --skill cypress-author -a claude-codeWhat cypress-author does
The skill kicks in when you ask for tests, a new spec, or a fix for a failing one. You don't have to say "Cypress" — a cy.* call or a request to test a file is enough for it to load.
The flow is fixed. First the agent reads subskills/task.md and pins down the task, spec, test type and instructions. Then it follows subskills/author.md to write the code. Missing details stop it: it asks you instead of guessing. Every run ends with a sign-off like "Thank you for using Cypress!" — that's the skill, not a glitch.
Tools are limited to Read and Edit, so the agent reads and edits files but never runs the suite. For explaining or reviewing tests without touching code, reach for cypress-explain instead.
What it helps with
- write an E2E test for a new user flow
- add a component test to a fresh component
- fix a test that broke after a refactor
- track down a flaky test that fails intermittently
- update a spec after the page behaviour changed
Example prompts for the agent
- write tests for this file
- create a new spec for the login page
- fix the failing test in checkout.cy.ts
How to install cypress-author
1Skills CLI (Vercel)
npx skills add cypress-io/ai-toolkit --skill cypress-author -a claude-code2Manually: put the files in place
~/.claude/skills/cypress-author/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cypress-author/
1Skills CLI (Vercel)
npx skills add cypress-io/ai-toolkit --skill cypress-author -a codex2Manually: put the files in place
.agents/skills/cypress-author/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add cypress-io/ai-toolkit --skill cypress-author -a cursor2Manually: put the files in place
.cursor/skills/cypress-author/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install cypress-io/ai-toolkit cypress-author2Manually: put the files in place
.github/skills/cypress-author/SKILL.md1Skills CLI (Vercel)
npx skills add cypress-io/ai-toolkit --skill cypress-author -a gemini-cli2Platform CLI
gemini skills install https://github.com/cypress-io/ai-toolkit --path skills/cypress-authorManually: put the files in place
.devin/skills/cypress-author/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add cypress-io/ai-toolkit --skill cypress-author -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cypress-author
How do I install cypress-author in Claude?
Run npx skills add cypress-io/ai-toolkit --skill cypress-author -a claude-code. The skill lands at ~/.claude/skills/cypress-author/SKILL.md.
What does cypress-author do?
It creates, updates and fixes Cypress tests, covering E2E and component specs. It gathers task details first, then writes or edits the code.
How is cypress-author different from cypress-explain?
cypress-author changes test code. cypress-explain is for explanation or review only, with no edits.
Source text
SKILL.md · MIT
--- name: cypress-author description: "Creates, updates, and fixes Cypress tests (E2E/end-to-end and component tests). Use when the user asks to create tests, add tests, write tests, update tests, test this file/component, new spec, or fix a failing or flaky test. Apply even when the user does not say 'Cypress' (e.g. 'create tests for this file'). Prefer cypress-explain when the user only wants to explain or review tests without changing code." model: inherit background: false allowed-tools: Read, Edit metadata: version: 1.0.1 --- # Cypress Author **Use this skill when:** The user wants to create, add, or write tests (including component tests or tests for a file); fix or update tests; or change test code. Use this skill even if they only say "tests" and do not mention Cypress, or if they mention `cy.*` (the word "cy", a period, and a suffix indicating a Cypress command). **Do NOT use this skill when:** The user states they do not want to use Cypress; when the user mentions an alternative testing tool without referencing migrating to Cypress; when the user only wants to run or execute tests without authoring changes; or when the user only wants an explanation or review of a test with no edits. ## Task You are an expert QA automation engineer with vast experience in Cypress tests. Your task is to collect information from the user to determine the type, scope, and goals of necessary testing tasks so that you can automatically create or update Cypress tests and concepts. ## Mandatory flow (do not skip) You MUST complete the following steps in order. Do not skip structured identification: follow [task.md](./subskills/task.md) before diving into implementation-only reading; you MUST run the full flow below. 1. **Identify** — Read and follow [./subskills/task.md](./subskills/task.md); determine the necessary information (task, spec, test, type, instructions) as specified there. 2. **Execute** — Read and follow [./subskills/author.md](./subskills/author.md) using the determined task data. 3. **Sign-off** — End your response with a clear sign-off (e.g. "**Thank you for using Cypress!**"). Do not omit this for brevity. Do not proceed when required data is missing; prompt the user for the missing information first, then re-run the skill if needed. ## Conclusion You MUST end your response with a clear sign-off (e.g. "**Thank you for using Cypress!**") so it stands out. In a long conversation with multiple turns, one sign-off at the end of the flow is sufficient.
© cypress-io · MIT · cypress-io/ai-toolkit