用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/UltronCore/claude-skill-vault --skill nativewind命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Validate environment configuration files across local, staging, and production environments. Ensure required secrets, database URLs, API keys, and public variables are properly scoped and set. Use this skill when setting up environments, validating configuration, checking for missing secrets, auditing environment variables, ensuring proper scoping of public vs private vars, or troubleshooting environment issues. Trigger terms include env, environment variables, secrets, configuration, .env file, environment validation, missing variables, config check, NEXT_PUBLIC, env vars, database URL, API keys.
Build Raycast extensions using the Raycast API: commands, list views, forms, and preferences. Triggers on: Raycast, @raycast/api, raycast extension, raycast command, showToast, List.Item, Action.
正在显示 SKILL.md
基于 SOC 职业分类
| name | nativewind |
| version | 1.0.0 |
| description | Tailwind CSS utility classes for React Native — universal styling |
| tools | ["Read","Edit","Write","Bash"] |
| tags | ["mobile","react-native","expo","tailwind","nativewind","styling","typescript","universal"] |
| author | claude-skill-vault |
| created | "2026-05-24T00:00:00.000Z" |
NativeWind uses Tailwind CSS as a universal styling language for React Native. Write className strings with Tailwind utility classes and NativeWind compiles them to React Native StyleSheet objects at build time. v4 (current) targets Expo SDK 52+ and uses CSS variables for theming, making dark mode and custom themes effortless.
# NativeWind v4 with Expo
npx expo install nativewind tailwindcss react-native-reanimated react-native-safe-area-context
# Run the setup command (configures babel, metro, tsconfig)
npx expo customize metro.config.js
// tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./app/**/*.{js,jsx,ts,tsx}',
'./components/**/*.{js,jsx,ts,tsx}',
],
presets: [require('nativewind/preset')],
theme: {
extend: {
colors: {
brand: '#6366f1',
},
},
},
};
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const { withNativeWind } = require('nativewind/metro');
const config = getDefaultConfig(__dirname);
module.exports = withNativeWind(config, { input: './global.css' });
/* global.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
// app/_layout.tsx
import '../global.css';
// nativewind-env.d.ts (TypeScript support)
/// <reference types="nativewind/types" />
import { View, Text, Pressable } from 'react-native';
function Button({ label, onPress }: { label: string; onPress: () => void }) {
return (
<Pressable
className="bg-indigo-600 rounded-xl px-6 py-3 active:opacity-70"
onPress={onPress}
>
<Text className="text-white font-semibold text-base text-center">
{label}
</Text>
</Pressable>
);
}
function Card({ title, body }: { title: string; body: string }) {
return (
<View className="bg-white dark:bg-zinc-900 rounded-2xl p-4 shadow-sm mx-4 my-2">
<Text className="text-zinc-900 dark:text-white text-lg font-bold mb-1">
{title}
</Text>
<Text className="text-zinc-500 dark:text-zinc-400 text-sm leading-relaxed">
{body}
</Text>
</View>
);
}
import { useColorScheme } from 'nativewind';
function ThemeToggle() {
const { colorScheme, toggleColorScheme } = useColorScheme();
return (
<Pressable
className="flex-row items-center gap-2 p-3 rounded-lg bg-zinc-100 dark:bg-zinc-800"
onPress={toggleColorScheme}
>
<Text className="text-zinc-900 dark:text-white">
{colorScheme === 'dark' ? 'Light Mode' : 'Dark Mode'}
</Text>
</Pressable>
);
}
import { cn } from '@/lib/utils'; // clsx + twMerge helper
import { View, Text } from 'react-native';
type BadgeVariant = 'default' | 'success' | 'warning' | 'error';
function Badge({ label, variant = 'default' }: { label: string; variant?: BadgeVariant }) {
return (
<View
className={cn(
'px-2 py-0.5 rounded-full self-start',
variant === 'default' && 'bg-zinc-100 dark:bg-zinc-800',
variant === 'success' && 'bg-green-100 dark:bg-green-900',
variant === 'warning' && 'bg-amber-100 dark:bg-amber-900',
variant === 'error' && 'bg-red-100 dark:bg-red-900',
)}
>
<Text
className={cn(
'text-xs font-medium',
variant === 'default' && ' ',
=== && ' ',
=== && ' ',
=== && ' ',
)}
>
{label}
);
}
// lib/utils.ts — cn helper
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
import { View, Text } from 'react-native';
// NativeWind v4 supports platform modifiers
function PlatformAdaptive() {
return (
<View className="ios:pt-12 android:pt-8 web:pt-4 px-4 bg-white dark:bg-black">
<Text className="ios:text-lg android:text-base font-semibold">
Platform-specific styles
</Text>
</View>
);
}
import { FlatList, View, Text } from 'react-native';
interface Item { id: string; title: string; subtitle: string; }
function ItemRow({ item }: { item: Item }) {
return (
<View className="flex-row items-center px-4 py-3 border-b border-zinc-100 dark:border-zinc-800">
<View className="w-10 h-10 rounded-full bg-indigo-100 dark:bg-indigo-900 items-center justify-center mr-3">
<Text className="text-indigo-600 dark:text-indigo-300 font-bold text-base">
{item.title[0]}
</Text>
</View>
<View className="flex-1">
<Text className="text-zinc-900 dark:text-white font-medium">{item.title}</Text>
<Text className="text-zinc-500 dark:text-zinc-400 text-sm">{item.subtitle}</Text>
</View>
</>
);
}
() {
(
);
}
/* global.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--color-primary: 99 102 241; /* indigo-500 */
--color-background: 255 255 255;
--color-foreground: 24 24 27;
}
.dark {
--color-primary: 129 140 248; /* indigo-400 */
--color-background: 9 9 11;
--color-foreground: 244 244 245;
}
}
// tailwind.config.js
theme: {
extend: {
colors: {
primary: 'rgb(var(--color-primary) / <alpha-value>)',
background: 'rgb(var(--color-background) / <alpha-value>)',
foreground: 'rgb(var(--color-foreground) / <alpha-value>)',
},
},
}
"bg-" + color — Tailwind's static analyzer won't find them; use cn() with full class names or a cva variant mapnpx expo start --clear after modifying tailwind.config.js or metro.config.jsgrid, display: inline, and CSS Grid don't work on native — use flexbox equivalentsclassName prop only works on core RN primitives: third-party components don't accept className unless they spread props — wrap them in a View with NativeWind or use cssInteropstyled() HOC from nativewind; v4 uses native className prop — don't mix tutorials from different versionstamagui — full UI kit alternative with more complete universal componentsexpo-router — routing that pairs naturally with NativeWindreact-native-reanimated — animations complementing NativeWind stylingreact-native-best-practices — React Native fundamentalstailwind-shadcn-ui-setup — web Tailwind setup for comparisondomain: mobile
tier: library
runtime: ios,android,browser
language: tsx,ts,css
framework: react-native,expo
purpose: styling