Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

add-e2e-selectors

Skill by grafana

Adds versioned @grafana/e2e-selectors and data-testid attributes to interactive elements and key containers in the Grafana frontend. Built for contributors who write or audit Grafana React components and Pathfinder guides.

  • Score 86
  • 78k stars
  • AGPL-3.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install add-e2e-selectors

Built from the published package, never by AI.

git clone --depth 1 https://github.com/grafana/grafana /tmp/grafana && mkdir -p ~/.claude/skills && cp -r /tmp/grafana/.claude/skills/add-e2e-selectors ~/.claude/skills/add-e2e-selectors

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install add-e2e-selectors in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The add-e2e-selectors skill finds interactive elements and key containers in the Grafana frontend that lack a stable test selector. It defines a versioned selector in the @grafana/e2e-selectors package and wires it into the JSX as a data-testid attribute. The version key comes from the current main version in package.json, with pre and build tags stripped.

Before adding anything, the skill searches for an existing selector to avoid duplicates. It also checks that the component forwards test ids and applies rules for naming keys. It can take a Grafana Pathfinder interactive guide, extract its reftarget selectors, flag weak ones, and fix them in the source JSX. It is aimed at contributors to Grafana who write or audit component tests.

Written from the project's SKILL.md and checked against it.

What it can do

  • Resolve targetAccepts a file path, a list of targets, a directory, a Pathfinder guide, or the open file.
  • Find untested elementsFinds buttons, inputs, links, tabs and key containers that lack a selector.
  • Reuse existing selectorsSearches the package for an existing selector before defining a new one.
  • Define versioned selectorsAdds a version-keyed entry in components.ts or pages.ts for the element.
  • Wire data-testid into JSXAdds data-testid attributes to the matching elements in the component.
  • Audit Pathfinder guidesExtracts reftarget selectors from a guide and flags weak ones for fixing.
  • Parameterize repeated itemsReplaces static test ids on repeated items with keyed selector functions.

What you need

  • A Grafana frontend repository with the @grafana/e2e-selectors package
  • git, for reading the main branch version
  • grep and a shell for searching files

Try asking

  • Add e2e selectors to the open file in the Grafana frontend
  • Audit the reftarget selectors in this Pathfinder guide and fix weak ones
  • Make the dashboard table rows in this directory testable with selectors

Good to know

  • Does not add props or modify components that do not forward a test id.
  • Never deletes existing selector entries. Orphaned entries are reported instead.
  • Does not update the Pathfinder guide itself. It gives a mapping for the guide author.
  • Skips external npm packages, Monaco editor internals and instance data.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/add-e2e-selectors/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md17 KB

Alternatives to add-e2e-selectors

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

add-e2e-selectors: common questions

Can it add test selectors to any React component?

It targets Grafana frontend components and needs the component to forward a test id. Components that accept neither data-testid nor an equivalent prop are skipped and reported.

How does it choose the version for new selectors?

It reads the current main version from package.json, strips pre and build tags, and uses that as the key. On a release branch it reads main's copy instead.

Can it fix selectors in Pathfinder interactive guides?

Yes. It extracts reftarget values from a guide's content.json, flags weak ones such as text matches and positional selectors, and fixes them in the Grafana JSX where possible.

How do I install add-e2e-selectors?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is add-e2e-selectors free?

The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.

Is add-e2e-selectors safe to use?

It scores 86 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to add-e2e-selectors?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

add-e2e-selectors Install

Add to stack

Loading.