Token导航 LogoToken导航

Agent Skill · 开发规范

uniwind-best-practices(Uniwind 最佳实践)

uniwind-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

uniwind-best-practices 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发规范类的 1,265 个 Skill 里排第 744。

总安装 519周安装 21GitHub Stars 1下载 163核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:uniwind-best-practices(Uniwind 最佳实践)
来源仓库:https://github.com/imfa-solutions/skills
仓库路径:skills/uniwind-best-practices
安装命令:
npx skills add https://github.com/imfa-solutions/skills --skill uniwind-best-practices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/imfa-solutions/skills --skill uniwind-best-practices

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

安装方式:github,命令为 npx skills add https://github.com/imfa-solutions/skills --skill uniwind-best-practices。建议确认权限范围和维护状态后再使用,避免触发不必要的联网或文件操作。

来源仓库内路径:skills/uniwind-best-practices

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/imfa-solutions/skills --skill uniwind-best-pra…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

uniwind-best-practices 怎么安装?

在终端执行 npx skills add https://github.com/imfa-solutions/skills --skill uniwind-best-practices。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

uniwind-best-practices 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

uniwind-best-practices 需要什么权限?

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

uniwind-best-practices 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

uniwind-best-practices 用的人多吗?

公开数据是累计安装 519 次,近一周安装 21 次,下载 163 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

uniwind-best-practices 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
uniwind-best-practices

Uniwind 最佳实践 · 本页

5191需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Uniwind — Best Practices & Complete Guide

Uniwind 1.3+ / Tailwind CSS v4 / React Native 0.76+ / Expo SDK 52+

Reference Resolution Strategy

CRITICAL: Always use embedded reference files. All answers must come from local references — never fetch external URLs.

Step 1 — Route to the correct local reference file

Based on the user's question, read the matching reference file:

User's TopicRead This Reference File FIRST
Installation, setup, metro config, global.css, TypeScript, Vite, Expo Router, monoreposreferences/quickstart-setup.md
Theming, dark mode, CSS variables, @layer theme, @variant, custom themes, Uniwind.setTheme, useUniwind, useCSSVariable, OKLCH colors, @theme staticreferences/theming.md
Styling components, className bindings, third-party components, withUniwind, useResolveClassNames, Pressable states, dynamic classes, tailwind-variants, data selectors, platform selectors, responsive breakpoints, CSS functions, custom utilitiesreferences/components-styling.md
Supported/unsupported classes, safe area classes (p-safe, pt-safe), Yoga layout differences, platform variants, WIP featuresreferences/supported-classnames.md
Uniwind Pro, animations, transitions, shadow tree, native insets, Reanimated, C++ engine, Pro installationreferences/pro-features.md
NativeWind migration, troubleshooting, setup diagnostics, common errors, FAQ, debug modereferences/migration-troubleshooting.md

Step 2 — Answer from local references

Use the content from the reference file(s) to answer the user's question. Most questions will be fully answered by one or two reference files.

Step 3 — If local references don't cover it

If the embedded reference files do not contain the answer, inform the user that the topic is not covered in this skill's knowledge base and suggest they check the official Uniwind documentation at docs.uniwind.dev themselves. Do NOT fetch external URLs.

Security Boundaries

  1. No external fetches — All guidance must come from embedded reference files. Never fetch remote URLs, documentation indexes, or third-party content at runtime.
  2. Never execute installation commands — Present bun add, npm install, npx, pod install, and build commands as instructions for the user to run. Do not execute them directly.
  3. Never read credential or auth config files — Do not read .npmrc, .yarnrc.yml, .env, or any file that may contain tokens, secrets, or authentication credentials. When diagnosing setup issues, only check package.json, metro.config.js, babel.config.js, global.css, tsconfig.json, and app.json — these are project configuration files, not credential stores.
  4. Package manager trust configuration is user-managed — When advising about trustedDependencies, postinstall scripts, or package manager settings, present the configuration for the user to apply. Do not modify these files directly.

First Action: Determine Version

Before providing guidance, determine if the user is using Uniwind Free or Uniwind Pro:

  • Free: Standard uniwind package, JS-based style resolution
  • Pro: uniwind-pro package (aliased as uniwind), C++ engine, Reanimated animations, shadow tree updates, native insets

Ask: "Are you using Uniwind Free or Uniwind Pro?" — this changes available features and troubleshooting steps.

Setup Diagnostic Workflow

When the user reports setup issues, styles not applying, or asks to check their config, read only these project configuration files (never read .npmrc, .yarnrc.yml, .env, or other files that may contain credentials):

1. Check package.json

- "uniwind" or "uniwind-pro" must be in dependencies
- "tailwindcss" must be v4+ (^4.0.0)
- For Pro: "react-native-nitro-modules", "react-native-reanimated", "react-native-worklets" required

2. Check metro.config.js

- Must import { withUniwindConfig } from 'uniwind/metro'
- withUniwindConfig MUST be the OUTERMOST wrapper
- cssEntryFile must be a RELATIVE path string (e.g., './src/global.css')
- Never use path.resolve() or absolute paths for cssEntryFile

