MCPInstall

skyline-route

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

Installs
996
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-route
  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-route 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 自定义路由与页面转场

适用场景

  • 实现自定义页面转场动画(半屏、缩放、渐显等)
  • 使用预设路由快速实现常见转场效果
  • 配置页面返回手势(横向/纵向/多方向)
  • 实现卡片展开到详情页的容器转场动画
  • 通过 Router API 管理自定义路由

核心概念

路由能力层级

层级能力适用场景
预设路由一行代码使用 7 种内置效果快速实现常见转场
自定义路由通过 routeBuilder 完全控制动画高度定制化转场
容器转场<open-container> 元素级过渡卡片展开到详情页

动画控制器

属性说明
primaryAnimation页面进入/退出动画进度(0→1 进入,1→0 退出)
secondaryAnimation下一页进入时当前页动画进度(与下一页 primaryAnimation 同步)
userGestureInProgress当前路由进度是否由手势控制
startUserGesture / stopUserGesture手势接管/释放路由控制
didPop确认返回上一页

文档索引

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

我想要...查阅文档
了解自定义路由原理和接口custom-route/custom-route-guide.md
查看半屏/手势返回代码模式custom-route/route-patterns.md
快速使用预设路由preset-route/preset-route.md
配置页面返回手势pop-gesture/pop-gesture.md
实现卡片展开转场open-container/open-container.md
查看 Router APIapi/router-api.md
了解 navigateTo 路由参数api/navigate-to.md
监听路由事件api/route-events.md

强制规则

MUST(必须遵守)

  1. 自定义路由仅在连续 Skyline 页面间生效:WebView 页面不支持自定义路由

    // ✅ A 页(Skyline) → B 页(Skyline):自定义路由生效
    // ❌ A 页(WebView) → B 页(Skyline):降级为默认路由
    
  2. 动画处理函数必须声明 'worklet' 指令:

    // ✅ 正确
    const handlePrimaryAnimation = () => {
      'worklet'
      return { transform: `translateX(${...}px)` }
    }
    
    // ❌ 错误:缺少 worklet 指令,无法在 UI 线程执行
    const handlePrimaryAnimation = () => {
      return { transform: `translateX(${...}px)` }
    }
    
  3. 手势接管必须成对调用 startUserGesture / stopUserGesture:

    // ✅ 正确
    handleDragStart() {
      'worklet'
      this.customRouteContext.startUserGesture()
    }
    handleDragEnd() {
      'worklet'
      // ... 动画完成回调中:
      stopUserGesture()
    }
    
  4. 确认返回时必须调用 didPop:引擎无法自动判断开发者是否要退出页面

    // ✅ 正确:动画完成后调用 didPop
    primaryAnimation.value = timing(0.0, { duration }, () => {
      'worklet'
      didPop()
      stopUserGesture()
    })
    

NEVER(禁止行为)

  1. NEVER 在手势处理中忘记调用 startUserGesture 就直接修改 primaryAnimation.value
  2. NEVER 假设自定义路由在 WebView 页面生效(低版本基础库会降级)
  3. NEVER 在非 worklet 函数中访问 primaryAnimation.value

Quick Reference

预设路由速查

routeType效果最低基础库
wx://bottom-sheet底部弹出半屏3.1.0
wx://upwards自底向上全屏3.1.0
wx://zoom缩放进入3.1.0
wx://cupertino-modaliOS 风格模态3.1.0
wx://cupertino-modal-insideiOS 模态内嵌3.1.0
wx://modal-navigation模态导航3.1.0
wx://modal模态弹窗3.1.0
// 使用预设路由
wx.navigateTo({
  url: 'xxx',
  routeType: 'wx://bottom-sheet',
  routeOptions: { height: 60, round: true }
})

API 速查

API说明最低基础库
wx.router.addRouteBuilder(type, builder)注册自定义路由2.29.2
wx.router.removeRouteBuilder(type)移除自定义路由2.29.2
wx.router.getRouteContext(this)获取路由上下文2.29.2
wx.navigateTo({ routeType })指定路由类型跳转2.29.2
wx.navigateTo({ routeConfig })覆盖路由配置3.4.0
wx.navigateTo({ routeOptions })传入路由参数3.4.0
wx.navigateTo({ withOpenContainer })容器转场跳转3.12.2
wx.onBeforeAppRoute(fn)路由执行前监听3.5.5
wx.onAppRoute(fn)路由执行后监听3.5.5

自定义路由最小示例

// 注册:从右滑入
wx.router.addRouteBuilder('slide', ({ primaryAnimation }) => {
  const { windowWidth } = wx.getWindowInfo()
  const handlePrimaryAnimation = () => {
    'worklet'
    const transX = windowWidth * (1 - primaryAnimation.value)
    return { transform: `translateX(${transX}px)` }
  }
  return { handlePrimaryAnimation }
})

// 跳转
wx.navigateTo({ url: 'pageB', routeType: 'slide' })

场景决策表

场景推荐方案
底部弹出半屏预设路由 wx://bottom-sheet
iOS 风格模态预设路由 wx://cupertino-modal
自定义半屏 + 手势自定义路由 + handlePrimaryAnimation
卡片展开到详情页<open-container> 容器转场
页面渐显效果自定义路由 + opacity 动画
需要纵向返回手势popGestureDirection: 'vertical'

相关技能

场景推荐技能说明
动画开发skyline-workletWorklet 动画系统(timing/spring/Easing)
手势处理skyline-componentsgesture-handler 手势组件
共享元素skyline-componentsshare-element 页面间动画
配置详解skyline-configapp.json/page.json 配置
概览迁移skyline-overviewSkyline 概览与迁移指南

References 目录结构

references/
├── api/
│   ├── navigate-to.md
│   ├── route-events.md
│   └── router-api.md
├── custom-route/
│   ├── custom-route-guide.md
│   └── route-patterns.md
├── open-container/
│   └── open-container.md
├── pop-gesture/
│   └── pop-gesture.md
└── preset-route/
    └── preset-route.md

FAQ

What does the skyline-route skill do?

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

How do I install skyline-route?

Run npx skills add https://github.com/wechat-miniprogram/skyline-skills --skill skyline-route 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-route/ (personal) or .claude/skills/skyline-route/ (project).

Which AI agents can use skyline-route?

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-route 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-route?

It is published by wechat-miniprogram in wechat-miniprogram/skyline-skills. It has 996 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-config

wechat-miniprogram/skyline-skills

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。

976 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 backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs