R023
OfficialDetect Number(err.code) type-cast workarounds
Authoropenharmonyinsight
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents hiding errcode typing issues by flagging any usage of Number(...) where the argument includes .code, so developers fix the root API contract instead of relying on type casts.
Core Features & Use Cases
- Detects forbidden patterns: Finds
Number(...)calls whose argument expression contains.codeacross assignments, conditions, and assertions. - Accurate testcase attribution: Parses
it()blocks and reports which test case each issue belongs to (when possible). - Produces actionable fixes: Outputs standardized issue records with file, line, testcase, offending snippet, and a remediation suggestion.
Quick Start
Ask the AI to scan the project source files for R023 by searching all .ets, .ts, and .js files for Number(... .code ...) usages and report each finding with its location and related it() testcase.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: R023 Download link: https://github.com/openharmonyinsight/openharmony-skills/archive/main.zip#r023 Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.