用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/infometa/workbuddyskills --skill skyline-overview命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | skyline-overview |
| description | Skyline 渲染引擎概览与迁移技能。了解 Skyline 架构、性能优势、功能特性、迁移指南和最佳实践时使用此技能。适用于初次接触 Skyline、评估迁移成本、或需要了解整体框架的场景。 |
Skyline 是微信小程序的新一代渲染引擎,相比 WebView 有以下优势:
| 对比项 | WebView | Skyline |
|---|---|---|
| 渲染线程 | 与 JS 逻辑同线程 | 独立渲染线程 |
| 页面内存 | 每页一个 WebView | 共享渲染实例 |
| 首屏性能 | 较慢 | 快 66%+ |
| 光栅化 | 异步分块 | 同步(无白屏) |
| 页面栈限制 | 最多 10 层 | 无限制(连续 Skyline 页面) |
| 平台 | 最低版本 | 基础库版本 |
|---|---|---|
| Android | 微信 8.0.40+ | 3.0.2+ |
| iOS | 微信 8.0.40+ | 3.0.2+ |
| HarmonyOS | 微信 1.0.10+ | 3.11.3+ |
| 开发者工具 | Stable 1.06.2307260+ | - |
{
"renderer": "skyline",
"lazyCodeLoading": "requiredComponents",
"componentFramework": "glass-easel",
"rendererOptions": {
"skyline": {
"defaultDisplayBlock": true,
"defaultContentBox": true,
"tagNameStyleIsolation": "legacy",
"enableScrollViewAutoSize": true,
"keyframeStyleIsolation": "legacy"
}
}
}
{
"navigationStyle": "custom",
"disableScroll": true
}
⚠️ MUST: Skyline 不支持原生导航栏,必须设置
navigationStyle: custom并自行实现导航栏。
根据需求快速定位(路径相对于 references/):
| 我想要... | 查阅文档 |
|---|---|
| 了解 Skyline 架构和优势 | introduction/overview.md |
| 查看支持的特性 | introduction/features.md |
| 查看性能对比数据 | performance/comparison.md |
| 开始迁移项目 | migration/getting-started.md |
| 处理兼容性问题 | migration/compatibility.md |
| 发布上线指南 | migration/release.md |
| 查看更新日志 | changelog/changelog.md |
| 检测 Skyline 支持 | api/getSkylineInfo.md |
| 预加载 Skyline 环境 | api/preloadSkylineView.md |
renderer、lazyCodeLoading、componentFramework 三项navigationStyle: customscroll-view 实现滚动,禁止依赖全局滚动<text> 组件包裹wx.preloadSkylineView()Page.onPageScroll 事件(使用 scroll-view 的滚动事件替代)web-view 组件renderer: "skyline"lazyCodeLoading: "requiredComponents"componentFramework: "glass-easel"rendererOptions.skyline 配置navigationStyle: "custom"disableScroll: true<text> 包裹Page({
onLoad() {
// 页面/组件实例上有 renderer 属性
console.log(this.renderer) // 'skyline' 或 'webview'
}
})
// 异步方式
wx.getSkylineInfo({
success(res) {
console.log(res.isSupported) // 是否支持 Skyline
console.log(res.version) // Skyline 版本号
}
})
// 同步方式
const info = wx.getSkylineInfoSync()
console.log(info.isSupported, info.version)
// 在可能跳转到 Skyline 页面的页面中
Page({
onShow() {
// 延迟调用避免阻塞当前页面
setTimeout(() => {
wx.preloadSkylineView()
}, 500)
}
})
<!-- 列表项必须作为 scroll-view 直接子节点 -->
<scroll-view type="list" scroll-y>
<view wx:for="{{list}}" wx:key="id">{{item.name}}</view>
</scroll-view>
<!-- 启用样式共享 -->
<scroll-view type="list" scroll-y>
<view wx:for="{{list}}" wx:key="id" list-item>{{item.name}}</view>
</scroll-view>
| 场景 | 推荐技能 | 说明 |
|---|---|---|
| 配置详解 | skyline-config | JSON 配置项完整说明 |
| 样式开发 | skyline-wxss | WXSS 支持与差异 |
| 组件开发 | skyline-components | 组件使用指南 |
| 动画开发 | skyline-worklet | Worklet 动画系统 |
| 路由开发 | skyline-route | 自定义路由和转场 |
references/
├── introduction/ # 概览与介绍
│ ├── overview.md # Skyline 简介与架构
│ ├── features.md # 功能特性详解
│ └── component-support.md # 组件支持情况
├── migration/ # 迁移指南
│ ├── getting-started.md # 迁移起步
│ ├── compatibility.md # 常见兼容问题
│ ├── best-practice.md # 最佳实践
│ └── release.md # 发布上线
├── api/ # 相关 API
│ ├── getSkylineInfo.md # 获取 Skyline 信息
│ └── preloadSkylineView.md # 预加载环境
├── performance/ # 性能相关
│ └── comparison.md # 性能对比
└── changelog/ # 更新日志
└── changelog.md # 版本更新记录