Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

gluestack-ui-v4胶水堆栈用户界面 v4

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

9,884

周安装

416

GitHub Stars

1

下载量

3,461
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/gluestack/agent-skills --skill gluestack-ui-v4

简介

gluestack-ui-v4 用于辅助界面设计和视觉规范优化。

  • 适合生成 UI 方案、检查布局一致性和交互体验。
  • 可结合品牌和设计系统输出结构建议,但需通过浏览器预览验证。
  • 安装命令:npx skills add https://github.com/gluestack/agent-skills --skill gluestack-ui-v4。
  • 建议确认权限范围和维护状态,注意是否触发联网或文件读写。

SKILL.md

Gluestack UI v4 Design Patterns

This skill enforces constrained, opinionated styling patterns for gluestack-ui v4 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. Component props over className utilities - Use built-in props (size, variant, space) instead of className when available
  3. Semantic tokens ONLY - NO EXCEPTIONS - NEVER use generic tokens (typography-*, neutral-*, gray-*) or numbered colors (red-500, blue-600). ONLY use semantic tokens (text-foreground, bg-primary, border-border, etc.) with optional alpha values
  4. className over inline styles - Inline styles bypass optimization and consistency
  5. Spacing scale over pixel values - Arbitrary values create unsustainable exceptions
  6. Copy-paste philosophy - Components are copied into your codebase, not installed as dependencies
  7. Composable sub-components - Use compound component patterns for flexibility
  8. 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
  • Copying components from gluestack-ui into your project

Before using any component, always verify the latest usage patterns at https://v4.gluestack.io/ui/docs/components/${componentName}/

Sub-Skills Organization

This skill is organized into specialized sub-skills for better token efficiency:

1. gluestack-ui-v4:setup

Use for: Initial project setup, installation, configuration, adding components

Covers:

  • Using the official CLI (npx gluestack-ui@alpha init -y and npx gluestack-ui@alpha add --all -y)
  • Project initialization for Expo, React Native CLI, and Next.js
  • Dependency management
  • Configuration files (tailwind, metro, babel, etc.)
  • GluestackUIProvider setup
  • Adding individual components
  • Troubleshooting setup issues

Invoke when: Setting up gluestack-ui in a new or existing project, adding components via CLI, or troubleshooting installation issues

2. gluestack-ui-v4:creating-components

Use for: Step-by-step component creation, templates, recipes

Covers:

  • Component creation workflow
  • 6 ready-to-use templates (simple, variants, compound, form, interactive, loading)
  • Common component recipes (profile cards, badges, search, lists)
  • Best practices checklist
  • Quick start guide

Invoke when: Creating new components from scratch or need component templates

3. gluestack-ui-v4:components

Use for: Component usage, compound patterns, icons, provider setup

Covers:

  • Using Gluestack components over React Native primitives
  • Component props vs className utilities
  • Compound component patterns (Input, Button, FormControl, etc.)
  • Icon usage hierarchy
  • Provider setup

Invoke when: Working with component structure, props, and composition

4. gluestack-ui-v4:styling

Use for: Colors, spacing, dark mode, variants, className

Covers:

  • Semantic color tokens
  • Spacing scale adherence
  • Dark mode with CSS variables
  • Variant-based styling with tva
  • className merging

Invoke when: Styling components, theming, or working with colors and spacing

5. gluestack-ui-v4:variants

Use for: Creating custom variants for components, extending design system

Covers:

  • When and how to create variants
  • Using tva for variant management
  • Extending existing Gluestack components
  • Parent-child variant relationships
  • Compound variants for complex combinations
  • Common variant patterns (badges, alerts, cards)
  • Converting repeated styles to variants

Invoke when: Need to create custom variants for components, extend component styling options, or standardize repeated style patterns

6. gluestack-ui-v4:performance

Use for: Cross-platform, performance optimization, best practices

Covers:

  • Cross-platform rendering (Native & Web)
  • TypeScript usage
  • Component memoization
  • Animations with Reanimated
  • Safe area handling
  • FlatList for lists
  • Platform-specific code

Invoke when: Optimizing performance, ensuring cross-platform compatibility, or following React Native best practices

7. gluestack-ui-v4:validation

Use for: Code review, anti-patterns, validation checklist

Covers:

  • Complete validation checklist
  • Anti-patterns to avoid
  • Common mistakes
  • Escalation guidance

Invoke when: Reviewing code, validating implementation, or checking for anti-patterns

Quick Reference

Resolution Hierarchy (in order of preference)

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

Common Patterns

// Component usage with props
<VStack space="lg" className="p-4">
  <Heading size="xl" bold>Title</Heading>
  <Text size="md" className="text-muted-foreground">Description</Text>
</VStack>

// Button with compound components
<Button variant="outline" size="lg">
  <ButtonText>Click Me</ButtonText>
  <ButtonIcon as={ChevronRightIcon} />
</Button>

// Input with icon (InputIcon MUST be in InputSlot)
<Input>
  <InputSlot>
    <InputIcon as={MailIcon} className="text-muted-foreground" />
  </InputSlot>
  <InputField placeholder="Enter email" />
</Input>

// Semantic color tokens
<Box className="bg-primary text-primary-foreground">
  <Text className="text-foreground">Content</Text>
</Box>

Key Rules Summary

  1. Always use Gluestack components instead of React Native primitives
  2. Use component props (space, size, variant) instead of className when available
  3. CRITICAL: ONLY semantic tokens for colors - NEVER use typography-*, neutral-*, gray-*, slate-*, or numbered colors (red-500, blue-600). ONLY use semantic tokens: text-foreground, text-muted-foreground, bg-primary, bg-card, border-border, etc. with optional alpha values (/70, /90)
  4. No inline styles unless absolutely necessary
  5. Follow spacing scale (0, 0.5, 1, 2, 3, 4, etc.) - no arbitrary values
  6. Compound components required - ButtonText, InputSlot, FormControlLabel, etc.
  7. InputIcon MUST be wrapped in InputSlot - this is critical
  8. Use tva for variants when creating custom components with multiple styles
  9. Dark mode with dark: prefix - uses CSS variables
  10. Cross-platform compatible - use Gluestack wrappers, not direct React Native imports

Reference Documentation

IMPORTANT: Always verify component usage and patterns in the official v4 documentation before using components.

  • Component Docs: https://v4.gluestack.io/ui/docs/components/${componentName}/
  • Complete Documentation: https://v4.gluestack.io/ui/docs
  • Import Path: @/components/ui/${componentName}

How to Use Sub-Skills

When working on specific tasks, invoke the appropriate sub-skill for detailed guidance:

  • Setting up gluestack-ui or adding components? → Use gluestack-ui-v4:setup
  • Creating a new component? → Use gluestack-ui-v4:creating-components
  • Component structure questions? → Use gluestack-ui-v4:components
  • Styling and theming questions? → Use gluestack-ui-v4:styling
  • Creating or extending component variants? → Use gluestack-ui-v4:variants
  • Performance or cross-platform questions? → Use gluestack-ui-v4:performance
  • Need to validate or review code? → Use gluestack-ui-v4:validation

Each sub-skill provides focused, detailed guidance on its specific domain while maintaining consistency with these core principles.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

展示第三方安全扫描或审计结果

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

平台分布

Codex

36.46%
按下载量换算1,262

Claude

31.86%
按下载量换算1,103

Cursor

18.36%
按下载量换算635

Gemini CLI

10.31%
按下载量换算357

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills