reliable test id generator

    by nowrich

    1

    Automates the generation and registry of stable, unique test IDs for UI components and testing suites.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLIVVS CodeWWindsurfMManus+14 more

    See it in action

    You say

    Add test IDs to the new user registration form and the items in the shopping cart list. Follow our data-cy convention.

    Your agent does

    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.

    What you get

    Generate stable kebab-case IDs for interactive UI elementsMaintain a central registry to prevent duplicate test selectorsImplement dynamic IDs for mapped lists using stable domain keysAudit existing repos to detect and adopt local testing conventions

    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, or data-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.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Creator

    nowrich
    nowrich

    38 skills on Agensi

    Masterclass Creator Skill

    Frequently Asked Questions

    Popular in Workflow Automation