web-infra-dev avatar

Harmonyos Device Automation

This gives Claude the ability to control HarmonyOS NEXT devices by running Midscene CLI commands that capture screenshots and execute touch actions based on what it sees. The workflow is deliberate: run one command, read the screenshot, decide the next move. No background execution, no chaining. Each action (tap, scroll, type, drag) takes about a minute because there's AI inference happening behind the scenes. You need API keys for vision models, and two-finger gestures won't work since HarmonyOS automation doesn't expose multi-touch. If you're testing apps on Huawei's new OS or need reproducible device automation without manually scripting every coordinate, this is the toolchain. Part of a larger Midscene suite that covers browsers, desktops, Android, and iOS.

skills.sh installs
2.3K
GitHub stars
321
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/web-infra-dev/midscene-skills
Categories
Frontend Development, Testing & QA, DevOps & CI/CD, Automation & Workflows, Design & UI/UX, CLI & Terminal
First seen
Apr 16, 2026

More from web-infra-dev/midscene-skills

All 8
1marimo-team avataradd-molab-badgemarimo-team/skillsAdd "Open in molab" badge(s) linking to marimo notebooks. Works with READMEs, docs, websites, or any markdown/HTML target.2.3Kskills.sh installs
2jiji262 avatarclaude-designjiji262/claude-design-skillProduce thoughtful, high-fidelity design artifacts in HTML — landing pages, slide decks, interactive prototypes, animated videos, posters, wireframes, and visua2.3Kskills.sh installs
3blacktwist avatarhook-writer-smsblacktwist/social-media-skillsWhen the user wants help writing opening lines, hooks, first sentences, video hooks, thumbnails titles, or pin titles that grab attention. Also use when the use2.3Kskills.sh installs
4uniswap avatarswap-integrationuniswap/uniswap-aiIntegrate Uniswap swaps into applications. Use when user says "integrate swaps", "uniswap", "trading api", "add swap functionality", "build a swap frontend", "c2.3Kskills.sh installs
5nexu-io avatarresearch-decision-roomnexu-io/open-designTurn messy user research notes, interviews, support tickets, surveys, and product context into an evidence-backed decision room: a single HTML artifact with an 2.3Kskills.sh installs
6aahl avataredgeoneaahl/skillsDeploy HTML content to EdgeOne Pages, return the public URL.2.3Kskills.sh installs