Testing Patterns
softspark/ai-toolkit
Testing strategy: pyramid, AAA, mocks/fakes/stubs, flaky tests, coverage.
Safe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification.
$ npx skills add idavidov13/agentic-playwright --skill refactor-values -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install idavidov13/agentic-playwright refactor-values --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/idavidov13/agentic-playwright.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/refactor-values .claude/skills/refactor-values && 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 "refactor-values" agent skill from https://github.com/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-values into .claude/skills/refactor-values/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-values", 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/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-valuesType 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 idavidov13/agentic-playwright --skill refactor-values -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install idavidov13/agentic-playwright refactor-values --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/idavidov13/agentic-playwright.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/refactor-values .agents/skills/refactor-values && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refactor-values" agent skill from https://github.com/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-values into .agents/skills/refactor-values/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-values", 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 idavidov13/agentic-playwright --skill refactor-values -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install idavidov13/agentic-playwright refactor-values --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/idavidov13/agentic-playwright.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/refactor-values .cursor/skills/refactor-values && 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 "refactor-values" agent skill from https://github.com/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-values into .cursor/skills/refactor-values/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-values", 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/idavidov13/agentic-playwright.git --path .claude/skills/refactor-values--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 idavidov13/agentic-playwright --skill refactor-values -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install idavidov13/agentic-playwright refactor-values --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/idavidov13/agentic-playwright.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/refactor-values .gemini/skills/refactor-values && 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 "refactor-values" agent skill from https://github.com/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-values into .gemini/skills/refactor-values/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-values", 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 idavidov13/agentic-playwright refactor-valuesInstalls 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 idavidov13/agentic-playwright --skill refactor-values -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/idavidov13/agentic-playwright.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/refactor-values .github/skills/refactor-values && 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 "refactor-values" agent skill from https://github.com/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-values into .github/skills/refactor-values/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-values", 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 idavidov13/agentic-playwright --skill refactor-values -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install idavidov13/agentic-playwright refactor-values --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/idavidov13/agentic-playwright.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/refactor-values .opencode/skills/refactor-values && 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 "refactor-values" agent skill from https://github.com/idavidov13/agentic-playwright/tree/main/.claude/skills/refactor-values into .opencode/skills/refactor-values/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-values", 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.
refactor-valuesSafe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification.
Refactor Values is an agent skill from idavidov13/agentic-playwright. Safe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification. Use BEFORE changing any enum member's string value (ApiEndpoints., Messages., Roles, StorageStatePaths), renaming any enum key, or editing any existing file under test-data/static/. Running this workflow prevents silent test failures, TypeScript errors from stale imports, and assertion drift from hardcoded strings that bypass the enum. For defining…
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples.md` and `references/troubleshooting.md`).
It sits in Testing & QA, covering Refactoring, Test data and fixtures and Failing and flaky tests. It works with TypeScript and Playwright. The repository describes itself as: Production-grade Playwright + TypeScript Scaffold for Agentic Testing. Harness for all major AI coding agents baked in. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit f6cbf35. 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.
Shell commands in SKILL.md call:
npxrgFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Refactor Values loads about 2.3k tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 160 tokens; SKILL.md has 806 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 idavidov13/agentic-playwright at commit f6cbf35, republished under its MIT licence (© idavidov13). 806 words, ~2,332 tokens.
.claude/skills/refactor-values/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Messages.LOGIN_ERROR) and the raw string value ('Invalid email or password'). Some consumers may have bypassed the enum and hardcoded the string — they won't update when you change the enum.z.literal / z.enum) to make an updated value pass. Update the schema to match the new value; the schema is the contract.npx tsc --noEmit + npx eslint . + the affected tests before concluding the refactor. TypeScript catches key renames; eslint catches stale patterns; tests catch assertion drift.Search the entire codebase for every occurrence of both:
Use rg (ripgrep) when available — faster and more ergonomic — or grep -r as a universal fallback:
# Find all usages of the enum key
rg "Messages.LOGIN_ERROR" .
grep -r "Messages.LOGIN_ERROR" .
# Find all usages of the raw string value
rg "Invalid email or password" .
grep -r "Invalid email or password" .
# For endpoint changes, search both
rg "ApiEndpoints.LOGIN" .
rg "'/api/users/login'" .Do this before making any edits. Understand the full blast radius first. Expect matches in
.ts,.tsx,.md(skill files, README, CHANGELOG), and.json(Playwright reports — ignore).
Pick the table that matches the change you are making.
For enum string-value changes (changing what the member resolves to):
| Consumer Type | What to Check | Action Required |
|---|---|---|
Tests with toHaveText() / toBeVisible() using the old raw value | Will fail if hardcoded | Update to use enum or new value |
Page object locators using getByText(Messages.X) | Auto-updated via enum | No change needed — enum reference already correct |
Zod schemas with z.literal('old-value') or z.enum([..., 'old-value']) | Will reject new value | Update literal/enum to new value |
API endpoint paths in apiRequest calls | Will call wrong URL | Update enum reference or hardcoded path |
Static data in test-data/static/*.ts using the old string as expected value | Test data mismatch | Update the as const entry |
| Other enum members that derive from this value | Indirect breakage | Audit and update |
For enum key renames (e.g., LOGIN_ERROR → AUTH_FAILURE):
| Consumer Type | What to Check | Action Required |
|---|---|---|
| Every file importing and using the old key | TypeScript compile error | Rename key reference in every file |
| Re-exports or barrel files | May silently pass at runtime | Check index.ts files |
| Documentation / skill files referring to the old name | Reader confusion | Update .md files too |
For static data value changes (editing a file in test-data/static/*.ts):
| Consumer Type | What to Check | Action Required |
|---|---|---|
Tests importing the named as const export and looping over it | May use the changed value in an assertion | Verify test assertions still match new data |
| Tests asserting against a specific value from the file directly | Will fail | Update hardcoded expected value in the test |
| Enum members mirroring the static-data string | Out of sync | Update the matching enum member |
Update the source (enum or static-data file) and all consumers in one pass. Never leave an intermediate broken state where the value is changed but consumers still reference the old value.
Recommended order:
as const entry in the static-data file.# 1. TypeScript -- catches key renames and type mismatches
npx tsc --noEmit
# 2. Lint
npx eslint .
# 3. Run tests that use the changed value (adjust grep pattern)
npx playwright test --grep "@api"Notes on npx playwright test --grep:
@smoke, @api, etc.) and against test titles. Use the most specific filter.--grep.If any test fails, trace the failure back to a missed consumer from Phase 1 and update it.
// ANTI-PATTERN 1 -- string value changed but test still hardcodes old value
export enum Messages {
LOGIN_ERROR = 'Incorrect credentials. Please try again.', // updated
}
// This test now fails silently -- old string no longer matches the UI:
await expect(page.getByText('Invalid email or password')).toBeVisible(); // STALE// ANTI-PATTERN 2 -- enum key renamed but not all usages updated
// File A: updated ✅
Messages.AUTH_FAILURE;
// File B: still using old key -- TypeScript error (caught by tsc --noEmit)
Messages.LOGIN_ERROR; // ❌ Property 'LOGIN_ERROR' does not exist// ANTI-PATTERN 3 -- static data changed but assertion not updated
// test-data/static/app/invalidCredentials.ts was updated with a new password
// but the test still asserts the old password is present in the response
expect(response.password).toBe('WrongPassword123!'); // ❌ stale assertion// ANTI-PATTERN 4 -- Zod schema loosened to "fix" a drift
// BEFORE
role: z.literal('admin'),
// WRONG -- hides future drift instead of tracking the contract
role: z.string(),
// CORRECT -- update the literal to the new value (or switch to z.enum([...])
// if multiple values are valid)
role: z.literal('administrator'),enums skill — enum conventions, organization, and how to define NEW enums (this skill covers CHANGING existing ones).data-strategy skill — static data file structure (.ts with as const exports, three-tier rule) and how to ADD new static data.test-standards skill — how data-driven tests import and use static TS modules.type-safety skill — Zod schema patterns; z.literal() and z.enum() that may reference enum values.api-testing skill — consumers of ApiEndpoints.* and how schema drift is handled via test.skip + // FIXME:.debugging skill — Phase 4 verification failures during a refactor (text mismatch, ZodError, strict-mode violation) — classify the failure and use the right tool before assuming the refactor itself is wrong.references/examples.md — four worked refactors (endpoint URL change, UI message wording change, enum key rename, static-data value change).references/troubleshooting.md — common refactor pitfalls (hardcoded-old-string failure, missed consumer, --grep confusion, Zod literal drift, find-and-replace gaps in docs/mirrors).© idavidov13, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .claude/skills/refactor-values of idavidov13/agentic-playwright.
Open the folder on GitHubat commit f6cbf35
Refactor Values 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 |
|---|---|---|---|---|---|---|
| Refactor Values this skillidavidov13/agentic-playwright | 223 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Testing Patternssoftspark/ai-toolkit | 179 | — | ~1.6k | Automated safety check: Pass | Apache-2.0 | |
| Playwright Page Objectsbartstc/vite-ts-react-template | 122 | — | ~1k | Automated safety check: Notes | MIT | |
| ClickUp CLI Testingkrodak/clickup-cli | 121 | — | ~1.4k | Automated safety check: Notes | MIT | |
| Fixing Flaky Testsrileyhilliard/claude-essentials | 130 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Playwright Regression Testingfugazi/test-automation-skills-agents | 247 | — | ~1.4k | Automated safety check: Pass | MIT |
softspark/ai-toolkit
Testing strategy: pyramid, AAA, mocks/fakes/stubs, flaky tests, coverage.
bartstc/vite-ts-react-template
A skill your agent uses when creating page objects or refactoring Playwright E2E tests for better maintainability with Page Object Model patterns.
krodak/clickup-cli
Explains how to run and extend the clickup-cli tests: unit tests with a mocked client, e2e tests against a real ClickUp workspace, and the fixture data they rely on.
rileyhilliard/claude-essentials
Diagnose and fix tests that pass in isolation but fail when run concurrently.
fugazi/test-automation-skills-agents
Govern Playwright TypeScript regression suites across many tests.
petrkindlmann/qa-skills
Bulk-regenerate broken test selectors after a UI refactor or redesign.
idavidov13/agentic-playwright
Sole entry-point router for AI-assisted work on this Playwright scaffold — owns the 8-phase main workflow (classify → route → explore → plan+confidence → human gate → apply → verify → report), the…
idavidov13/agentic-playwright
Copy-paste AI prompt templates for common Playwright scaffold development tasks — adding page objects, functional/E2E/API tests, Zod schemas, factories, fixtures, and components.
idavidov13/agentic-playwright
Test data strategy for the Playwright scaffold — Faker + Zod factories for dynamic happy-path data, static TS files (.ts with as const exports — never .json) for domain-specific curated invalid…
idavidov13/agentic-playwright
Page Object Model pattern for the Playwright scaffold — class structure, get-accessor locator pattern, action-method conventions, component composition, registration via the page-object fixture, and…
idavidov13/agentic-playwright
Selector strategy, exploration-first workflow, locator priority order (getByRole then getByLabel then getByPlaceholder then getByText then getByTestId), and feedback/validation-message selector…
idavidov13/agentic-playwright
Spec file conventions for the Playwright scaffold — imports from test-options.ts, test file structure (describe / beforeEach / test / test.step), single-tag rule, functional vs E2E vs API vs setup…
Works with
Categories
Safe refactoring workflow for enum values, enum keys, and static test data in test-data/static/.ts — mandatory impact analysis, cascading updates, and verification. Refactor Values is an agent skill from idavidov13/agentic-playwright.ts — mandatory impact analysis, cascading updates, and verification.
Refactor Values fits situations like: tasks that involve Refactoring; tasks that involve Test data and fixtures; tasks that involve Failing and flaky tests.
Run `npx skills add idavidov13/agentic-playwright --skill refactor-values -a claude-code`. Or copy the skill folder (.claude/skills/refactor-values in idavidov13/agentic-playwright) into .claude/skills/refactor-values in your project. Claude Code loads it when a task matches its description.
Run `npx skills add idavidov13/agentic-playwright --skill refactor-values -a codex`. Or copy the skill folder (.claude/skills/refactor-values in idavidov13/agentic-playwright) into .agents/skills/refactor-values 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 idavidov13/agentic-playwright --skill refactor-values -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor-values, .gemini/skills/refactor-values, .github/skills/refactor-values and .opencode/skills/refactor-values in your project.
Going by SKILL.md and its folder, Refactor Values needs the command-line tools its instructions call (npx and rg). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. 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.
Refactor Values is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Refactor Values: Testing Patterns (softspark/ai-toolkit, 179 stars), Playwright Page Objects (bartstc/vite-ts-react-template, 122 stars), ClickUp CLI Testing (krodak/clickup-cli, 121 stars) and Fixing Flaky Tests (rileyhilliard/claude-essentials, 130 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
idavidov13 (a GitHub user) maintains it in idavidov13/agentic-playwright, which has 223 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 1, 2026.
Source: idavidov13/agentic-playwright on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.