skills/arkuix-module-adapter/SKILL.md
--- name: ArkUIX Module Adapter description: Guide OHOS modules cross-platform adaptation with automated architecture analysis, code sync, and configuration generation. Use for adapting OHOS subsystem modules (@ohos.data.preferences, @ohos.intl, @ohos.multimedia.image, etc.) to Android/iOS. Provides 6-phase workflow: info collection → code sync → API analysis → architecture analysis → recommendation → implementation. Includes automated scripts for DTS analysis, architecture analysis, and configu
npx skillsauth add openharmonyinsight/openharmony-skills skills/arkuix-module-adapterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide OHOS modules through cross-platform adaptation with automated analysis and code generation. This skill transforms Claude into a specialized adaptation assistant with domain expertise in OHOS/ArkUI-X architecture.
User: "I need to adapt @ohos.data.preferences module"
The skill automatically guides through all 6 phases of adaptation.
Collects minimal information upfront (module name), then lazily collects additional details (repository name, storage path) only when needed.
Output: Module identification information
Intelligently checks if OHOS code already exists before syncing. Avoids redundant operations.
Decision Tree:
.repo/manifests/openharmony-master.xmlplugins/ directoryOutput: Sync status or repository verification results
Analyzes .d.ts file to determine @crossplatform coverage.
Metrics:
Output: Comprehensive API statistics with coverage progress bar
Automation: scripts/dts_analyzer.py interface/sdk-js/api/@ohos.{module}.d.ts
Analyzes OHOS module code composition and platform dependencies.
Analysis Dimensions:
Key Rule: C/C++ Cross-Platform Native Support
Output: Detailed code composition and dependency analysis
Automation: scripts/architecture_analyzer.py foundation/{module_path}
Recommends adaptation mode based on analysis: OHOS Reuse / Independent / Hybrid
Decision Matrix:
| Mode | Code Reuse | New Code | Time | Best For | |------|------------|----------|------|----------| | OHOS Reuse | 90-95% | 500-800 lines | 4-6 weeks | Data-focused (preferences, kv_store) | | Hybrid | 60-80% | 1,500-2,500 lines | 6-10 weeks | Mixed (location, sensor) | | Independent | 10-30% | 4,000-6,000 lines | 10-16 weeks | Platform-heavy (BLE, pasteboard) |
Output: Recommended mode with rationale and effort estimates
Provides actual implementation code with complete examples for:
Output: Production-ready code with comprehensive error handling
Automation: scripts/code_generator.py {module} {repo} --api-version {ver}
All scripts are in scripts/ directory:
# Analyze .d.ts coverage
python3 scripts/dts_analyzer.py interface/sdk-js/api/@ohos.data.preferences.d.ts
# Analyze module architecture
python3 scripts/architecture_analyzer.py foundation/distributeddatamgr/preferences
# Generate configuration files (dry-run)
python3 scripts/code_generator.py data/preferences distributeddatamgr_preferences --api-version 23 --dry-run
# Apply changes
python3 scripts/code_generator.py data/preferences distributeddatamgr_preferences --api-version 23
Core workflow in SKILL.md (this file), detailed content in references:
references/phase{1-6}*.mdreferences/architecture-modes.mdreferences/code-examples.mdassets/templates/ (code templates for reuse)For data-focused modules with minimal platform dependencies.
Characteristics:
Example Modules: preferences, kv_store, http
For modules with heavy platform API dependencies.
Characteristics:
Example Modules: bluetooth, pasteboard, camera
For mixed data/platform logic modules.
Characteristics:
Example Modules: geolocation, sensor, request
Use this checklist to track adaptation progress:
After code generation, ensure all 4 files are updated:
plugins/plugin_lib.gni - Module entryinterface/sdk/plugins/api/apiConfig.json - Library configurationbuild_plugins/sdk/arkui_cross_sdk_description_std.json - Build entriesinterface/sdk-js/api/@ohos.{module}.d.ts - @crossplatform annotationsRepository not found on GitCode?
{subsystem}_{module} or {module}Validation failed?
Build errors?
--dry-run flag before applying changestesting
--- name: ohos-req-value-decision description: Use after review meeting to record decision and route to next step. Triggers: 评审决策纪要, 评审结论回流, value decision, 评审接纳, 评审不接纳, 评审退回, 下次重新上会. Do NOT use for feature baseline (ohos-req-feature-baseline), review gate checks (ohos-req-review-gate), or IR generation (ohos-req-feature-to-ir). metadata: author: openharmony scope: common stage: requirements capability: value-decision version: 0.3.0 status: draft tags: - sdd - requirements
development
Use when converting an OpenHarmony requirement document, spec, or design proposal into an OpenHarmony review slide deck (需求评审 / 需求变更评审 / 设计评审 PPTX) — produces the fixed OpenHarmony-branded review-deck structure (OH logo on every page) with architecture/flow diagrams and field tables. Triggers on "需求评审PPT", "需求变更评审", "把需求文档转成评审PPT", "spec转评审PPT", "requirement/spec to review deck". NOT for arbitrary or generic slide decks unrelated to OpenHarmony requirement/design review.
testing
Use when performing the Phase 0 Step 0.5 Review Ready Gate on a 04-feature.md, especially when the user says "evaluate gate", "review readiness", "feature ready?", "should we generate IR", or when the ohos-req-intake-orchestration main session needs a structured Ready / Conditional Ready / Not Ready judgment instead of doing the check inline. Reads 01-04, runs seven fixed checks plus a conditional-items check, and returns a machine-readable JSON summary plus a human-readable table that the main session can route on. Do NOT use for feature baseline generation (ohos-req-feature-baseline), value decision recording (ohos-req-value-decision), or IR generation (ohos-req-feature-to-ir).
testing
--- name: ohos-req-requirement-intake description: Use when importing an OHOS requirement into Phase 0.1, especially for 01-requirement.md, requirement intake, background, user value, scenarios, scope, FR/NFR, affected modules, or priority. Triggers: 需求导入, 01-requirement, 需求基线, RR单号. Do NOT use for feasibility analysis (ohos-req-feasibility-analysis), architecture decision (ohos-req-arch-decision), or feature baseline (ohos-req-feature-baseline). metadata: author: openharmony scope: common