skills/ohos-app-build-debug/SKILL.md
Build, install, launch, and debug HarmonyOS/OpenHarmony applications using DevEco Studio toolchain. Use when Claude needs to: (1) Build OHOS apps with hvigorw, (2) Install HAP files to devices via hdc, (3) Launch or debug OHOS applications, (4) Parse crash stacks with hstack, (5) Take device screenshots, or (6) Detect DevEco Studio environment and SDK tools. Automatically detects DevEco Studio installation and configures JAVA_HOME, PATH, and toolchain.
npx skillsauth add openharmonyinsight/openharmony-skills ohos-app-build-debugInstall 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.
Use this skill when the user needs to work with HarmonyOS/OpenHarmony applications:
Build, install, and launch an OHOS application:
# Run scripts from skill directory
python3 $SKILL_DIR/scripts/build.py
python3 $SKILL_DIR/scripts/install.py -f entry/build/default/outputs/default/entry-default-signed.hap
python3 $SKILL_DIR/scripts/launch.py
This skill includes executable scripts in scripts/ that automatically detect DevEco Studio environment:
| Script | Purpose |
|--------|---------|
| build.py | Build OHOS application using hvigorw |
| install.py | Install HAP file to connected device |
| launch.py | Launch installed application |
| screenshot.py | Capture device screenshot |
| parse_crash.py | Parse crash stack using hstack |
| env_detector.py | Detect DevEco Studio and tools |
| ohos_utils.py | Shared utility functions |
For detailed command reference, see references/command-reference.md.
# 1. Check environment
python3 $SKILL_DIR/scripts/env_detector.py
# 2. Build the application
python3 $SKILL_DIR/scripts/build.py
# 3. Install to device (output from build.py shows HAP path)
python3 $SKILL_DIR/scripts/install.py -f entry/build/default/outputs/default/entry-default-signed.hap
# 4. Launch the app
python3 $SKILL_DIR/scripts/launch.py
python3 $SKILL_DIR/scripts/build.py && \
python3 $SKILL_DIR/scripts/install.py -f $(find entry/build -name "*.hap" | head -1) && \
python3 $SKILL_DIR/scripts/launch.py
# Launch app
python3 $SKILL_DIR/scripts/launch.py
# Take screenshot to verify
python3 $SKILL_DIR/scripts/screenshot.py -o ./screenshots
# Parse crash stack from file
python3 $SKILL_DIR/scripts/parse_crash.py -f crash.txt
# Parse from string
python3 $SKILL_DIR/scripts/parse_crash.py -c "stack trace here"
All scripts automatically detect DevEco Studio installation and configure the environment:
DevEco Studio Detection
C:\Program Files\Huawei\DevEco Studio\/Applications/DevEco-Studio.app/~/DevEco-Studio/ or /opt/DevEco-Studio/Toolchain Configuration
JAVA_HOME to DevEco's bundled JBRPATHHDC_SERVER_PORT=7035Auto-Detected Tools
When helping users with OHOS development:
Locate Skill Directory
$SKILL_DIR with the actual skill installation path~/.claude/skills/ohos-app-build-debug or project-specific pathsExecute Scripts
scripts/ directory using absolute or relative pathsShow Environment First
env_detector.py when first building to show tool availabilityProvide One-liners
Show Actual Commands
Handle Errors Gracefully
Use Project Context
If DevEco Studio is not detected:
DEVECO_STUDIO_PATH environment variableIf device is not connected:
For detailed troubleshooting, see references/troubleshooting.md.
Download DevEco Studio: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-download
testing
--- 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