astryx
БесплатноЗапускает вложенные скриптыНе проверенGenerate Astryx design system components, themes, and layouts for React 19 applications. Use when building UIs with @astryxdesign/core, creating or extending…
от greedychipmunk★ 24 звезды на GitHubОб этом скилле
Astryx
A React 19 design system by Meta. Accessible, themeable components with built-in spacing, dark mode, and StyleX styling. This skill covers installation, theming, styling, layout, CLI usage, AI integration, and migration.
When to Use
- Building React UIs with Astryx components from @astryxdesign/core
- Creating or customizing themes with defineTheme
- Styling components via StyleX (xstyle prop), Tailwind, or className
- Scaffolding pages from CLI templates
- Migrating existing Tailwind/shadcn/Radix apps to Astryx
- Using the Astryx CLI for component docs, tokens, and templates
- Connecting to the Astryx MCP server for AI-powered component discovery
- Validating Astryx code against system conventions
Packages at a Glance
| Package | Purpose |
|---|---|
@astryxdesign/core |
Component library (React 19, StyleX, dark mode) |
@stylexjs/stylex |
Atomic CSS-in-JS (peer dependency) |
@astryxdesign/cli |
CLI: component docs, templates, themes, codemods |
@astryxdesign/theme-neutral |
Muted minimal theme (good starting point) |
@astryxdesign/theme-butter |
Golden buttery surfaces, blue accents |
@astryxdesign/theme-chocolate |
Warm brown tones, cozy beige |
@astryxdesign/theme-gothic |
Dark-only atmospheric theme |
@astryxdesign/theme-matcha |
Earthy green theme |
@astryxdesign/theme-stone |
Warm stone and slate tones |
@astryxdesign/theme-y2k |
Playful Y2K pop, periwinkle + holographic |
Quick Start
Install core, StyleX, a theme, and the CLI:
npm install @astryxdesign/core @stylexjs/stylex @astryxdesign/theme-neutral @astryxdesign/cli
Add theme CSS to your global stylesheet:
@import '@astryxdesign/core/reset.css';
@import '@astryxdesign/core/astryx.css';
@import '@astryxdesign/theme-neutral/theme.css';
Wrap your app in Theme and add a component:
import {Theme} from '@astryxdesign/core';
import {neutralTheme} from '@astryxdesign/theme-neutral';
import {Button} from '@astryxdesign/core/Button';
import {VStack} from '@astryxdesign/core/Layout';
function App() {
return (
<Theme theme={neutralTheme}>
<VStack gap={2}>
<Button label="Hello Astryx" onClick={() => alert('Hi!')} />
</VStack>
</Theme>
);
}
Initialize AI agent docs (non-interactive, safe for CI):
npx @astryxdesign/cli init --features agents
Design Principles
- Components over primitives — use components before raw HTML
- Frame-first layout — pick shell and budget regions before content
- Dense data as rows — Table/List with dividers; Card for widgets and settings
- StyleX or Tailwind — both first-class; both resolve to same tokens
- Semantic tokens, not hardcoded values —
var(--color-*), not hex - CSS custom properties for colors — not hex values
- Controlled form inputs —
value+onChange - useLinkComponent() for navigation — framework router via LinkProvider
Anti-Patterns
- No
style={{}}on raw wrappers — usexstyleon components - No hardcoded colors (
#fff) — usevar(--color-*)or Tailwind semantic classes - No hardcoded spacing (
16px) — use spacing tokens or Tailwind utilities - No wrapping components in
<div>just for margin — usexstyle - No Badge as decoration — reserve for counts and enumerated states
- No inventing props — read component docs first
Token System
Tokens are CSS custom properties that adapt to the active theme and color mode.
Spacing
4px base unit. Component gap props accept step values 0–12.
| Step | Value | Step | Value |
|---|---|---|---|
| 0 | 0px | 1 | 4px |
| 0.5 | 2px | 2 | 8px |
| 1.5 | 6px | 3 | 12px |
| 4 | 16px | 8 | 32px |
| 6 | 24px | 12 | 48px |
Color
Semantic tokens describe purpose, not appearance. All use light-dark() for automatic mode switching.
Surface hierarchy: body → surface → card → popover.
Key tokens: --color-text-primary, --color-text-secondary, --color-background-surface, --color-background-body, --color-background-card, --color-background-popover, --color-border, --color-accent, --color-on-accent, --color-success, --color-error, --color-warning.
Size
Control heights: --size-element-sm (28px), --size-element-md (32px), --size-element-lg (36px).
Radius
--radius-none (0px), --radius-inner (8px), --radius-element (12px), --radius-container (16px), --radius-page (32px), --radius-chat (28px), --radius-full (9999px).
Typography
Geometric type scale: round(14 × 1.2^step). Semantic tokens combine size, weight, line-height. Use Heading and Text components — don't set font-size manually.
Font families: --font-family-body (Figtree), --font-family-code ("SF Mono"), --font-family-heading (Figtree).
Using Tokens
import * as stylex from '@stylexjs/stylex';
import {colorVars, spacingVars, radiusVars} from '@astryxdesign/core';
const styles = stylex.create({
card: {
padding:
Установить astryx в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл astryx?
Generate Astryx design system components, themes, and layouts for React 19 applications. Use when building UIs with @astryxdesign/core, creating or extending themes with defineTheme, styling components with StyleX or Tailwind, scaffolding pages from templates, migrating from shadcn or Radix, or working with the Astryx CLI and MCP server. Also use when converting plain descriptions into Astryx component code or validating existing Astryx code against system conventions.
Как установить скилл astryx?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл astryx запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic