Skyline Route logo

Skyline Route

Organization
wechat-miniprogram
skyline-route

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

Overview

Publisherwechat-miniprogram
Repositoryskyline-skills
Skill nameskyline-route
Stars
56
Forks
2
Bundled files
8
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wechat-miniprogram on GitHub. Read the source before you install it.

Installation

Install the Skyline Route AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wechat-miniprogram/skyline-skills/tree/master/skills/skyline-route
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wechat-miniprogram/skyline-skills.git /tmp/skyline-skills
mkdir -p .claude/skills
cp -r /tmp/skyline-skills/skills/skyline-route .claude/skills/skyline-route
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skyline Route in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skyline Route on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skyline Route is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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 页面不支持自定义路由

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

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

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

    js
    // ✅ 正确:动画完成后调用 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
js
// 使用预设路由
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

自定义路由最小示例

js
// 注册:从右滑入
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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Skyline Route AI skill do?

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

Why use Skyline Route on TypingMind?

Because you install it once and use it with any model. Skyline Route is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skyline Route in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wechat-miniprogram/skyline-skills/tree/master/skills/skyline-route. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Skyline Route?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skyline Route?

As many as you like. As long as a model supports skills, you can use Skyline Route with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skyline Route AI skill free?

Yes. It is published on GitHub by wechat-miniprogram under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