acquire-codebase-knowl…
Use this skill when the user explicitly asks to map, document, or onboard into an existing…
Find and fix flake-prone anti-patterns in an existing Cypress suite, and APIs removed in Cypress 12 to 16. Bundles a zero-dependency scanner for fixed cy.wait() delays, assigned command return values, async/await, force: true, chaining after actions, one-shot expect() inside
$ npx -y skills add github/awesome-copilot --skill cypress-flake-fixer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cypress-flake-fixerContext preview
The summary Claude sees to decide when to auto-load this skill.
Find and fix flake-prone anti-patterns in an existing Cypress suite, and APIs removed in Cypress 12 to 16. Bundles a zero-dependency scanner for fixed cy.wait() delays, assigned command return values, async/await, force: true, chaining after actions, one-shot expect() inside
name: cypress-flake-fixer description: 'Find and fix flake-prone anti-patterns in an existing Cypress suite, and APIs removed in Cypress 12 to 16. Bundles a zero-dependency scanner for fixed cy.wait() delays, assigned command return values, async/await, force: true, chaining after actions, one-shot expect() inside .then(), conditional testing, and removed APIs such as Cypress.env(), cy.exec(), cy.server()/cy.route(). Use when asked to fix flaky Cypress tests, remove cy.wait, stabilize or harden a Cypress suite, audit Cypress specs, debug "detached from the DOM" errors, or prepare an upgrade to Cypress 15 or 16.'
Audit an existing Cypress suite for the code patterns that cause intermittent failures, then fix them without hiding the problem behind retries, longer timeouts, or `force: true`.
For writing new Cypress tests from scratch, coding standards are enough. This skill is for diagnosing and repairing an existing suite.
node ./scripts/scan-cypress.mjs <project-root> node ./scripts/scan-cypress.mjs <project-root> --json # machine-readable node ./scripts/scan-cypress.mjs <project-root> --strict # add low-confidence rules node ./scripts/scan-cypress.mjs cypress/e2e/checkout.cy.ts # one file
The scanner reads the Cypress version from the nearest `package.json` and grades removed APIs as `error` when the installed major already rejects them and `warn` when they break on upgrade. Run `--list-rules` for the catalog.
Findings are heuristic. Open each location and confirm before editing.
When the goal is to fix a specific flaky spec, record how often it fails first. Without a baseline there is no way to tell a fix from luck.
for i in $(seq 1 20); do npx cypress run --spec "cypress/e2e/checkout.cy.ts" --quiet || echo "FAIL $i"; done
A spec that fails 1 run in 10 needs about 30 clean runs after the fix before the fix is believable.
| Order | Rules | Why first | |---|---|---| | 1 | CY002, CY003, CY007 graded `error` | The test is wrong or already broken; other fixes build on correct command flow | | 2 | CY001, intercept ordering | Time-based waits are the largest single source of flake | | 3 | CY005, CY006 | Broken retry-ability causes detached-DOM and one-shot assertion failures | | 4 | CY004 | `force: true` hides a real overlap, animation, or disabled state | | 5 | CY008, CY010, CY012 | State leaks and order dependence | | 6 | CY013, CY101, CY102 | Selector and assertion hygiene |
Before-and-after code for every rule is in [references/anti-patterns.md](./references/anti-patterns.md). Replacements for removed APIs are in [references/removed-apis.md](./references/removed-apis.md). Read the section for the rule being fixed; do not load both files upfront.
Do not delete a `cy.wait(n)` or swap it for a guess. Work out what the delay covered:
| The wait covered | Replace with | |---|---| | A network request | `cy.intercept(...).as('x')` registered before the trigger, then `cy.wait('@x')` | | A render that follows a request or state change | A `.should()` on the DOM that results | | A debounce, throttle, polling interval, or toast timeout | `cy.clock()` before `cy.visit()`, then `cy.tick(ms)` | | A CSS animation or transition | An assertion on the final state; Cypress already waits for the element to stop moving before acting | | Client-side hydration of server-rendered HTML | A signal the app sets when hydration finishes (see Gotchas) | | Unknown | Run the test in `npx cypress open`, select the wait in the Command Log, and read which requests and DOM changes happened during it |
1. Run the changed spec alone, then repeat it at least as many times as the baseline run. 2. Rerun the scanner and compare counts per rule. 3. Run the full suite once to catch order dependence exposed by the change.
A community-created collection of custom agents, instructions, skills, hooks, workflows, and plugins to supercharge your GitHub Copilot experience.
Repo: github/awesome-copilot
Use this skill when the user explicitly asks to map, document, or onboard into an existing…
Run the AgentRC readiness assessment on the current repository and produce a static HTML…
Generate tailored AI agent instruction files via AgentRC instructions command. Produces…
Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring…
Use this skill when the user shares ad campaign performance data and asks what to cut, scale,…
Add educational comments to the file specified, or prompt asking for file to comment if one…