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.
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 678 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & 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.
Assessment
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.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
OpenHarmony React Native Performance Static Check Skills
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.
When to Apply
Use this skill when:
- Writing or reviewing React Native for OpenHarmony (RNOH) application code or OpenHarmony project configuration
- Optimizing React Native page rendering, setState, or list performance
- Configuring bundle-harmony build, Hermes bytecode, or Release build
- Integrating or reviewing RNAbility lifecycle (onForeground/onBackground)
- Designing or implementing TurboModule (main vs worker thread)
- Preparing for performance analysis with Trace, React Marker, FCP, etc.
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Render optimization | CRITICAL | rnoh-render- |
| 2 | Bundle & native | HIGH | rnoh-bundle-, rnoh-native- |
| 3 | Lifecycle & monitor | HIGH | rnoh-lifecycle- |
| 4 | TurboModule | MEDIUM | rnoh-turbo- |
| 5 | List & key | MEDIUM | rnoh-list- |
Quick Reference
1. Render optimization (CRITICAL)
rnoh-render-avoid-same-state— Avoid setState when state unchanged to prevent extra rendersrnoh-render-pure-memo— Use PureComponent or React.memo to avoid unnecessary re-rendersrnoh-render-props-once— Create callbacks/prop objects once (constructor or outside component)rnoh-render-split-child— Split independent UI into child componentsrnoh-render-merge-setstate— Merge setState to avoid multiple commits and rendersrnoh-render-state-not-mutate— Use new objects in setState; do not mutate existing staternoh-render-batching— Keep React 18 Automatic Batching enabled (RNOH default concurrentRoot: true)
2. Bundle & native config (HIGH)
rnoh-bundle-release— Use--dev=false --minify=truefor performance/production bundlernoh-bundle-hbc— Prefer Hermes bytecode (hermesc) for productionrnoh-native-release— Use Release build on native side; lower LOG_VERBOSITY_LEVEL when appropriaternoh-native-bisheng— Optionally use BiSheng compiler (buildOption.nativeCompiler: "BiSheng")
3. Lifecycle & monitoring (HIGH)
rnoh-lifecycle-foreground-background— Call onForeground/onBackground in onPageShow/onPageHide or onShown/onHiddenrnoh-lifecycle-fcp— First-frame monitoring: use mount event or root onLayout to report FCP
4. TurboModule (MEDIUM)
rnoh-turbo-worker— Run heavy TurboModules (JSON, crypto, image, network, I/O) on worker thread; avoid ImageLoader on worker
5. List & key (MEDIUM)
rnoh-list-key— Provide stable keys for list items; avoid using index as key
How to Use
- Static checks: Apply the rules above in code review or scripts (JS/TS and config).
- Details and examples: See the corresponding rule files under
rules/(e.g.rules/rnoh-render-pure-memo.md). - Full doc: Performance optimization (en).
Relation to general React Native skills
- This skill focuses on OpenHarmony-specific React Native performance (RNAbility, bundle-harmony, HBC, TurboModule worker, Trace/React Marker).
- 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.
Files
10 totalSelect a file
Select a file to preview.
Comments
Loading comments…
