AgentSkillsCN

liftera-ui

Liftera UI 规范:基于 Gluestack UI 与 @acme/ui 共享组件。触发条件:当您创建或修改共享 UI 组件、设计系统基础组件,或在 packages/ui 中实现跨平台样式时,即可触发此技能。

SKILL.md
--- frontmatter
name: liftera-ui
description: >
  Liftera UI conventions: Gluestack UI + @acme/ui shared components.
  Trigger: When creating or modifying shared UI components, design system primitives, or cross-platform styling in packages/ui.
license: Apache-2.0
metadata:
  author: liftera
  version: "1.0"
  scope: [root, ui]
  auto_invoke: "Creating/modifying shared UI components"
allowed-tools: Read, Edit, Write, Glob, Grep, Bash, WebFetch, WebSearch, Task

Source of Truth (REQUIRED)

  • ALWAYS treat packages/ui as the source of truth for reusable UI.
  • NEVER duplicate components across apps/web and apps/mobile.

Component Placement (REQUIRED)

  • ALWAYS put Gluestack primitives/wrappers under packages/ui/src/gluestack/*.
  • ALWAYS put project components under packages/ui/src/components/*.
  • ALWAYS export components through stable entrypoints (avoid deep imports across apps/packages).

Cross-Platform Constraints (REQUIRED)

  • ALWAYS ensure components work in both React Native and React Native Web unless explicitly documented.
  • NEVER use DOM-only APIs inside shared UI components.
  • ALWAYS use platform files when needed (*.native.tsx, *.web.tsx).

Styling Rules

  • ALWAYS use NativeWind/Tailwind utility classes consistently.
  • ALWAYS keep variants predictable (small set of variants, explicit defaults).

Imports & Usage

  • ALWAYS import shared components via the package name (example from README):
    • @acme/ui/gluestack/*
    • @acme/ui/components/*