Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计未展示

gluestack-nativewind胶水堆栈原生风

Agent Skill

gluestack-nativewind 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

315

周安装

13

GitHub Stars

公开资料未说明

下载量

103
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gluestack-nativewind(胶水堆栈原生风)
来源仓库:https://github.com/codyswanngt/lisa
仓库路径:skills/gluestack-nativewind
安装命令:
npx skills add codyswanngt/lisa --skill "gluestack-nativewind"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add codyswanngt/lisa --skill "gluestack-nativewind"

简介

发现并安装 AI 代理的技能。

  • 适用于在 Codex、Claude、Cursor、Gemini CLI 中扩展 Agent 能力。
  • 支持基于仓库路径的灵活技能加载与集成。
  • 使用 github 安装命令:npx skills add codyswanngt/lisa --skill "gluestack-nativewind"。
  • 需确认宿主环境兼容性及文件读写权限。

SKILL.md

Gluestack NativeWind Design Patterns

This skill enforces constrained, opinionated styling patterns that reduce decision fatigue, improve performance, enable consistent theming, and limit the solution space to canonical patterns.

Core Principles

  1. Gluestack components over React Native primitives - Gluestack wraps RN with theming, accessibility, and cross-platform consistency
  2. Semantic tokens over arbitrary values - Tokens encode intent, not just appearance
  3. className over inline styles - Inline styles bypass optimization and consistency
  4. Spacing scale over pixel values - Arbitrary values create unsustainable exceptions
  5. Remove dead code - Unused patterns mislead AI and increase cognitive load

When to Use This Skill

  • Creating new components with styling
  • Reviewing existing component styles
  • Refactoring styles to follow the design system
  • Fixing styling inconsistencies
  • Adding dark mode support
  • Theming components

Rule 1: Gluestack Components Over React Native Primitives

Always use Gluestack components instead of direct React Native imports:

React NativeGluestack Equivalent
View from "react-native"Box from "@/components/ui/box"
Text from "react-native"Text from "@/components/ui/text"
TouchableOpacity from "react-native"Pressable from "@/components/ui/pressable"
ScrollView from "react-native"ScrollView from "@/components/ui/scroll-view"
Image from "react-native"Image from "@/components/ui/image"
TextInput from "react-native"Input, InputField from "@/components/ui/input"
FlatList from "react-native"FlashList from "@shopify/flash-list"

Correct Pattern

import { Box } from "@/components/ui/box";
import { Text } from "@/components/ui/text";
import { Pressable } from "@/components/ui/pressable";

const Component = () => (
  <Box className="p-4">
    <Text className="text-typography-900">Hello</Text>
    <Pressable onPress={handlePress}>
      <Text>Press Me</Text>
    </Pressable>
  </Box>
);

Incorrect Pattern

import { View, Text, TouchableOpacity } from "react-native";

const Component = () => (
  <View style={{ padding: 16 }}>
    <Text style={{ color: "#333" }}>Hello</Text>
    <TouchableOpacity onPress={handlePress}>
      <Text>Press Me</Text>
    </TouchableOpacity>
  </View>
);

Exceptions

  • Platform-specific code where RN primitives are explicitly required
  • Deep integration with native modules
  • Performance-critical paths where wrapper overhead matters (rare, must document)

Rule 2: Semantic Color Tokens Over Raw Values

Use Gluestack semantic tokens instead of raw Tailwind colors:

Instead ofUse
text-red-500text-error-500
text-green-500text-success-500
text-yellow-500text-warning-500
text-blue-500text-info-500
text-gray-500text-typography-500
bg-blue-600bg-primary-600
border-gray-200border-outline-200
#DC2626 (inline)text-error-600

Available Semantic Token Categories

TokenPurposeScale
primary-{0-950}Brand identity, key interactive elements0-950
secondary-{0-950}Secondary actions, supporting elements0-950
tertiary-{0-950}Tertiary accents0-950
error-{0-950}Validation errors, destructive actions0-950
success-{0-950}Positive feedback, completions0-950
warning-{0-950}Alerts, attention-required states0-950
info-{0-950}Informational content0-950
typography-{0-950}Text colors0-950
outline-{0-950}Border colors0-950
background-{0-950}Background colors0-950

Special Background Tokens

Use state-based background tokens:

  • bg-background-error - Error state backgrounds
  • bg-background-warning - Warning state backgrounds
  • bg-background-success - Success state backgrounds
  • bg-background-muted - Muted/disabled backgrounds
  • bg-background-info - Informational backgrounds

Correct Pattern

<Box className="bg-error-500">
  <Text className="text-typography-0">Error message</Text>
</Box>

<Box className="border border-outline-300 bg-background-50">
  <Text className="text-success-600">Success!</Text>
</Box>

Incorrect Pattern

<Box className="bg-red-500">
  <Text className="text-white">Error message</Text>
</Box>

<Box style={{ backgroundColor: '#DC2626' }}>
  <Text style={{ color: 'green' }}>Success!</Text>
</Box>

For complete token reference, see references/color-tokens.md.

Rule 3: No Inline Styles

Avoid inline style props when className can achieve the same result.

Resolution Hierarchy (in order of preference)

  1. className utilities - Use existing Tailwind/NativeWind classes
  2. Gluestack component variants - Use built-in component variants
  3. tva (Tailwind Variant Authority) - Create reusable variant patterns
  4. NativeWind interop - Enable className on third-party components
  5. Inline styles - Only as absolute last resort with documented justification

Correct Pattern

<Box className="w-20 h-20 rounded-full bg-background-100" />

