R020: .id重复

Official

Find duplicate .id values in XTS UI code

Authoropenharmonyinsight
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This rule prevents UI component identity collisions by detecting duplicate .id('...') string parameters inside the same independent XTS engineering scope.

Core Features & Use Cases

  • Detect duplicate .id() strings: Scans all source files in one independent XTS project and flags repeated .id('xxx') values.
  • Project-level isolation: Treats each independent XTS project as the boundary, so duplicates are checked only within that scope.
  • Actionable reporting: Produces Critical findings including first occurrence location, repeated count, and other locations to speed up remediation.

Use case: When multiple UI pages or test components reuse the same .id value within one XTS project, automated element lookup and page operations can become unreliable; use this rule to enforce uniqueness and stabilize tests.

Quick Start

Run the R020 check on your XTS project sources to receive a Critical report listing all duplicate .id('...') values and where they occur.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: R020: .id重复
Download link: https://github.com/openharmonyinsight/openharmony-skills/archive/main.zip#r020-id

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.