用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Dev-Toolbelt/dev-team-agents --skill chakra-ui命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | chakra-ui |
| description | Chakra UI — accessible React components. v2/v3 APIs incompatible. |
@chakra-ui/react in package.jsonChakraProvider (v2) or Provider (v3) at app root@emotion/react and @emotion/styled dependenciesp, m, color, bg, fontSize as JSX props)extendTheme import (v2) or createSystem import (v3)No official MCP server is available for Chakra UI.
Reference the docs for the correct version:
- v2: v2.chakra-ui.com
- v3: chakra-ui.com
Configure a documentation search MCP if your CLI supports one.
# Check installed version before writing any code
cat package.json | grep "@chakra-ui/react"
| Signal | Version |
|---|---|
extendTheme, ChakraProvider | v2 |
createSystem, Provider | v3 |
v2 and v3 APIs are incompatible. Do not mix patterns. Confirm version before writing a single line.
| Concept | Detail |
|---|---|
| ChakraProvider / Provider | Wraps app — required; components without it render unstyled or throw |
| Style props | CSS properties as component props: p={4}, color="gray.700", bg="blue.50" |
| Color tokens | Semantic scale: blue.500, gray.100, red.600 — not raw hex |
| Responsive values | Array syntax (mobile-first): <Box fontSize={['sm', 'md', 'lg']}> |
useColorMode() | Toggle dark/light; useColorModeValue('light-val', 'dark-val') for tokens |
useTheme() | Access theme tokens in component logic |
// Provider at root
import { ChakraProvider } from '@chakra-ui/react'
const theme = extendTheme({
colors: { brand: { 500: '#3182CE' } },
fonts: { heading: 'Inter, sans-serif' },
})
<ChakraProvider theme={theme}><App /></ChakraProvider>
// Style props — always use tokens, not hex
<Box p={4} bg="gray.50" borderRadius="md" shadow="sm">
<Text color="gray.700" fontSize="sm" fontWeight="medium">Content</Text>
</Box>
// Responsive — array is mobile-first breakpoints
<Stack direction={['column', 'row']} spacing={4} />
// Dark mode
<Box bg={useColorModeValue('', '')}>
gray.500) not hex values — tokens adapt to dark/light mode automaticallyuseColorModeValue() for dark mode — never hardcode separate color values for each modeStack/HStack/VStack over manual Flex + flexDirection — clearer intent, less props@chakra-ui/react, not @chakra-ui/button; tree-shaking handles the rest