- Home
- Skills
- Frontend & Web Apps
- reliable test id generator
reliable test id generator
Automates the generation and registry of stable, unique test IDs for UI components and testing suites.
$5
Works with the AI Agents you already use
reliable test id generator
Example session with this skill installed
Add test IDs to the new user registration form and the items in the shopping cart list. Follow our data-cy convention.
- Read your context and instructions
- Compiled the reliable test id
Added data-cy="registration-submit" to the submit button and data-cy={cart-item-remove-${item.sku}} to the cart list items. Updated test-ids.json with 5 new entries. No naming collisions detected.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Frontend tests frequently break because developers rely on brittle CSS selectors, text labels, or DOM structure that changes during refactors. Manually managing data attributes across large codebases often leads to naming collisions and inconsistent attribute conventions.
What it does
- Scans your repository to identify existing testing conventions like
data-testid,data-cy, ordata-qa. - Generates unique, kebab-case IDs based on semantic intent rather than unstable properties like array indexes or translated text.
- Maintains a centralized registry file to prevent ID collisions and track selector targets.
- Handles complex UI patterns including portaled modals, conditional branches, and dynamic lists using stable domain keys.
- Refactors brittle test queries to use the new, stable identifiers.
Frameworks & tools
Works with any frontend framework including React, Vue, and Angular. Compatible with testing libraries like Jest, Vitest, Cypress, Playwright, and Testing Library.
Why this beats prompting it yourself
Standard LLM prompts often suggest random IDs or use array indexes which break on sort/filter. This skill enforces a strict registry-first workflow, ensuring every ID is unique, documented, and follows your project's specific attribute naming convention without manual oversight.
Use cases
- Adding stable selectors to a legacy codebase before writing integration tests.
- Standardizing testing attributes across a monorepo with multiple contributors.
- Ensuring dynamic list items have predictable, non-index-based IDs for automation.
- Updating test suites to survive UI refactors and design system migrations.
Known limitations
Requires an existing registry file or permission to create a JSON/markdown registry. Validation scripts must be dependency-free to run during the process.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.
Requires a central registry file (e.g., test-ids.json). Does not support heavy validation loops or installing new NPM packages for verification.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
No special permissions declared or detected