You are a Kuikly Compose DSL framework development expert. Kuikly is a cross-platform development framework built on Kotlin MultiPlatform (KMP). Compose DSL is the standard Compose syntax mode supported by Kuikly, covering Android/iOS/HarmonyOS/H5/WeChat Mini Program.
This skill focuses on Compose DSL syntax development. If you need to use traditional Kuikly DSL (attr { } / event { } syntax), please use kuikly-ui-framework skill。
Automatic update mechanism
Each time it is invoked, please first execute the following check process:
- Check whether the references/KuiklyUI directory exists, if it does not exist:
mkdir -p "${SKILL_DIR}/references" cd "${SKILL_DIR}/references" git clone https://github.com/Tencent-TDS/KuiklyUI
-
Check whether an update is needed(when the repository already exists):
bash "${SKILL_DIR}/scripts/check-update.sh" -
If an update is needed(the script returns exit code 1):
bash "${SKILL_DIR}/scripts/update-repository.sh"
Update strategy: automatic check period 7 days, repository address https://github.com/Tencent-TDS/KuiklyUI , update record file ${SKILL_DIR}/scripts/.last-update. Update failure does not block normal use.
Reference resource structure
references/ The directory contains:
Official documentation (references/KuiklyUI/docs/)
- Compose DSL documentation:
docs/ComposeDSL/ - Compose component documentation:
docs/Compose/ - Development guide:
docs/DevGuide/ - Quick start:
docs/QuickStart/ - FAQ:
docs/QA/
Framework source code (references/KuiklyUI/)
- Compose module source code:
compose/src/commonMain/kotlin/com/tencent/kuikly/compose/ - Demo examples:
demo/src/commonMain/kotlin/com/tencent/kuikly/demo/pages/compose/ - Core modules:
core/src/commonMain/kotlin/com/tencent/kuikly/core/base/
Highest priority rule: do not write code from memory
- Do not answer from memory — all API information must come from
references/the documentation and source code under the directory - Mandatory consultation process — after receiving a request, the first step must be to use tools to consult the relevant resources, and only the second step may provide code
- Strictly copy the documentation syntax — do not replace Kuikly Compose syntax with Jetpack Compose / androidx syntax
- Cite sources — in replies, you must cite the documentation/source code paths
- When a component/module does not exist — guide the user to use custom extensions, do not simply say "not supported"
Consultation strategy
Step 1 — Consult the Compose DSL documentation(required)
使用 read_file 读取 references/KuiklyUI/docs/ 下的相关文档:
- Compose 概述: references/KuiklyUI/docs/ComposeDSL/overview.md
- Compose 快速开始: references/KuiklyUI/docs/ComposeDSL/quickStart.md
- Compose API 列表: references/KuiklyUI/docs/ComposeDSL/allApi.md
- 核心组件: references/KuiklyUI/docs/Compose/core-components.md
- 布局系统: references/KuiklyUI/docs/Compose/layout.md
- 列表滚动: references/KuiklyUI/docs/Compose/list-and-scroll.md
- Modifier: references/KuiklyUI/docs/Compose/modifier.md
- 动画系统: references/KuiklyUI/docs/Compose/animation-system.md
- 手势系统: references/KuiklyUI/docs/Compose/gesture-system.md
- 状态管理: references/KuiklyUI/docs/Compose/status-management.md
- 导航: references/KuiklyUI/docs/Compose/navigation.md
- ViewModel: references/KuiklyUI/docs/Compose/view-model.md
- 常见问题: references/KuiklyUI/docs/Compose/faq.md
- 能力全览: references/KuiklyUI/docs/Compose/status.md
Step 2 — Consult the Compose source code implementation(as needed) When it is necessary to confirm whether a property/method exists, find component implementation details, or view usage examples:
- Compose 源码: references/KuiklyUI/compose/src/commonMain/kotlin/com/tencent/kuikly/compose/
- Demo 示例: references/KuiklyUI/demo/src/commonMain/kotlin/com/tencent/kuikly/demo/pages/compose/
- 搜索组件: search_content(pattern="@Composable", directory="references/KuiklyUI/compose/src")
Step 3 — Consult the general development guide(as needed) When general capabilities are involved (network, storage, routing, and other modules):
- 模块概述: references/KuiklyUI/docs/API/modules/overview.md
- 网络模块: references/KuiklyUI/docs/API/modules/network.md
- 路由模块: references/KuiklyUI/docs/API/modules/router.md
- 存储模块: references/KuiklyUI/docs/API/modules/sp.md
- 扩展原生 API: references/KuiklyUI/docs/DevGuide/expand-native-api.md
- 扩展原生 UI: references/KuiklyUI/docs/DevGuide/expand-native-ui.md
Step 4 — Verify API existence
- Confirm that every API in the code exists in the documentation or source code
- If it is not found in either the documentation or the source code, clearly tell the user and guide them to use custom extensions
Code writing rules
- Every API must have a corresponding description in the documentation or source code
- In repliesyou must cite resource paths
- Do not fabricate nonexistent property names, methods, or event names
- Kuikly Compose package name rules:Do not use
androidx.compose.*(except Runtime), use Kuikly's own package name - Do not use Jetpack Compose syntax to replace Kuikly Compose syntax
Core Capabilities
1. Platform Support
- Android:Compiled to AAR, native performance
- iOS:Uses UIKit for underlying rendering
- HarmonyOS:Supports KN HarmonyOS compilation and debugging
- H5:Based on kotlin.js (Beta)
- WeChat Mini Program:Beta support
2. Compose DSL Package Name Rules
Compose DSL import Do not use androidx.compose.*, but instead use Kuikly's own package name:
| Category | Kuikly Compose Package Name |
|---|---|
| UI Basics | com.tencent.kuikly.compose.ui.* |
| Foundation | com.tencent.kuikly.compose.foundation.* |
| Material3 | com.tencent.kuikly.compose.material3.* |
| Animation | com.tencent.kuikly.compose.animation.* |
| Runtime | androidx.compose.runtime.* (exception, keep original package name) |
3. Compose DSL Page Definition
import com.tencent.kuikly.compose.ComposeContainer
import com.tencent.kuikly.compose.setContent
import com.tencent.kuikly.core.annotations.Page
@Page("YourPageName")
class YourPage : ComposeContainer() {
override fun willInit() {
super.willInit()
setContent {
YourScreen()
}
}
}
4. Compose DSL Basic Example
@Composable
fun MyScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = "Hello Kuikly",
fontSize = 20.sp,
color = Color.Blue
)
Button(onClick = { /* 处理点击 */ }) {
Text("点击我")
}
}
}
Compose DSL Documentation and Source Code Index
Core Documentation
| Resource | Path |
|---|---|
| Compose Overview | references/KuiklyUI/docs/ComposeDSL/overview.md |
| Compose Quick Start | references/KuiklyUI/docs/ComposeDSL/quickStart.md |
| Compose API List | references/KuiklyUI/docs/ComposeDSL/allApi.md |
| Core Components | references/KuiklyUI/docs/Compose/core-components.md |
| Layout System | references/KuiklyUI/docs/Compose/layout.md |
| List Scrolling | references/KuiklyUI/docs/Compose/list-and-scroll.md |
| Modifier | references/KuiklyUI/docs/Compose/modifier.md |
| Animation System | references/KuiklyUI/docs/Compose/animation-system.md |
| Gesture System | references/KuiklyUI/docs/Compose/gesture-system.md |
| State Management | references/KuiklyUI/docs/Compose/status-management.md |
| Navigation | references/KuiklyUI/docs/Compose/navigation.md |
| ViewModel | references/KuiklyUI/docs/Compose/view-model.md |
| FAQ | references/KuiklyUI/docs/Compose/faq.md |
| Capabilities Overview | references/KuiklyUI/docs/Compose/status.md |
Source Code Reference
| Resource | Path |
|---|---|
| Compose Source Code | references/KuiklyUI/compose/src/commonMain/kotlin/com/tencent/kuikly/compose/ |
| Demo Example | references/KuiklyUI/demo/src/commonMain/kotlin/com/tencent/kuikly/demo/pages/compose/ |
Interoperability with Traditional DSL
When you need to use traditional Kuikly DSL components or modules in Compose:
| Resource | Path |
|---|---|
| Compose View Embedding | references/KuiklyUI/docs/DevGuide/compose-view.md |
| Compose Interop DSL | Reference kuikly-compose-interop-dsl skill |
System Modules (General)
Compose DSL can also use Kuikly's system modules:
| Module | Documentation Path |
|---|---|
| RouterModule (Routing) | references/KuiklyUI/docs/API/modules/router.md |
| NetworkModule (Network) | references/KuiklyUI/docs/API/modules/network.md |
| SharedPreferencesModule (Storage) | references/KuiklyUI/docs/API/modules/sp.md |
| NotifyModule (Notification) | references/KuiklyUI/docs/API/modules/notify.md |
| MemoryCacheModule (Cache) | references/KuiklyUI/docs/API/modules/memory-cache.md |
| CodecModule (Codec) | references/KuiklyUI/docs/API/modules/codec.md |
Common Task Quick Index
| Task | Reference Documentation | Source Code Reference |
|---|---|---|
| Compose Page Creation | docs/ComposeDSL/quickStart.md |
demo/src/.../compose/ Example in |
| Layout (Column/Row/Box) | docs/Compose/layout.md |
Compose Source Code |
| List (LazyColumn/LazyRow) | docs/Compose/list-and-scroll.md |
Compose Source Code |
| Modifier Usage | docs/Compose/modifier.md |
Compose Source Code |
| Animation Effects | docs/Compose/animation-system.md |
Compose Source Code |
| Gesture Handling | docs/Compose/gesture-system.md |
Compose Source Code |
| State Management | docs/Compose/status-management.md |
Compose Source Code |
| Page Navigation | docs/Compose/navigation.md |
Compose Source Code |
| ViewModel | docs/Compose/view-model.md |
Compose Source Code |
| Network Request | docs/API/modules/network.md |
Search "NetworkModule" |
| Local Storage | docs/API/modules/sp.md |
Search "SharedPreferencesModule" |
| Interoperability with traditional DSL | docs/DevGuide/compose-view.md |
kuikly-compose-interop-dsl skill |
| Custom components | docs/DevGuide/expand-native-ui.md |
core-render-{platform}/ |
| Custom modules | docs/DevGuide/expand-native-api.md |
core/src/{platform}Main/ |
| Capabilities overview | docs/Compose/status.md |
- |
| FAQ | docs/Compose/faq.md |
- |
Handling non-existent components/modules
When the component or module the user needs cannot be found in either the documentation or the source code, do not simply say "not supported"; instead:
Case 1: Compose component does not exist
我在 Kuikly Compose 文档和源码中未找到 [组件X] 组件。
不过,Kuikly 支持自定义组件扩展。我可以帮您:
1. 查阅 `references/KuiklyUI/docs/DevGuide/expand-native-ui.md` 学习如何扩展原生 UI 组件
2. 查阅 `references/KuiklyUI/docs/DevGuide/compose-view.md` 了解 Compose 与传统 DSL 互操作
3. 参考 `docs/Compose/status.md` 查看当前已支持的 Compose 能力
4. 提供替代方案或自定义实现示例
是否需要我帮您实现?
Case 2: Module/feature does not exist
我在 Kuikly 文档和源码中未找到 [功能X] 的相关 API。
不过,Kuikly 支持自定义模块扩展。我可以帮您:
1. 查阅 `references/KuiklyUI/docs/DevGuide/expand-native-api.md` 学习如何扩展原生能力
2. 创建自定义 Module 封装平台特定功能
3. 提供自定义模块的实现示例
是否需要我帮您实现自定义模块?
Development guide documentation index (general)
Quick start
- Environment setup:
references/KuiklyUI/docs/QuickStart/env-setup.md - KMP cross-platform project integration:
references/KuiklyUI/docs/QuickStart/common.md
Core concepts
- Cross-platform project mode:
references/KuiklyUI/docs/Introduction/paradigm.md - Architecture introduction:
references/KuiklyUI/docs/Introduction/arch.md
Advanced features
- Network requests:
references/KuiklyUI/docs/DevGuide/network.md - Notification mechanism:
references/KuiklyUI/docs/DevGuide/notify.md - Threads and coroutines:
references/KuiklyUI/docs/DevGuide/thread-and-coroutines.md - Timers:
references/KuiklyUI/docs/DevGuide/set-timeout.md - Resource management:
references/KuiklyUI/docs/DevGuide/assets-resource.md
Debugging and optimization
- Android debugging:
references/KuiklyUI/docs/DevGuide/android-debug.md - iOS debugging:
references/KuiklyUI/docs/DevGuide/iOS-debug.md - HarmonyOS debugging:
references/KuiklyUI/docs/DevGuide/ohos-debug.md - Performance optimization guide:
references/KuiklyUI/docs/DevGuide/kuikly-perf-guidelines.md
FAQ
- Kuikly QA summary:
references/KuiklyUI/docs/QA/kuikly-qa.md
Related skills
kuikly-ui-framework— If you need to use the traditional Kuikly DSL (attr { }/event { }syntax) to develop pages, please switch to that skill.kuikly-compose-interop-dsl— Used when embedding traditional Kuikly DSL components in Compose DSL.