hbuilder-cli

A command-line helper for HBuilderX and uni-app projects. HBuilderX is a development environment, while uni-app projects can target websites, mobile apps, and several mini-program platforms.

In plain words
What is it for?
Use it to inspect uni-app projects, open HBuilderX when needed, publish to Web/H5, mini programs, Android, iOS, or HarmonyOS, and gather command output.
Why use it?
It gives an AI agent a defined way to find HBuilderX, inspect a project, run builds or publishing commands, and collect logs. It also stops safely when the required program or project markers are missing.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pidbid/hbuilder-skills/hbuilder-cli
Any agent
npx skills add Pidbid/hbuilder-skills --skill hbuilder-cli
Clone the repo
git clone --depth 1 https://github.com/Pidbid/hbuilder-skills

Made for: Claude Code, Codex.

Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,029 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00098 $0.01029
Opus 5 $0.00049 $0.00515
Sonnet 5 $0.00020 $0.00206
Haiku 4.5 $0.00010 $0.00103

Measured 2d ago against content hash e04a66bd7844, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hbuilder-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/hbuilder_cli_probe.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

hbuilder-cli/SKILL.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HBuilder CLI

Core Rule

Resolve HBuilderX cli.exe before every CLI workflow. Search only common install locations. Do not read environment variables, user config files, or project-local CLI config files. If cli.exe is not found, stop and report every searched path.

Use scripts/hbuilder_cli_probe.ps1 for discovery and basic project inspection. The script emits JSON that includes the resolved CLI path, searched paths, version/help status, and uni-app project markers.

Always respond to the user in Chinese. Keep command names, file paths, platform identifiers, and error excerpts unchanged when they are more accurate in their original form.

Workflow

  1. Run the probe from the user's project directory or pass -ProjectPath.
  2. If found is false, stop and report the searched paths.
  3. If HBuilderX is not running and CLI output says 未检测到已打开的HBuilderX, run cli.exe open once, then retry the requested help or workflow command.
  4. Check the project markers before running project commands. A uni-app project normally has manifest.json and pages.json at the project root or under src/.
  5. Choose the CLI command family from the user intent.
  6. Run the command with the absolute cli.exe path and absolute project path.
  7. For run, publish, pack, or troubleshooting tasks, collect the direct CLI output first. If the result failed or is unclear, immediately query logcat <target> --project <path> --mode lastBuild or the target-specific log command before proposing a fix.
  8. Use CLI output and logs to locate the failing file, platform setting, dependency, or manifest/pages configuration. Edit the project only after the log-backed cause is clear.
  9. Re-run the smallest relevant CLI verification after a fix, then summarize the command, exit code, key log lines, changed files, generated artifacts, and any remaining blocker.

Intent Map

  • Inspect CLI/project: run the probe, then read references/hbuilder-cli.md.
  • Run to platform: use launch <target> --project <path>. Targets include web, mp-weixin, mp-alipay, mp-baidu, mp-toutiao, mp-qq, app-android, app-ios, app-harmony, and mp-harmony.
  • Publish/build artifacts: use publish <target> --project <path> after reading target options from CLI help or references/hbuilder-cli.md.
  • Cloud App package: use pack or pack <target> only after checking account, certificate, package id, and upload side effects.
  • Log-driven repair: after a failed run/build/publish, preserve the CLI output, fetch logcat <target> --project <path> --mode lastBuild, identify the actionable error, patch the project, and re-run the smallest relevant CLI command.
  • Logs: use logcat <target> --project <path> with --mode prevBuild, lastBuild, or full.
  • Devices: use devices list --platform <target-family> before App or Harmony launch flows.
  • LSP diagnostics: use lsp lint --file <file> --project <path> [--platform ...].
  • uni_modules: use uni_modules --list|--download|--upgrade --project <path>.

Read the full file on GitHub · 53 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 53 lines · 98 tokens per session scan A e04a66bd7844

Subscribe to this mod's changes

hbuilder-cli is a skill published in the GitHub repository Pidbid/hbuilder-skills (2 stars, last pushed 3mo ago), licensed MIT. It adds 98 tokens to every session and 1,029 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

edge-to-edge

Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.

android/skills · 67 tokens

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

flutter-fix-layout-issues

Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools. Use when addressing "RenderFlex overflowed", "Vertical viewport was given unbounded height", or similar layout issues.

flutter/agent-plugins · 50 tokens

referral-program

When the user wants to design, launch, or optimize an in-app referral / invite / share-to-earn program — including reward structure, mechanics, fraud prevention, deep link setup, and viral coefficient measurement. Use when the user mentions "referral program", "invite a friend", "refer and earn", "share to earn"…

Eronred/aso-skills · 159 tokens

android-pentest

安卓应用渗透测试 — APK分析、Hook、自动化测试、运行态驱动、签名恢复、抓包分析.

Netw0rkNoob/VulnClaw · 32 tokens

ios-hig-design

Design native iOS interfaces following Apple Human Interface Guidelines. Use when the user mentions "iPhone app", "iPad layout", "SwiftUI", "UIKit", "Dynamic Island", "safe areas", "HIG compliance", "SF Symbols", "haptic feedback", "iOS accessibility", "make my app feel native", or "follow Apple design guidelines".…

wondelai/skills · 145 tokens