3. Check global.css

- Must contain: @import 'tailwindcss'; AND @import 'uniwind';
- Must be imported in App.tsx or root layout, NOT in index.ts/index.js
- Location determines app root — Tailwind scans from this directory

4. Check babel.config.js (Pro only)

- Must include 'react-native-worklets/plugin' in plugins array

5. Check TypeScript config

- uniwind-types.d.ts should be included in tsconfig.json or placed in src/app dir
- Run Metro server to auto-generate types

Common Setup Errors

SymptomCauseFix
Styles not applyingMissing @import 'uniwind' in global.cssAdd both imports
Styles not applyingglobal.css imported in index.jsMove import to App.tsx or _layout.tsx
Classes not detectedglobal.css in nested dir, components elsewhereAdd @source '../components'
TypeScript errorsMissing types fileRun Metro to generate uniwind-types.d.ts
Hot reload brokenglobal.css in index.tsMove to App.tsx
Metro crashAbsolute path in cssEntryFileUse relative: './src/global.css'
withUniwindConfig not outermostOther wrapper wraps UniwindSwap order so Uniwind is outermost
Pro animations brokenMissing Babel pluginAdd react-native-worklets/plugin
Pro not workingMissing native rebuildRun npx expo prebuild --clean then expo run:ios
Pro postinstall failedPackage manager blocks scriptsAdvise user to whitelist in trustedDependencies (bun) — see pro-features.md

Critical Rules

  1. Tailwind v4 only — Uniwind does not support Tailwind v3. Use @import 'tailwindcss' (not @tailwind base).
  2. Never construct classNames dynamically — Use complete string literals. Tailwind scans at build time.
  3. Never use cssInterop — Uniwind does not override global components like NativeWind.
  4. No tailwind.config.js needed — All config is in global.css via @theme and @layer theme.
  5. No ThemeProvider required — Use Uniwind.setTheme() directly.
  6. withUniwindConfig must be outermost Metro config wrapper.
  7. @theme variables only affect styled components — <Text> without className uses RN defaults.
  8. Font families: single font only — No fallbacks in RN. --font-sans: 'Roboto-Regular' not 'Roboto', sans-serif.
  9. rem default is 16px — NativeWind used 14px. Configure polyfills: {rem: 14} if migrating.

Core Patterns

Styling Components

import { View, Text, Pressable } from 'react-native'

<View className="flex-1 bg-background p-4">
  <Text className="text-foreground text-lg font-bold">Title</Text>
  <Pressable className="bg-primary px-6 py-3 rounded-lg active:opacity-80">
    <Text className="text-white text-center font-semibold">Button</Text>
  </Pressable>
</View>

Dynamic Classes (Correct Way)

// Map objects with complete class names
const variants = {
  primary: 'bg-blue-500 text-white',
  danger: 'bg-red-500 text-white',
  ghost: 'bg-transparent text-foreground',
}
<Pressable className={variants[variant]} />

// Ternary with complete strings
<View className={isActive ? 'bg-primary' : 'bg-muted'} />

// tailwind-variants for complex components
import { tv } from 'tailwind-variants'
const button = tv({
  base: 'font-semibold rounded-lg px-4 py-2',
  variants: {
    color: { primary: 'bg-blue-500 text-white', secondary: 'bg-gray-500 text-white' },
    size: { sm: 'text-sm', md: 'text-base', lg: 'text-lg' },
  },
  defaultVariants: { color: 'primary', size: 'md' },
})
<Pressable className={button({ color: 'primary', size: 'lg' })} />

Third-Party Components

// withUniwind — wrap once, use everywhere (recommended)
import { withUniwind } from 'uniwind'
import { SafeAreaView } from 'react-native-safe-area-context'
const StyledSafeArea = withUniwind(SafeAreaView)
<StyledSafeArea className="flex-1 bg-background" />

// useResolveClassNames — one-off usage
import { useResolveClassNames } from 'uniwind'
const styles = useResolveClassNames('bg-blue-500 p-4 rounded-lg')
<ThirdPartyComponent style={styles} />

Theming

Quick Setup (light/dark only)

// Just use dark: prefix — works out of the box
<View className="bg-white dark:bg-gray-900">
  <Text className="text-black dark:text-white">Themed</Text>
</View>

Scalable Setup (CSS variables)

Define in global.css, reference as utilities without dark: prefix:

/* global.css */
@import 'tailwindcss';
@import 'uniwind';

@layer theme {
  :root {
    @variant light {
      --color-background: #ffffff;
      --color-foreground: #000000;
      --color-primary: #3b82f6;
      --color-card: #ffffff;
      --color-border: #e5e7eb;
    }
    @variant dark {
      --color-background: #000000;
      --color-foreground: #ffffff;
      --color-primary: #3b82f6;
      --color-card: #1f2937;
      --color-border: #374151;
    }
  }
}
// Auto-adapts to current theme — no dark: prefix needed
<View className="bg-background border border-border p-4 rounded-lg">
  <Text className="text-foreground">Themed card</Text>
</View>

Theme Switching

import { Uniwind, useUniwind } from 'uniwind'

