Hb Build logo

Hb Build

Organization
openharmonyinsight
hb-build

智能编译 ability_runtime 组件,通过检测修改的文件自动确定编译目标。支持多目标一起编译、自动重试判断、智能错误分析。触发关键词:"编译"、"构建"、"compile"、"build"、"make"、"make file"。

Overview

Publisheropenharmonyinsight
Repositoryopenharmony-skills
Skill namehb-build
Stars
36
Forks
7
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by openharmonyinsight on GitHub. Read the source before you install it.

Installation

Install the Hb Build AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/afwk-hb-build
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openharmonyinsight/openharmony-skills.git /tmp/openharmony-skills
mkdir -p .claude/skills
cp -r /tmp/openharmony-skills/skills/afwk-hb-build .claude/skills/hb-build
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hb Build in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hb Build on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hb Build is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

hb-build - Ability Runtime 智能编译工具

自动检测修改的文件并智能编译 ability_runtime 组件,支持多目标编译和自动重试。

快速开始

自动检测并编译(推荐)

bash
python3 scripts/helper.py

编译特定服务

bash
# SO 名称(推荐)
python3 scripts/helper.py --target libupms      # UriPermissionManager
python3 scripts/helper.py --target abilityms    # AbilityManagerService
python3 scripts/helper.py --target appms        # AppManagerService

# 完整路径
python3 scripts/helper.py --target \
  //foundation/ability/ability_runtime/services/uripermmgr:libupms

编译多个服务

bash
python3 scripts/helper.py --target libupms abilityms appms

整仓编译

bash
python3 scripts/helper.py --target full

工作流程

1. 切换到项目根目录(包含 build.py)
2. 检测修改文件 → git status --short
3. 过滤无关文件 → 排除 .claude/, build/, out/, *.md 等
4. 推断编译目标 → 统计每个服务的修改文件数
5. 智能决策 →
   • 目标数量 > 5 → 使用整仓编译
   • 目标数量 > 1 → 一起编译多个目标
   • 目标数量 = 1 → 编译单个目标
6. 执行编译 → hb build ability_runtime -i --build-target <TARGET>
7. 处理结果 → 成功或失败(支持智能重试)

参数概览

参数说明默认值
--target编译目标(支持多个)auto
--type编译类型(-i 功能代码 / -t 测试套)-i
--fast启用快速编译(--fast-rebuild)false
--max-retries最大重试次数3
--auto-retry启用自动重试模式false

支持的编译目标

  • abilityms - AbilityManagerService (services/abilitymgr)
  • appms - AppManagerService (services/appmgr)
  • libupms - UriPermissionManager (services/uripermmgr)
  • dataobsms - DataObserverManager (services/dataobsmgr)
  • quickfixmgr - QuickFix Manager (services/quickfixmgr)
  • auto - 自动检测修改文件并推断编译目标
  • full - 编译整个 ability_runtime 组件

自动忽略的文件

以下文件和目录不会被检测为需要编译的修改:

  • .claude/, .hvigor/, build/, out/, .git/
  • services/dialog_ui/ams_system_dialog/.hvigor/
  • local.properties
  • *.md 文档文件

使用要求

必须满足的条件:

  • 必须在 ability_runtime Git 仓库中运行
  • 项目根目录必须包含 build.py 文件
  • hb 命令必须在 PATH 中可用

已知的限制:

  • 全仓编译(--target full)耗时较长(10-30 分钟)
  • 首次编译需要下载依赖包
  • ccache 未安装时会禁用编译缓存

详细文档

核心脚本

外部资源

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hb Build AI skill do?

智能编译 ability_runtime 组件,通过检测修改的文件自动确定编译目标。支持多目标一起编译、自动重试判断、智能错误分析。触发关键词:"编译"、"构建"、"compile"、"build"、"make"、"make file"。

Why use Hb Build on TypingMind?

Because you install it once and use it with any model. Hb Build is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hb Build in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/afwk-hb-build. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hb Build?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hb Build?

As many as you like. As long as a model supports skills, you can use Hb Build with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hb Build AI skill free?

It is published on GitHub by openharmonyinsight. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