New advertisers: 50% off your first month with code FIRSTMONTHSee slots
web-infra-dev avatar

Harmonyos Device Automation

Vision-driven HarmonyOS NEXT automation via Midscene and HDC, operating purely from screenshots and natural language.

skills.sh installs
2.4K
GitHub stars
325
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers device connection, app or URL launch, screenshots, raw hdc shell commands, and natural-language act and assert steps
  • Includes connect, launch, runhdcshell, take_screenshot, act, and assert commands, with optional --image reference checks on assert
  • Requires a visually grounded model configured through MIDSCENE_MODEL_* variables and HDC installed or set via HDC_HOME
  • Designed for QA and visual verification of HarmonyOS apps on phones and tablets, running one command at a time

Install

$ npx -y skills add web-infra-dev/midscene-skills --skill harmonyos-device-automation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

HarmonyOS Device Automation

CRITICAL RULES — VIOLATIONS WILL BREAK THE WORKFLOW:

  1. Never run midscene commands in the background. Each command must run synchronously so you can read its output (especially screenshots) before deciding the next action. Background execution breaks the screenshot-analyze-act loop.
  2. Run only one midscene command at a time. Wait for the previous command to finish, read the screenshot, then decide the next action. Never chain multiple commands together.
  3. Allow enough time for each command to complete. Midscene commands involve AI inference and screen interaction, which can take longer than typical shell commands. A typical command needs about 1 minute; complex act commands may need even longer.

Automate HarmonyOS NEXT devices using npx -y @midscene/harmony@1. Each CLI command maps directly to an MCP tool — you (the AI agent) act as the brain, deciding which actions to take based on screenshots.

What act Can Do

Details

Repository
github.com/web-infra-dev/midscene-skills
Categories
Mobile Apps, Testing & QA
First seen
Apr 16, 2026

More from web-infra-dev/midscene-skills

All 7

Similar to Harmonyos Device Automation

More Mobile Apps