hmos-arkui-knowledge-retriever

Retrieves ArkUI API documentation from ArkTS and NDK knowledge bases via keyword search.

2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/IsKenKenYa/skills --skill hmos-arkui-knowledge-retriever-iskenkenya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hmos-arkui-knowledge-retriever
Source: https://github.com/IsKenKenYa/skills/tree/main/skills/harmonyos/development/application-framework/ArkUI/hmos-arkui-knowledge-retriever
Command: npx skills add https://github.com/IsKenKenYa/skills --skill hmos-arkui-knowledge-retriever-iskenkenya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? HarmonyOS developers often need accurate, version-aware ArkUI API references—covering ArkTS declarative syntax and NDK C-API interfaces—without manually digging through hundreds of documentation files. This Skill routes natural-language questions to the right knowledge base and returns precise, source-annotated answers. ## Core Features & Use Cases - Automatic Domain Routing: Detects whether a query targets ArkTS declarative UI, NDK/C-API, or both (e.g., XComponent), and searches the appropriate knowledge base (532 ArkTS docs + 262 NDK docs). - Keyword + Synonym Retrieval with Reranking: A dependency-free Python retriever scores documents by direct hits, keyword coverage, and title/source phrase matching, with category filtering and compact content extraction. - Rules-First Troubleshooting: Forces targeted retrieval of the 18-arkts-rules category for counterintuitive behaviors like focus constraints, gesture conflicts, component freeze/reuse limits, and @Builder restrictions. - Use Case: A developer hits compile error 100060 or wonders why stopPropagation does not block a parent gesture; the Skill retrieves the exact rule document, interface signature, and code example with source paths. ## Quick Start Ask the assistant to look up how the @Local decorator works in ArkUI state management V2, including its interface signature and a usage example.

Frequently Asked Questions about hmos-arkui-knowledge-retriever

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search ArkUI API documentation from the command line?

Run python scripts/run.py query followed by your search text, for example "LazyForEach IDataSource", with options like --top-k, --category, and --include-code. The CLI automatically routes the query to the ArkTS or NDK knowledge base and returns JSON results with source paths.

What is the difference between ArkUI state management V1 and V2?

V1 uses decorators like @State, @Prop, and @Link, while V2 uses @Local, @Param, @ObservedV2, and @Trace with a different update mechanism. The knowledge base contains 74 state management documents including migration guides and V1/V2 mixing rules retrievable by querying "V1 V2 状态管理".

Does the retriever support HarmonyOS NDK and C-API queries?

Yes, a separate ndk-knowledges base with 262 documents covers native_node, OH_NativeXComponent, gestures, window, and animation C interfaces. Queries containing NDK, native, or OH_Native signals are routed there automatically, or you can force it with --domain ndk.

Why does stopPropagation not block parent component gestures in ArkUI?

stopPropagation only terminates Touch event bubbling and does not interrupt parent gesture recognition, because Touch events and gestures run on two independent response chains. This and similar counterintuitive rules live in the 18-arkts-rules category, which the Skill force-searches for constraint-type questions.

Can I filter ArkUI search results by documentation category?

Yes, pass --category with a category name such as 02-state-management or 17-error-code to restrict results to that section. For short rule files that keyword search may miss, the Skill recommends raising --top-k or reading the mapped rule file directly.