fix-e2e-tests
Fix E2E Tests
Given a wp-calypso PR number, this skill identifies the failing E2E test(s) in that PR's CI run, asks the Playwright Test Healer agent to generate a fix, and opens a fix PR back against the original PR's branch so CI validates the repair.
Before touching anything else, the skill verifies that the two required tools are working: the GitHub CLI (used to read PR metadata and checks) and a TeamCity access token (used to fetch which individual tests failed, since GitHub's commit-status description only says "build failed"). If either isn't set up, the skill walks the user through configuring it.
Before each step, tell the user in one short sentence what you're about to do and why, so they aren't surprised by a Bash call or a follow-up setup request.
Step 1: Verify GitHub CLI access
The skill uses gh (the GitHub CLI command, from https://cli.github.com/) to read PR metadata and check runs. Confirm gh is installed and its stored token actually works — gh auth status alone is not enough, as it can report success while the keyring token is stale and every API call returns 401.
Announce what you're checking (e.g., "Checking that the gh CLI is installed and authenticated — the skill uses it to read PR checks."), then run the probe as one Bash call. The API probe (gh api user) is the authoritative check; it fails non-zero on a bad or missing token.
if ! command -v gh >/dev/null 2>&1; then
echo "GH_MISSING"
elif login=$(gh api user --jq .login 2>/dev/null) && [ -n "$login" ]; then
echo "GH_OK $login"
More from automattic/wp-calypso
dashboard-create-screen
Create a new screen in the Multi-site Dashboard with automatic route registration
55help-center-ui-test
Run a browser-based UI review of the WordPress.com Help Center across multiple surfaces, looking for visual and behavioral issues. Use when asked to test the Help Center UI.
6calypso-react-query-migration
Use when editing or migrating Calypso Reader data-fetching code — `client/components/data/query-reader-*` components, `@automattic/data-stores` Reader hooks, or new Reader queries/mutations. Triggers on any work involving `api-core`, `api-queries`, `dispatchRequest`, `READER_*_REQUEST` actions, or Redux `isRequesting*` selectors in the Reader.
1