tencent-tds/kuiklyui-ai/kuikly-compose-interop-dsl
Claude Code and agent skill by tencent-tds/kuiklyui-ai
- community
Checking that the SKILL.md file is still in the repository.
Compose DSL 混用 Kuikly DSL 完整开发助手。指导如何在 Compose DSL 页面中嵌入 Kuikly DSL 组件(DeclarativeBaseView / ViewContainer)及在 Compose 中调用 Kuikly Module。当用户需要在 Compose 页面中复用 Kuikly DSL 组件、封装原生 View 为 Composable、在 Compose 中调用 Kuikly Module时使用。
Install
npx vskill@latest install tencent-tds/kuiklyui-ai/kuikly-compose-interop-dslSKILL.md
Compose DSL 混用 Kuikly DSL 组件
⚠️ 注意:本 skill 仅适用于 Compose DSL 中混用 Kuikly DSL(即在 Compose 页面中嵌入 Kuikly DSL 组件),不支持反向在 Kuikly DSL 中混用 Compose DSL。
Contents
- ComposeContainer 页面搭建
- MakeKuiklyComposeNode API(原子 / 容器)
- 关键约束与常见错误
- Compose 中使用 Kuikly Module
- 详细参考文档
ComposeContainer 页面搭建
Compose 页面继承 ComposeContainer(即 Pager),在 willInit() 中调用 setContent {}:
ComposeContainer 继承自 Kuikly Core 的 Pager,拥有统一的跨端页面生命周期(willInit / created / pageDidAppear / pageDidDisappear / pageWillDestroy)。
MakeKuiklyComposeNode API
桥接入口,将 Kuikly DSL 组件嵌入 Compose 渲染树。两个重载:
原子组件(无子节点)
适用于 DeclarativeBaseView 子类(Video、地图等自渲染组件):
最小示例(封装 VideoView):
容器组件(有子节点)
适用于 ViewContainer 子类,可挂载 Compose 子节点:
最小示例(封装容器卡片):
关键约束与常见错误
factory 基类选择
| 场景 | 基类 | |
|---|---|---|
| 原子组件(无子节点) | DeclarativeBaseView | |
| 容器组件(有子节点) | ViewContainer | |
| ❌ 禁止 | ComposeView |
❌ 禁止将 ComposeView 子类传入 factory
ComposeView 的扁平化优化导致布局 frame 丢失,视图不可见:
viewUpdate 必须同步更新
viewInit 只在创建时调用一次;随 Compose 状态变化的属性和事件回调必须在 viewUpdate 中也设置,否则重组后不更新。
Compose 中使用 Kuikly Module
通过 LocalActivity.current.getPager() 获取 Pager 实例,再调用 acquireModule:
acquireModule找不到时抛异常;getModule找不到时返回 null。
详细参考
- 组件封装详解(原子/容器、viewInit vs viewUpdate、错误排查):COMPONENT_WRAPPING.md
- Module 使用详情(Router / Notify / SP / PageData / 自定义 Module):MODULE_USAGE.md
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/kuikly-compose-interop-dsl/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tencent-tds/kuiklyui-ai/kuikly-compose-interop-dsl)