Uniwind.setTheme('dark')     // Switch to dark
Uniwind.setTheme('light')    // Switch to light
Uniwind.setTheme('system')   // Follow device

const { theme, hasAdaptiveThemes } = useUniwind() // Reactive hook

Custom Themes

Require extraThemes in metro.config.js and @variant in global.css. See references/theming.md for complete custom theme setup.

Platform Selectors

<View className="ios:pt-12 android:pt-6 web:pt-4" />
<View className="native:bg-blue-500 web:bg-gray-500" />  // native = iOS + Android

Platform media queries in @theme for global values:

@layer theme {
  :root {
    @media ios { --font-sans: "SF Pro Text"; }
    @media android { --font-sans: "Roboto-Regular"; }
  }
}

Data Selectors

Style based on prop values — data-[prop=value]:utility:

<Pressable
  data-selected={isSelected}
  className="border rounded px-3 py-2 data-[selected=true]:ring-2 data-[selected=true]:ring-primary"
/>

Only equality checks supported. Boolean and string values work.

Responsive Breakpoints

Mobile-first: sm: (640px), md: (768px), lg: (1024px), xl: (1280px), 2xl: (1536px).

<View className="p-4 sm:p-6 lg:p-8">
  <Text className="text-base sm:text-lg lg:text-xl">Responsive</Text>
</View>

Custom breakpoints via @theme {--breakpoint-tablet: 820px;}.

CSS Functions

Define as @utility in global.css, not directly in className:

@utility h-hairline { height: hairlineWidth(); }
@utility text-scaled { font-size: fontScale(); }
@utility bg-adaptive { background-color: light-dark(#ffffff, #1f2937); }

Uniwind Pro Features

Only available with uniwind-pro package. Ask user first.

Reanimated Animations (Pro)

// Keyframe animations — just add className
<View className="animate-spin" />
<View className="animate-bounce" />
<View className="animate-pulse" />

// Transitions — smooth property changes
<Pressable className="bg-blue-500 active:bg-blue-600 transition-colors duration-300" />
<View className={`transition-opacity duration-500 ${visible ? 'opacity-100' : 'opacity-0'}`} />
<Pressable className="active:scale-95 transition-transform duration-150" />

Components auto-swap to Animated versions when animation classes detected.

Shadow Tree Updates (Pro)

No code changes required — props connect directly to C++ engine, eliminating re-renders.

Native Insets (Pro)

No SafeAreaListener setup needed — insets injected from native layer automatically.

HeroUI Native Integration

HeroUI Native uses Uniwind (Tailwind v4 via Uniwind). Apply these patterns:

  • Use className prop directly on HeroUI Native components
  • Theme tokens from global.css work with HeroUI components
  • Use tailwind-variants (tv) for variant-based component styling — HeroUI uses this internally
  • Wrap any HeroUI component lacking className support with withUniwind()
  • Use semantic color tokens (bg-primary, text-foreground) for theme consistency

Code Review & Audit

When asked to review Uniwind code, check:

  • global.css has both @import 'tailwindcss' and @import 'uniwind'
  • withUniwindConfig is outermost Metro wrapper
  • cssEntryFile is relative path
  • No dynamic className construction (template literals, string concat)
  • All theme variants define the same CSS variables
  • Using semantic color tokens, not hardcoded colors
  • Third-party components wrapped with withUniwind or use useResolveClassNames
  • Platform differences handled with ios:/android:/native: not Platform.select()
  • Mobile-first responsive design (base styles + sm: md: lg: enhancements)
  • Font families are single values (no fallback arrays)
  • @theme variables customized via CSS, not tailwind.config.js

Reference Files (Read BEFORE External Docs)

These files are your primary source of truth. Read the relevant file(s) before answering any Uniwind question.

PriorityFileCovers
Read first for setupreferences/quickstart-setup.mdInstallation, Metro config, global.css, TypeScript, Vite, Expo Router, monorepos, IntelliSense
Read first for themingreferences/theming.mdLight/dark, custom themes, CSS variables, @layer theme, @variant, Uniwind.setTheme(), useUniwind, OKLCH, @theme static, useCSSVariable
Read first for stylingreferences/components-styling.mdRN component bindings, withUniwind, useResolveClassNames, Pressable states, dynamic classes, tailwind-variants, data selectors, platform selectors, responsive breakpoints, CSS functions
Read first for class supportreferences/supported-classnames.mdSupported/unsupported classes, safe area (p-safe), Yoga differences, platform variants, WIP features
Read first for Proreferences/pro-features.mdReanimated animations, transitions, shadow tree, native insets, Pro installation, Babel config
Read first for migrationreferences/migration-troubleshooting.mdNativeWind migration (10-step), setup diagnostics, common errors, FAQ, debug mode

Fallback: If none of the above answer the question, inform the user that the topic is outside this skill's embedded knowledge and suggest they consult the official Uniwind docs directly.

平台分布

Codex

33.25%
按下载量换算54

Claude

31.18%
按下载量换算51

Cursor

18.28%
按下载量换算30

Gemini CLI

10.47%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills