← 返回 Skills 市场
code-sunbo

OpenHarmony React Native Performance

作者 code-sunbo · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
882
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install ohos-react-native-performance
功能描述
OpenHarmony React Native performance static checks and optimization. Based on ohos_react_native performance doc. Use when writing or reviewing React Native for OpenHarmony code, bundle-harmony, lifecycle, or TurboModule. Applies to RNAbility, Hermes bytecode, React render optimization.
使用说明 (SKILL.md)

\r \r

OpenHarmony React Native Performance Static Check Skills\r

\r Static-check rules and config for React Native for OpenHarmony, from the official performance-optimization doc. This skill is English-only to reduce token usage; Chinese content is available via links below.\r \r

When to Apply\r

\r Use this skill when:\r \r

  • Writing or reviewing React Native for OpenHarmony (RNOH) application code or OpenHarmony project configuration\r
  • Optimizing React Native page rendering, setState, or list performance\r
  • Configuring bundle-harmony build, Hermes bytecode, or Release build\r
  • Integrating or reviewing RNAbility lifecycle (onForeground/onBackground)\r
  • Designing or implementing TurboModule (main vs worker thread)\r
  • Preparing for performance analysis with Trace, React Marker, FCP, etc.\r \r

Rule Categories by Priority\r

\r | Priority | Category | Impact | Prefix |\r | -------- | ------------------- | -------- | ------------------------- |\r | 1 | Render optimization | CRITICAL | rnoh-render- |\r | 2 | Bundle & native | HIGH | rnoh-bundle-, rnoh-native- |\r | 3 | Lifecycle & monitor | HIGH | rnoh-lifecycle- |\r | 4 | TurboModule | MEDIUM | rnoh-turbo- |\r | 5 | List & key | MEDIUM | rnoh-list- |\r \r

Quick Reference\r

\r

1. Render optimization (CRITICAL)\r

\r

  • rnoh-render-avoid-same-state — Avoid setState when state unchanged to prevent extra renders\r
  • rnoh-render-pure-memo — Use PureComponent or React.memo to avoid unnecessary re-renders\r
  • rnoh-render-props-once — Create callbacks/prop objects once (constructor or outside component)\r
  • rnoh-render-split-child — Split independent UI into child components\r
  • rnoh-render-merge-setstate — Merge setState to avoid multiple commits and renders\r
  • rnoh-render-state-not-mutate — Use new objects in setState; do not mutate existing state\r
  • rnoh-render-batching — Keep React 18 Automatic Batching enabled (RNOH default concurrentRoot: true)\r \r

2. Bundle & native config (HIGH)\r

\r

  • rnoh-bundle-release — Use --dev=false --minify=true for performance/production bundle\r
  • rnoh-bundle-hbc — Prefer Hermes bytecode (hermesc) for production\r
  • rnoh-native-release — Use Release build on native side; lower LOG_VERBOSITY_LEVEL when appropriate\r
  • rnoh-native-bisheng — Optionally use BiSheng compiler (buildOption.nativeCompiler: "BiSheng")\r \r

3. Lifecycle & monitoring (HIGH)\r

\r

  • rnoh-lifecycle-foreground-background — Call onForeground/onBackground in onPageShow/onPageHide or onShown/onHidden\r
  • rnoh-lifecycle-fcp — First-frame monitoring: use mount event or root onLayout to report FCP\r \r

4. TurboModule (MEDIUM)\r

\r

  • rnoh-turbo-worker — Run heavy TurboModules (JSON, crypto, image, network, I/O) on worker thread; avoid ImageLoader on worker\r \r

5. List & key (MEDIUM)\r

\r

  • rnoh-list-key — Provide stable keys for list items; avoid using index as key\r \r

How to Use\r

\r

  • Static checks: Apply the rules above in code review or scripts (JS/TS and config).\r
  • Details and examples: See the corresponding rule files under rules/ (e.g. rules/rnoh-render-pure-memo.md).\r
  • Full doc: Performance optimization (en).\r \r

Relation to general React Native skills\r

\r

  • This skill focuses on OpenHarmony-specific React Native performance (RNAbility, bundle-harmony, HBC, TurboModule worker, Trace/React Marker).\r
  • It complements vercel-react-native-skills and react-native-best-practices: list virtualization (FlashList), Pressable, expo-image, StyleSheet, etc. still apply; this skill adds OpenHarmony-side config and render-optimization details.\r
安全使用建议
This skill is a safe, documentation-only rule set for OpenHarmony React Native performance. It does not request credentials or install code automatically. Before installing, verify the skill source if you require provenance (SKILL metadata lists GitCode links in README but 'Source' was marked unknown). If you plan to act on the shell commands in the rules, ensure those build tools (react-native toolchain, hermesc) come from trusted distributions and be aware that running build commands will execute on your machine — the skill itself will not run them automatically.
功能分析
Type: OpenClaw Skill Name: ohos-react-native-performance Version: 1.0.0 The skill bundle provides static-check rules and documentation for optimizing React Native for OpenHarmony performance. All files, including SKILL.md, contain only descriptive text, code examples, and instructions for static analysis and code review. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, obfuscation, or prompt injection attempts against the agent. The commands shown are examples for developers or CI/CD pipelines, not for the agent to execute as part of its skill.
能力评估
Purpose & Capability
Name/description match the included files: SKILL.md + rules/*.md contain performance guidance for OpenHarmony React Native (render, bundle, lifecycle, TurboModule). No unrelated environment variables, binaries, or installs are requested.
Instruction Scope
Instructions are static-check guidance and examples (JS/TS snippets, recommended bundle commands). They do not instruct the agent to read arbitrary files, collect secrets, or transmit data to external endpoints. Example shell commands (react-native bundle-harmony, hermesc) are expected for building/optimizing bundles.
Install Mechanism
No install specification and no code files — the skill is instruction-only, so nothing will be written to disk or downloaded during installation.
Credentials
The skill declares no required environment variables, credentials, or config paths, which is proportionate for a documentation/static-check skill.
Persistence & Privilege
always:false and normal model invocation are used. The skill does not request persistent presence or modify other skills or system configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ohos-react-native-performance
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ohos-react-native-performance 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of ohos-react-native-performance skill. - Provides static check rules and configuration for React Native on OpenHarmony projects. - Covers performance optimization best practices from official OpenHarmony documentation. - Includes categories for render optimization, bundle/native configuration, lifecycle monitoring, TurboModule usage, and list keys. - Offers quick-reference rule names and priorities for efficient code review. - Documentation describes when to apply the skill, relevant rule prefixes, and links to more resources.
元数据
Slug ohos-react-native-performance
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

OpenHarmony React Native Performance 是什么?

OpenHarmony React Native performance static checks and optimization. Based on ohos_react_native performance doc. Use when writing or reviewing React Native for OpenHarmony code, bundle-harmony, lifecycle, or TurboModule. Applies to RNAbility, Hermes bytecode, React render optimization. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 882 次。

如何安装 OpenHarmony React Native Performance?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ohos-react-native-performance」即可一键安装,无需额外配置。

OpenHarmony React Native Performance 是免费的吗?

是的,OpenHarmony React Native Performance 完全免费(开源免费),可自由下载、安装和使用。

OpenHarmony React Native Performance 支持哪些平台?

OpenHarmony React Native Performance 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 OpenHarmony React Native Performance?

由 code-sunbo(@code-sunbo)开发并维护,当前版本 v1.0.0。

💬 留言讨论