Playwright E2E Testing
fugazi/test-automation-skills-agents
Author and maintain versioned Playwright (@playwright/test) TypeScript UI specs for browser user flows.
Collects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes.
$ npx skills add andrewyng/context-hub --skill login-flows -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install andrewyng/context-hub login-flows --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/content/playwright-community/skills/login-flows .claude/skills/login-flows && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "login-flows" agent skill from https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows into .claude/skills/login-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "login-flows", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flowsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add andrewyng/context-hub --skill login-flows -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install andrewyng/context-hub login-flows --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .agents/skills && cp -r skills-src/content/playwright-community/skills/login-flows .agents/skills/login-flows && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "login-flows" agent skill from https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows into .agents/skills/login-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "login-flows", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add andrewyng/context-hub --skill login-flows -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install andrewyng/context-hub login-flows --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/content/playwright-community/skills/login-flows .cursor/skills/login-flows && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "login-flows" agent skill from https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows into .cursor/skills/login-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "login-flows", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/andrewyng/context-hub.git --path content/playwright-community/skills/login-flows--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add andrewyng/context-hub --skill login-flows -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install andrewyng/context-hub login-flows --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/content/playwright-community/skills/login-flows .gemini/skills/login-flows && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "login-flows" agent skill from https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows into .gemini/skills/login-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "login-flows", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install andrewyng/context-hub login-flowsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add andrewyng/context-hub --skill login-flows -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .github/skills && cp -r skills-src/content/playwright-community/skills/login-flows .github/skills/login-flows && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "login-flows" agent skill from https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows into .github/skills/login-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "login-flows", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add andrewyng/context-hub --skill login-flows -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install andrewyng/context-hub login-flows --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/andrewyng/context-hub.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/content/playwright-community/skills/login-flows .opencode/skills/login-flows && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "login-flows" agent skill from https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows into .opencode/skills/login-flows/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "login-flows", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
login-flowsCollects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes.
The skill gives ready-made TypeScript snippets for the login step of browser tests. It covers a plain username and password helper, an OAuth or SSO flow that clicks through to an outside provider such as Google, and a TOTP two-factor helper built on the otplib package.
To avoid logging in before every test, it shows how to save the browser's storageState in a global setup file that runs once and how to point playwright.config.ts at that file. A few tips close it out: keep credentials in environment variables, use a dedicated test user in CI, and wait for the post-login URL with waitForURL instead of fixed timeouts.
Read from SKILL.md and the folder at commit 67dcbeb. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
TEST_PASSWORDFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Playwright Login Flows loads about 715 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 99 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from andrewyng/context-hub at commit 67dcbeb, republished under its MIT licence (© andrewyng). 99 words, ~715 tokens.
.claude/skills/login-flows/SKILL.md (or your agent's skills folder).Reusable patterns for automating login flows in end-to-end tests.
import { Page } from '@playwright/test';
async function login(page: Page, username: string, password: string) {
await page.goto('/login');
await page.fill('[name="username"]', username);
await page.fill('[name="password"]', password);
await page.click('button[type="submit"]');
await page.waitForURL('/dashboard');
}For OAuth flows that redirect to an external provider:
async function loginWithOAuth(page: Page) {
await page.goto('/login');
await page.click('text=Sign in with Google');
// Handle the OAuth popup or redirect
await page.fill('input[type="email"]', process.env.TEST_EMAIL!);
await page.click('text=Next');
await page.fill('input[type="password"]', process.env.TEST_PASSWORD!);
await page.click('text=Next');
// Wait for redirect back to app
await page.waitForURL('**/dashboard');
}Avoid logging in before every test by saving and reusing browser state:
// global-setup.ts — runs once before all tests
import { chromium } from '@playwright/test';
async function globalSetup() {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('/login');
await page.fill('[name="username"]', 'testuser');
await page.fill('[name="password"]', 'testpass');
await page.click('button[type="submit"]');
await page.waitForURL('/dashboard');
// Save signed-in state
await page.context().storageState({ path: './auth.json' });
await browser.close();
}
export default globalSetup;Then in playwright.config.ts:
export default defineConfig({
globalSetup: './global-setup.ts',
use: {
storageState: './auth.json',
},
});For test environments with TOTP-based 2FA:
import { authenticator } from 'otplib';
async function loginWithMFA(page: Page, secret: string) {
await login(page, 'user', 'pass');
// Generate TOTP code
const code = authenticator.generate(secret);
await page.fill('[name="totp"]', code);
await page.click('button[type="submit"]');
await page.waitForURL('/dashboard');
}storageState to avoid repeated logins — it's the single biggest speedup for E2E suitespage.waitForURL() instead of arbitrary waitForTimeout() after login© andrewyng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in content/playwright-community/skills/login-flows of andrewyng/context-hub.
Open the folder on GitHubat commit 67dcbeb
Playwright Login Flows next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Playwright Login Flows this skillandrewyng/context-hub | 14k | — | ~715 | Automated safety check: Pass | MIT | |
| Playwright E2E Testingfugazi/test-automation-skills-agents | 247 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Playwrightsecondsky/claude-skills | 227 | — | ~3.7k | Automated safety check: Notes | MIT | |
| RStudio Selenium to Playwright Migrationrstudio/rstudio | 5.1k | — | ~3.6k | Automated safety check: Pass | Custom licence | |
| Playwright Coretestdino-hq/playwright-skill | 390 | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Svelte Testingspences10/sveltest | 113 | — | ~579 | Automated safety check: Pass | MIT |
fugazi/test-automation-skills-agents
Author and maintain versioned Playwright (@playwright/test) TypeScript UI specs for browser user flows.
secondsky/claude-skills
Browser automation and E2E testing with Playwright. An agent skill from secondsky/claude-skills.
rstudio/rstudio
Converts RStudio Python Selenium electron tests into TypeScript Playwright tests, checking each against a live RStudio before counting it as migrated.
testdino-hq/playwright-skill
Battle-tested Playwright patterns for writing and debugging reliable E2E, API, component, visual, accessibility, and security tests.
spences10/sveltest
Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.
JasonHonKL/Openbrowser
A skill your agent uses whenever the task involves browsing web pages, extracting page content, clicking forms, or completing web workflows.
andrewyng/context-hub
Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.
andrewyng/context-hub
Guides building Tavily integrations for web search, URL extraction, site crawling and AI-assisted research in Python or JavaScript agent and RAG projects.
andrewyng/context-hub
Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.
andrewyng/context-hub
Sequences parts-mcp tool calls for finding, pricing and checking availability of electronic components, including BOM processing and datasheet navigation.
andrewyng/context-hub
Adds Olakai monitoring to an existing LLM application with minimal code changes, then configures custom KPIs so the dashboard tracks business outcomes instead of just token counts.
andrewyng/context-hub
Builds a new AI agent with Olakai monitoring from the start: CLI login, SDK integration, per-agent KPI configuration and an end-to-end check that data flows.
Works with
Categories
Collects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes. The skill gives ready-made TypeScript snippets for the login step of browser tests. It covers a plain username and password helper, an OAuth or SSO flow that clicks through to an outside provider such as Google, and a TOTP two-factor helper built on the otplib package.
Playwright Login Flows fits situations like: writing end-to-end tests for pages behind a login; speeding up a Playwright suite that logs in before every test; testing OAuth or SSO sign-in against a test environment; handling TOTP two-factor prompts in automated tests.
Run `npx skills add andrewyng/context-hub --skill login-flows -a claude-code`. Or copy the skill folder (content/playwright-community/skills/login-flows in andrewyng/context-hub) into .claude/skills/login-flows in your project. Claude Code loads it when a task matches its description.
Run `npx skills add andrewyng/context-hub --skill login-flows -a codex`. Or copy the skill folder (content/playwright-community/skills/login-flows in andrewyng/context-hub) into .agents/skills/login-flows in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add andrewyng/context-hub --skill login-flows -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/login-flows, .gemini/skills/login-flows, .github/skills/login-flows and .opencode/skills/login-flows in your project.
Going by SKILL.md and its folder, Playwright Login Flows needs credentials named TEST_PASSWORD. Our summary lists: Playwright Test with TypeScript; otplib, for TOTP-based two-factor logins; A test user or test environment to sign in to.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Playwright Login Flows is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 715 tokens (SKILL.md is roughly 2.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Playwright Login Flows: Playwright E2E Testing (fugazi/test-automation-skills-agents, 247 stars), Playwright (secondsky/claude-skills, 227 stars), RStudio Selenium to Playwright Migration (rstudio/rstudio, 5.1k stars) and Playwright Core (testdino-hq/playwright-skill, 390 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
andrewyng (a GitHub user) maintains it in andrewyng/context-hub, which has 13,975 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on May 31, 2026.
Source: andrewyng/context-hub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.