quality-engineering-selector-stability

quality-engineering-selector-stability is a skill for Claude Code, Codex from HoangNguyen0403/agent-skills-standard. It costs 43 tokens per session (577 once invoked), scanned A, original, MIT.

A policy for choosing stable controls and identifiers in automated web and mobile tests. It explains which labels, roles, test IDs, and accessibility identifiers to use and how to name them.

In plain words
What is it for?
Use it when writing or reviewing UI test locators, adding test IDs or accessibility identifiers, or deciding whether a selector change is safe.
Why use it?
It reduces tests breaking when page structure, styling, or displayed language changes. It also avoids fragile methods such as XPath, position-based selection, and generated class names.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when writing or reviewing UI test locators, adding test IDs or accessibility identifiers, or deciding whether a selector change is safe.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HoangNguyen0403/agent-skills-standard --skill quality-engineering-selector-stability
Clone the repo
git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for quality-engineering-selector-stability

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability/github.svg)](https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability)
Your own site
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for quality-engineering-selector-stability

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/quality-engineering-selector-stability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 577 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.00577
Opus 5.5 $0.00017 $0.00231
Sonnet 5.5 $0.00009 $0.00115
Haiku 4.5 $0.00004 $0.00058

Measured today against content hash 03147520e25e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

quality-engineering-selector-stability scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/quality-engineering/quality-engineering-selector-stability/SKILL.md · 63 lines

What it actually says

Quality Engineering: Selector Stability

Priority: P0 (CRITICAL)

Web Ladder

getByRole / getByLabel > getByTestId (data-testid) > attribute CSS. Never XPath, nth-child, or generated class names.

Mobile Ladder

Accessibility id > resource-id / testTag > predicate/uiautomator > XPath. Never XPath.

Framework Map

  • React/Next.js: data-testid.
  • React Native: testID for automation; separate accessibilityLabel for VoiceOver/TalkBack.
  • Flutter: WidgetKeys (Key) on widgets for widget tests, integration_test, and Patrol.
  • SwiftUI/UIKit: .accessibilityIdentifier (automation only); .accessibilityLabel (screen reader).
  • Jetpack Compose: Modifier.testTag + testTagsAsResourceId = true for automation; contentDescription for a11y.

Naming

<screen>-<element>-<role>, kebab-case (e.g. checkout-submit-button).

Insertion Policy

Add ids to leaf interactive/assertable elements only, never layout wrappers. Never rename an existing id — ids are a public contract other tests depend on.

Drift Classes

rename (id changed), restructure (DOM/tree moved), i18n (visible text changed, id untouched).

Anti-Patterns

  • Text selectors on translated strings, index-based locators (nth), generated/hashed class names.
  • Using accessibilityLabel / contentDescription as a test id (they are user-facing a11y strings, not stable test locators).
  • Overwriting or stripping accessible labels to insert test identifiers.
  • Using web CSS / XPath selectors in native mobile automation.
  • "xpath just for now" — there is no temporary XPath; use the ladder from the first commit.

References

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +2 lines 03147520e25e
  2. 1mo ago First seen · 61 lines · 43 tokens per session scan A fcca95212bea

Subscribe to this mod's changes

quality-engineering-selector-stability is a skill published in the GitHub repository HoangNguyen0403/agent-skills-standard (582 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 577 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.