Token导航 LogoToken导航

Agent Skill · 开发

ui-data-testid(ui 数据 testid)

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

ui-data-testid 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 18,049。

总安装 364周安装 15GitHub Stars 4,820下载 119核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ui-data-testid(ui 数据 testid)
来源仓库:https://github.com/dtyq/magic
仓库路径:skills/ui-data-testid
安装命令:
npx skills add https://github.com/dtyq/magic --skill ui-data-testid
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dtyq/magic --skill ui-data-testid

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。适合清洗字段、汇总数据、发现异常或生成统计口径,并将分析结果转为可读说明。使用时需确认数据来源、字段含义和时间范围,避免将样本数据当作全量事实;涉及敏感数据时应先确认权限和脱敏边界。

安装方式:通过 npx skills add 命令从指定 GitHub 仓库添加。注意:需确认宿主环境支持 Codex、Claude、Cursor 或 Gemini CLI。

来源仓库内路径:skills/ui-data-testid

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dtyq/magic --skill ui-data-testid;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

ui-data-testid 怎么安装?

在终端执行 npx skills add https://github.com/dtyq/magic --skill ui-data-testid。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

ui-data-testid 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

ui-data-testid 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

ui-data-testid 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

ui-data-testid 用的人多吗?

公开数据是累计安装 364 次,近一周安装 15 次,下载 119 次,GitHub 4,820 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

ui-data-testid 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 来源仓库有 4,820 星,维护活跃度相对可查。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
ui-data-testid

ui 数据 testid · 本页

3644,820只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

UI Data-testid

Overview

Add predictable data-testid attributes to UI code as part of implementation, not as a later patch. Keep selectors stable across i18n text changes and visual refactors. Follow project testing rules in .cursor/rules:

  • preserve existing data-testid during refactor/migration
  • use data-testid-first query strategy in project tests

Workflow

  1. Determine the scope prefix from feature/module context (for example: user-menus, organization-switch, settings-profile).
  2. Add data-testid to the component root container.
  3. Add data-testid to all primary interactive nodes:

- button/link triggers - input/select/checkbox/radio controls - tabs/menu items/submenu triggers - modal/drawer open and confirm actions

  1. For config-driven UI (for example menu.items), add "data-testid" in config and forward it to the real clickable DOM node in renderer/wrapper components.
  2. For repeated list rows/items, prefer one shared id queried with getAllByTestId; if uniqueness is required, append a stable business key (never array index when order can change).
  3. Keep existing ids unchanged unless user explicitly asks to rename; never remove existing ids in migration tasks.
  4. For interaction changes, add or update Vitest/RTL tests in colocated __tests__ where feasible.

Naming Rules

  • Use lowercase kebab-case only.
  • Use semantic format: <scope>-<entity>-<action>.
  • Keep IDs text-agnostic (do not depend on i18n labels).
  • Avoid dynamic/random values (Date.now, UUID, translated text).
  • Do not embed secrets, emails, phone numbers, or tokens.
  • Use stable suffixes when applicable: trigger, content, button, input, option, item, row, loading, empty, error.

Minimum Coverage Checklist

For every newly created UI component, include at least:

  • one root container test id
  • one primary CTA test id
  • test ids for each secondary action button
  • test ids for each form field group/control
  • test ids for menu item triggers when menus are present
  • preserved historical data-testid in touched files
  • loading/empty/error test ids for async UIs

Query Priority

When writing or updating tests:

  • prefer getByTestId for stable selectors in this project
  • use getByRole, getByLabelText, getByText as complementary assertions
  • avoid container.querySelector(...) selectors for user-facing behavior tests

This keeps alignment with .cursor/rules/testing-guide.mdc.

Scenario Playbook

Apply these patterns for stable and accurate element targeting:

  1. Forms

- add ids for form container, inputs, submit/cancel buttons, and validation errors

  1. Lists and tables

- add list container id and row container id - use stable business key for row id suffix when uniqueness is required - query child actions with within(row) scope

  1. Menus and dropdowns

- add ids for trigger, popup content, and each actionable menu item - if menu is config-driven, forward item-level data-testid to rendered node

  1. Modal and drawer

- add ids for open trigger, modal content, primary action, and close/cancel action

  1. Async states

- add ids for loading, empty, and error states

Stability Rules

  • Never generate ids from array index if order may change.
  • Never generate ids from random values or timestamps.
  • Keep singleton ids unique on a page.
  • For repeated components, keep shared child ids and scope with within(...).

Patterns

Component markup

<div data-testid="user-menus-organization-info">
  <button type="button" data-testid="user-menus-upgrade-button" />
  <button type="button" data-testid="user-menus-recharge-button" />
</div>

Config + renderer forwarding

const items = [
  { key: "logout", label: t("logout"), "data-testid": "user-menus-logout" },
]

<ItemComponent data-testid={menuItem["data-testid"]}>{menuItem.label}</ItemComponent>

Done Criteria

Complete only when all new interactive nodes in touched UI files have stable data-testid values and any wrapper layer correctly forwards them to rendered DOM elements. Confirm no existing data-testid was removed unintentionally in migration/refactor diffs.

平台分布

Codex

36.81%
按下载量换算44

Claude

29.88%
按下载量换算36

Cursor

19.94%
按下载量换算24

Gemini CLI

9.59%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills