/training:managing-locatorsfrom training
Discovers stable Playwright locators (explore mode) or repairs broken ones (fix mode) using Playwright MCP for live browser interaction.
Ships in training. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Discover or repair Playwright locators using live browser interaction via Playwright MCP. Determine the mode from the user's request:
Confirm that the Playwright MCP tools (for example, browser_navigate
and browser_snapshot) are available. If they are not, ask the user to
enable the Playwright MCP server and stop.
Never put passwords, tokens, or session cookies into the conversation.
Do not ask the user for credentials, and never type them into a form. If the user pastes one, do not use or repeat it, and tell them to rotate it.
If a page needs a login, ask the user to sign in in the Playwright MCP browser window and tell you when they are done. Do not take a snapshot or use any other tool until the user says sign-in is done. If no browser window is visible (headless or isolated MCP), stop and ask the user to set up a headed Playwright MCP.
Never read or print env files, cookies, local storage, session
storage, or saved auth state. Do not run commands that print env
values (printenv, echo $VAR), and do not open traces, reports, or
test-results/ files.
Use only these Playwright MCP tools: browser_navigate,
browser_navigate_back, browser_snapshot, browser_click,
browser_hover, browser_type, browser_fill_form,
browser_select_option, browser_press_key, browser_wait_for,
browser_handle_dialog, browser_tabs, browser_close, and
browser_generate_locator. Do not use any other MCP tool (for
example, evaluate, run code, network, console, cookie, storage,
screenshot, or file tools) or any other browser tool. Do not install
packages.
Before you open any project file (test, POM, config, or fixture),
check it for hardcoded secrets with this match-only search. Files that
only read process.env do not match.
grep -lEi -e "(password|passwd|secret|token|api[_-]?key|cookie|credential)[a-z_]*[\"']?[[:space:]]*[:=][[:space:]]*[\"'\`][^\"'\`\$]" -e "(bearer|basic)[[:space:]]+[A-Za-z0-9._~+/=-]{8,}" <file>
If the file matches, do not open it. Tell the user that it has a hardcoded secret and ask them to move it to an env var.
When you run tests, you may quote test names, pass or fail, and assertion or locator error messages. Before you quote output, remove any value that looks like a secret. If output shows a credential or token, do not repeat it, and tell the user to rotate it.
getByRole with accessible namegetByLabelgetByTestId / data attributesNever use auto-generated classes (e.g., css-1x2y3z), positional
selectors (nth-child), or exact text matches on dynamic content.
Read references/explore.md for detailed steps.
-> STOP. Present discovered locators and recommended strategies. Confirm with the user before documenting or using them.
Read references/fix.md for detailed steps.
-> STOP. Present the diagnosis and proposed fix. Confirm with the user before updating test files.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub devclarityai/devclarity-marketplace --plugin training9 skills in this plugin
/api-playwright-testingGuides the creation of Playwright API tests from exploration through implementation. Covers API discovery, test plan creation, helper/data factory development, and test writing with human checkpoints at each stage./context-coverageAudit how agent context (CLAUDE.md, AGENTS.md, GitHub Copilot instructions, Cursor/Windsurf rules, rules directories, skills) lines up with the code across a set of repositories and generate a self-contained HTML report. The report leads with a short list of specific "things to check" (context behind the code, thin coverage for the codebase, oversized files, no per-area context), then per-repo raw metrics and a folder tree comparing folder LOC to context coverage, and can show what changed since an earlier run. Use when the user wants to audit context coverage across repos, "which repos are missing CLAUDE.md", "which repos have no Copilot instructions", "where is our agent context thin or stale", "context coverage across my org / projects folder", "track context coverage week over week", or "/context-coverage". Works on a local folder of clones, a whole GitHub org via the gh CLI, or a single monorepo scoped to just the areas one team owns.