<Text className="text-lg font-bold text-typography-900" />

Incorrect Pattern

<Box
  style={{
    width: 80,
    height: 80,
    borderRadius: 40,
    backgroundColor: "rgba(255, 255, 255, 0.1)",
  }}
/>

Acceptable Exceptions

Inline styles are acceptable for:

  1. Dynamic values - Values computed at runtime (e.g., animation values, safe area insets)
  2. Third-party component requirements - Components that don't support className
  3. Platform-specific overrides - When Platform.select is needed
// Acceptable: dynamic value from hook
<Box style={{ paddingBottom: bottomInset }} />

// Acceptable: animation value
<Animated.View style={{ transform: [{ translateX: animatedValue }] }} />

Rule 4: Spacing Scale Adherence

Use only values from the standard spacing scale. Arbitrary values create maintenance burden.

Allowed Spacing Values

ClassSize
00px
0.52px
14px
1.56px
28px
2.510px
312px
3.514px
416px
520px
624px
728px
832px
936px
1040px
1144px
1248px
1456px
1664px
2080px
2496px
28112px
32128px
36144px
40160px
44176px
48192px
52208px
56224px
60240px
64256px
72288px
80320px
96384px

Prohibited Patterns

  • Arbitrary values: p-[13px], m-[27px], gap-[15px]
  • Non-scale decimals: p-2.7, m-4.3

Correct Pattern

<Box className="p-4 m-2 gap-3" />
<Box className="px-6 py-4 mt-8" />

Incorrect Pattern

<Box className="p-[13px] m-[27px]" />
<Box style={{ padding: 13, margin: 27 }} />

For complete spacing reference, see references/spacing-scale.md.

Rule 5: Dark Mode Using CSS Variables

Use the CSS variables approach with dark: prefix for dark mode support.

Correct Pattern

<Box className="bg-background-0 dark:bg-background-950" />
<Text className="text-typography-900 dark:text-typography-0" />

Component-Level Dark Mode

const CardView = ({ isDark }: { readonly isDark: boolean }) => (
  <Box className={isDark ? "bg-background-950" : "bg-background-0"}>
    <Text className={isDark ? "text-typography-0" : "text-typography-900"}>
      Content
    </Text>
  </Box>
);

Rule 6: Gluestack Sub-Component Pattern

Use Gluestack's composable sub-component pattern for complex components.

Correct Pattern

<Button action="primary" size="md">
  <ButtonText>Click Me</ButtonText>
  <ButtonIcon as={ChevronRightIcon} />
</Button>

<Input variant="outline" size="md">
  <InputField placeholder="Enter text" />
  <InputSlot>
    <InputIcon as={SearchIcon} />
  </InputSlot>
</Input>

<Select>
  <SelectTrigger>
    <SelectInput placeholder="Select option" />
    <SelectIcon as={ChevronDownIcon} />
  </SelectTrigger>
  <SelectPortal>
    <SelectBackdrop />
    <SelectContent>
      <SelectItem label="Option 1" value="1" />
      <SelectItem label="Option 2" value="2" />
    </SelectContent>
  </SelectPortal>
</Select>

Incorrect Pattern

// Missing sub-components
<Button>Click Me</Button>

// Text must be wrapped in ButtonText
<Button>
  Click Me  {/* Will not render correctly */}
</Button>

Rule 7: Variant-Based Styling with tva

For components with multiple style variants, use tva (Tailwind Variant Authority).

Correct Pattern

import { tva } from "@gluestack-ui/nativewind-utils/tva";

const cardStyles = tva({
  base: "rounded-lg p-4",
  variants: {
    variant: {
      elevated: "bg-background-0 shadow-hard-2",
      outlined: "bg-transparent border border-outline-200",
      filled: "bg-background-50",
    },
    size: {
      sm: "p-2",
      md: "p-4",
      lg: "p-6",
    },
  },
  defaultVariants: {
    variant: "elevated",
    size: "md",
  },
});

const Card = ({ variant, size, className }: CardProps) => (
  <Box className={cardStyles({ variant, size, className })} />
);

Rule 8: className Merging for Custom Components

Allow className override in custom components using string concatenation.

Correct Pattern

interface BoxCardProps {
  readonly className?: string;
  readonly children: React.ReactNode;
}

const BoxCard = ({ className, children }: BoxCardProps) => (
  <Box className={`rounded-lg bg-background-0 p-4 ${className ?? ""}`}>
    {children}
  </Box>
);

Validation

To validate styling compliance, run:

python3 .claude/skills/gluestack-nativewind/scripts/validate_styling.py [path]

The script detects:

  1. Direct React Native component imports with Gluestack equivalents
  2. Raw color values without semantic tokens
  3. Inline style objects where className could be used
  4. Arbitrary bracket notation values
  5. Non-scale spacing values

Escalation Guidance

When a design request cannot be satisfied with existing patterns:

  1. Push back early - Explain performance and maintenance implications
  2. Propose alternatives - Map to existing tokens or suggest new semantic tokens
  3. Add to design system - If truly needed, add token to tailwind.config.js
  4. Document exception - If inline style is unavoidable, add JSDoc explaining why

Reference Documentation

For detailed mappings and complete token lists:

  • references/component-mapping.md - Gluestack equivalents for React Native primitives
  • references/color-tokens.md - Complete semantic color token reference
  • references/spacing-scale.md - Allowed spacing values with pixel equivalents

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

50.81%
按下载量换算52

amp

27.38%
按下载量换算28

Antigravity

12.53%
按下载量换算13

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills