MCPInstall

skyline-config

Skyline 小程序 JSON 配置规范技能。涵盖 app.json 全局配置(renderer、rendererOptions、componentFramework)、页面 json 配置(navigationStyle、disableScroll)、project.config.json 项目配置。适用于创建新 Skyline 项目、迁移 WebView 项目、配置混合渲染。触发关键词:app.json、页面配置、renderer、rendererOptions、skyline配置、navigationStyle、disableScroll、componentFramework、glass-easel、project.config.json。

Installs
976
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/wechat-miniprogram/skyline-skills --skill skyline-config
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads skyline-config automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Skyline JSON 配置规范

适用场景

  • 创建新的 Skyline 小程序项目
  • 从 WebView 迁移到 Skyline 渲染引擎
  • 配置混合渲染(部分页面 Skyline、部分 WebView)
  • 配置 rendererOptions 优化样式兼容性
  • 排查 Skyline 配置相关的编译错误

核心概念

三级配置层次

层级文件作用关键配置
全局app.json全局启用 Skylinerenderer, componentFramework, rendererOptions
页面页面.json页面级配置/覆盖navigationStyle, disableScroll, renderer
工具project.config.json开发者工具调试setting.skylineRenderEnable

最小必需配置

// app.json
{
  "renderer": "skyline",
  "componentFramework": "glass-easel",
  "lazyCodeLoading": "requiredComponents"
}
// 每个页面的 .json
{
  "navigationStyle": "custom"
}

文档索引

根据需求快速定位(路径相对于 references/):

我想要...查阅文档
了解 app.json 中所有 Skyline 相关配置app-config.md
了解页面级配置和混合渲染page-config.md
配置开发者工具project-config.md
查看完整配置模板patterns.md

强制规则

MUST(必须遵守)

  1. app.json 必须包含三项必需配置:

    // ❌ 错误:缺少 componentFramework 和 lazyCodeLoading
    {
      "pages": ["pages/index/index"],
      "renderer": "skyline"
    }
    
    // ✅ 正确:三项缺一不可
    {
      "renderer": "skyline",
      "componentFramework": "glass-easel",
      "lazyCodeLoading": "requiredComponents"
    }
    
  2. 每个页面的 json 必须配置 "navigationStyle": "custom":

    // ❌ 错误:缺少 navigationStyle,编译报错
    // getAppConfig error: the "navigationStyle" configuration
    // for the page should be set to "custom"
    {
      "usingComponents": {}
    }
    
    // ✅ 正确
    {
      "navigationStyle": "custom"
    }
    

    Skyline 不支持原生导航栏,必须使用自定义导航栏。

  3. 使用 scroll-view 替代页面级滚动时配置 "disableScroll": true:

    // ❌ 错误:未禁用页面滚动,可能与 scroll-view 冲突
    {
      "navigationStyle": "custom"
    }
    
    // ✅ 正确:禁用页面滚动,使用 scroll-view 管理滚动
    {
      "navigationStyle": "custom",
      "disableScroll": true
    }
    
  4. rendererOptions 应配置 defaultDisplayBlock 和 defaultContentBox 以对齐 WebView 行为:

    // ❌ 错误:未配置 rendererOptions,Skyline 默认 display:flex + border-box
    {
      "renderer": "skyline"
    }
    
    // ✅ 正确:对齐 WebView 的 block + content-box 默认行为
    {
      "renderer": "skyline",
      "rendererOptions": {
        "skyline": {
          "defaultDisplayBlock": true,
          "defaultContentBox": true
        }
      }
    }
    

NEVER(禁止行为)

  1. NEVER 遗漏任何页面的 navigationStyle: "custom" 配置——即使页面不需要导航栏,Skyline 下也必须声明
  2. NEVER 在 Skyline 页面中依赖页面级全局滚动——Skyline 不支持页面级滚动,必须使用 scroll-view 组件

Quick Reference

必需配置速查

配置项位置值级别
rendererapp.json"skyline"必需
componentFrameworkapp.json"glass-easel"必需
lazyCodeLoadingapp.json"requiredComponents"必需
navigationStyle页面 json"custom"必需
disableScroll页面 jsontrue推荐

rendererOptions 配置速查

配置项类型默认值推荐值说明
defaultDisplayBlockbooleanfalsetrue默认 display:block(对齐 WebView)
defaultContentBoxbooleanfalsetrue默认 box-sizing:content-box(对齐 WebView)
tagNameStyleIsolationstring"isolated""legacy"标签选择器全局匹配(对齐 WebView)
enableScrollViewAutoSizebooleanfalsetruescroll-view 自动撑开高度
disableABTestbooleanfalsetrue关闭 Skyline AB 实验,确保稳定性

场景决策表

