用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/UltronCore/claude-skill-vault --skill tamagui命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
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.
基于 SOC 职业分类
| name | tamagui |
| version | 1.0.0 |
| description | Universal UI kit for React Native and web — performant, themeable, typed |
| tools | ["Read","Edit","Write","Bash"] |
| tags | ["mobile","web","react-native","tamagui","ui-library","universal","typescript","styled"] |
| author | claude-skill-vault |
| created | "2026-05-24T00:00:00.000Z" |
Tamagui is a universal UI library and style system that works across React Native and the web from a single codebase. It compiles styles at build time to avoid runtime overhead, ships with a complete component library, and supports themes, tokens, and animations natively. On the web it generates atomic CSS; on native it uses StyleSheet with optimized props.
# With Expo (recommended)
npx create-expo-app my-app -t with-tamagui
# Manual (Expo project)
npx expo install tamagui @tamagui/config @tamagui/babel-plugin
# Manual (Next.js)
npm install tamagui @tamagui/config @tamagui/next-plugin
// tamagui.config.ts
import { createTamagui } from 'tamagui';
import { config } from '@tamagui/config/v3';
export const tamaguiConfig = createTamagui(config);
export type Conf = typeof tamaguiConfig;
declare module 'tamagui' {
interface TamaguiCustomConfig extends Conf {}
}
export default tamaguiConfig;
// App.tsx — wrap with TamaguiProvider
import { TamaguiProvider } from 'tamagui';
import tamaguiConfig from './tamagui.config';
export default function App() {
return (
<TamaguiProvider config={tamaguiConfig} defaultTheme="light">
<AppContent />
</TamaguiProvider>
);
}
import { XStack, YStack, Text, Button } from 'tamagui';
function Card({ title, subtitle }: { title: string; subtitle: string }) {
return (
<YStack
padding="$4" // uses $4 spacing token
gap="$2"
backgroundColor="$background"
borderRadius="$4"
borderWidth={1}
borderColor="$borderColor"
>
<Text fontSize="$6" fontWeight="700" color="$color">
{title}
</Text>
<Text fontSize="$3" color="$colorSubtle">
{subtitle}
</Text>
<XStack gap="$2" justifyContent="flex-end">
<Button = =>Cancel
Confirm
);
}
import { Theme, XStack, Button, Text } from 'tamagui';
// Apply a sub-theme to a subtree
function DangerZone() {
return (
<Theme name="red">
<XStack backgroundColor="$background" padding="$4" gap="$3">
<Text color="$color">This is danger zone</Text>
<Button>Delete Account</Button>
</XStack>
</Theme>
);
}
// Dark/light toggle
import { useColorScheme } from 'react-native';
function ThemedApp() {
const scheme = useColorScheme();
return (
<TamaguiProvider config={tamaguiConfig} defaultTheme={scheme ?? 'light'}>
< />
);
}
import { YStack, Text } from 'tamagui';
function ResponsiveLayout() {
return (
<YStack
width="100%"
$gtSm={{ flexDirection: 'row', maxWidth: 800 }} // > sm breakpoint
$sm={{ flexDirection: 'column' }} // sm breakpoint
padding="$4"
>
<YStack flex={1} $gtSm={{ flex: 0.4 }}>
<Text>Sidebar</Text>
</YStack>
<YStack flex={1} $gtSm={{ flex: 0.6 }}>
<Text>Content</Text>
</YStack>
</YStack>
);
}
import { styled, Text, YStack } from 'tamagui';
// Extend existing Tamagui components
const Heading = styled(Text, {
fontSize: '$8',
fontWeight: '700',
color: '$color',
variants: {
size: {
sm: { fontSize: '$6' },
md: { fontSize: '$8' },
lg: { fontSize: '$10' },
},
muted: {
true: { color: '$colorSubtle', opacity: 0.7 },
},
} as const,
});
const Card = styled(YStack, {
backgroundColor: '$background',
borderRadius: '$4',
padding: '$4',
borderWidth: 1,
borderColor: '$borderColor',
pressStyle: { opacity: 0.8 },
hoverStyle: { borderColor: },
});
import { AnimatePresence, YStack } from 'tamagui';
import { useState } from 'react';
function FadeToggle() {
const [show, setShow] = useState(true);
return (
<>
<Button onPress={() => setShow(v => !v)}>Toggle</Button>
<AnimatePresence>
{show && (
<YStack
key="content"
animation="quick" // built-in animation preset
enterStyle={{ opacity: 0, y: -10 }}
exitStyle={{ opacity: 0, y: 10 }}
>
<Text>Animated content</Text>
</YStack>
)}
</AnimatePresence>
</>
);
}
import { Sheet, Button, YStack, Text } from 'tamagui';
import { useState } from 'react';
function BottomSheetExample() {
const [open, setOpen] = useState(false);
return (
<>
<Button onPress={() => setOpen(true)}>Open Sheet</Button>
<Sheet
open={open}
onOpenChange={setOpen}
snapPoints={[85, 50, 25]}
dismissOnSnapToBottom
animation="medium"
>
<Sheet.Overlay />
<Sheet.Handle />
<Sheet.Frame padding="$4">
<YStack gap="$3">
<Text fontSize="$6" fontWeight="700">Sheet Title</Text>
Sheet content goes here.
setOpen(false)}>Close
);
}
@tamagui/babel-plugin, styles don't compile and performance degrades significantly — always configure it$token vs raw values: always prefer $4 (token) over 16 (raw) — tokens respond to theme changes; raw values don'tpressStyle/hoverStyle not on arbitrary components: pseudo-styles only work on Tamagui's native interactable components or components that pass through interaction props$gtSm, $lg, etc. work on web via CSS; on native they're evaluated at runtime — test both@tamagui/next-plugin: without it, server-rendered HTML has no styles and there's a flash of unstyled contentnativewind — Tailwind alternative for React Native without universal ambitionexpo-router — routing that pairs naturally with Tamaguireact-native-reanimated — advanced animations beyond Tamagui's built-insreact-native-best-practices — React Native fundamentalsdomain: mobile,frontend/web
tier: library
runtime: ios,android,browser
language: tsx,ts
framework: react-native,expo,next
purpose: ui-components