场景推荐配置
新建 Skyline 项目三项必需 + rendererOptions 全部推荐值
WebView 迁移三项必需 + rendererOptions 兼容配置 + disableABTest
混合渲染app.json 不设 renderer,页面级单独设 "renderer": "skyline"
仅部分页面用 Skyline页面 json 中设 "renderer": "skyline" 覆盖全局

相关技能

场景推荐技能说明
WXSS 样式兼容skyline-wxssrendererOptions 影响的默认值详解(display/flex-direction/align-items/box-sizing)
glass-easel 框架skyline-glass-easelcomponentFramework 详细迁移指南
Skyline 概览与迁移skyline-overview渲染引擎概览、迁移步骤
组件使用skyline-componentsscroll-view 等组件配置
路由配置skyline-route自定义路由与页面转场

References 目录结构

references/
├── app-config.md
├── page-config.md
├── patterns.md
└── project-config.md

FAQ

What does the skyline-config skill do?

Skyline 小程序 JSON 配置规范技能。涵盖 app.json 全局配置(renderer、rendererOptions、componentFramework)、页面 json 配置(navigationStyle、disableScroll)、project.config.json 项目配置。适用于创建新 Skyline 项目、迁移 WebView 项目、配置混合渲染。触发关键词:app.json、页面配置、renderer、rendererOptions、skyline配置、navigationStyle、disableScroll、componentFramework、glass-easel、project.config.json。

How do I install skyline-config?

Run npx skills add https://github.com/wechat-miniprogram/skyline-skills --skill skyline-config in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/skyline-config/ (personal) or .claude/skills/skyline-config/ (project).

Which AI agents can use skyline-config?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is skyline-config safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains skyline-config?

It is published by wechat-miniprogram in wechat-miniprogram/skyline-skills. It has 976 recorded installs.

More from wechat-miniprogram/skyline-skills

View all →

skyline-components

wechat-miniprogram/skyline-skills

Skyline 组件开发技能。涵盖 scroll-view 及其增强模式(列表/嵌套滚动)、swiper 高级特性、表单组件、图片/文本组件、半屏可拖拽组件、共享元素动画等。适用于需要开发滚动列表、轮播、表单输入、页面过渡动画等场景。

1.1K installs

skyline-overview

wechat-miniprogram/skyline-skills

Skyline 渲染引擎概览与迁移技能。了解 Skyline 架构、性能优势、功能特性、迁移指南和最佳实践时使用此技能。适用于初次接触 Skyline、评估迁移成本、或需要了解整体框架的场景。

1.1K installs

skyline-worklet

wechat-miniprogram/skyline-skills

Skyline Worklet 动画系统技能。使用 worklet 函数、共享变量(SharedValue)、动画类型(timing/spring/decay)、Easing 缓动函数、组合动画和线程通信(runOnUI/runOnJS)开发高性能交互动画时使用此技能。适用于拖拽、手势跟随、弹簧回弹等需要 UI 线程直接响应的动画场景。触发关键词:worklet、worklet 动画、SharedValue、共享变量、timing、spring、decay、Easing、runOnUI、runOnJS、applyAnimatedStyle、交互动画、手势动画、UI 线程动画。

skyline-route

wechat-miniprogram/skyline-skills

Skyline 自定义路由与页面转场技能。涵盖自定义路由动画(routeBuilder)、预设路由(7 种 wx:// 类型)、页面返回手势、容器转场动画(open-container)、Router API。适用于实现半屏弹窗、页面缩放、底部弹出、卡片展开等转场效果。触发关键词:自定义路由、custom-route、routeBuilder、navigateTo、页面转场、半屏、预设路由、返回手势、open-container。

Backend & APIs996 installs

skyline-wxss

wechat-miniprogram/skyline-skills

Skyline WXSS 样式支持技能。提供 Skyline 支持的 CSS 属性、值和限制信息。触发关键词:WXSS、CSS 支持、样式兼容性、属性支持、不支持的属性、display grid、position sticky、overflow、filter、渐变、gradient、linear-gradient、radial-gradient、conic-gradient、border-style、white-space、font-weight、text-decoration、text-overflow、aspect-ratio、will-change、calc、env、mask、mask-image、background-image、transition、animation、transform、font-feature-settings。

Frontend & Design954 installs

skyline-scroll-api

wechat-miniprogram/skyline-skills

Skyline 滚动控制 API 技能。涵盖 ScrollViewContext(程序化下拉刷新、下拉二级、滚动定位)、DraggableSheetContext(半屏面板程序化滚动)、worklet.scrollViewContext(UI 线程直接控制滚动)。适用于程序化触发刷新/二级、控制 DraggableSheet 位置、在 worklet 中操作滚动。触发关键词:ScrollViewContext、DraggableSheetContext、scrollTo、triggerRefresh、triggerTwoLevel、下拉刷新API、下拉二级API、滚动API、worklet scrollViewContext。

Backend & APIs916 installs

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs