agentleFS
salmandevsalmandev/everything-gemini/skills/astryx-agent-design-system/SKILL.md

astryx-agent-design-system

Skill2 starsChanged 33 days agoApache-2.0View on GitHub

Implements Meta Astryx agent-ready design system architecture, StyleX/CSS cascade theming, accessible React 19 component tokens, and component swizzling for autonomous AI agents. Use when scaffolding design systems, swizzling UI components, applying cascade-based theme tokens, or building agent-native user interfaces.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When building features, determine if the UI requires standard presentation or dynamic feedback states (e.g.

    line 66
  2. Distinctive:

    Use the built-in Everything Gemini Astryx runner:

    line 71
  3. Very specific:

    When implementing Astryx components, enforce native React 19 patterns (e.g.

    line 87
  4. Very specific:

    Always Provide Fallback States: Never render empty white screens while waiting for network responses or LLM completions.

    line 144

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Meta Astryx Agent-Ready Design System Architecture

The astryx-agent-design-system skill provides a comprehensive implementation framework for Meta Astryx (meta/astryx)—Meta's open-source, agent-ready design system powering 13,000+ internal production applications. It equips autonomous agents with native awareness of accessible component tokens, cascade-based dynamic theming, and component ejection ("swizzling").

Why Astryx for Autonomous AI Agents?

Traditional UI component libraries assume human visual inspection and complex bundler configurations. In contrast, Astryx is built agent-first:

  1. Agent-Ready Documentation & Schemas: Components are structured with deterministic props, explicit AGENTS.md contracts, and Model Context Protocol (MCP) support.
  2. Compile-Time StyleX with Cascade Theming: StyleX compiles to atomic CSS rules, while runtime theme overrides operate purely through CSS custom properties in the cascade—updating every descendant dynamically at paint-time without re-rendering the React virtual DOM tree.
  3. Consumer Flexibility: The underlying StyleX engine is abstracted for consumers; agents can override styles using standard className, Tailwind utilities, or CSS modules without forcing consumers into StyleX.
  4. Component Swizzling ("Eject"): Agents can scaffold pre-built components or eject full, unminified, accessible source code directly into project workspaces for granular customization.

Core Component Catalog

Astryx organizes agent-ready UI modules into functional categories:

CategoryComponentsKey Agent Invariants
Feedback & LoadingProgressBar, Spinner, Skeleton, Toast, InlineBannerDeterminate/indeterminate states, aria-busy, zero CLS
Navigation & SteppersStepper, Breadcrumb, Tabs, PaginationStep index boundaries, keyboard traversal (ArrowLeft/Right)
Data DisplayMetricCard, DataTable, Badge, Avatar, TimelineHigh contrast ratios ($\ge 4.5:1$), responsive overflow
Overlay & ModalsDialog, Sheet, Drawer, Tooltip, PopoverFocus trapping, Escape key dismissal, aria-modal="true"
Forms & ControlsButton, InputField, Select, Toggle, Slider6-state exhaustion (default, hover, active, focus, disabled, error)

Cascade-Based Token Contracts

Themes are defined as a token contract mapped to CSS custom properties:

:root {
  /* Astryx Brand Tokens */
  --astryx-color-primary: #00e5ff;
  --astryx-color-primary-hover: #00b4d8;
  --astryx-color-primary-active: #0077b6;
  --astryx-color-bg-canvas: #07090e;
  --astryx-color-bg-surface: #10141f;
  --astryx-color-bg-overlay: #1a2234;
  --astryx-color-border: rgba(66, 133, 244, 0.2);
  --astryx-color-border-glow: rgba(0, 229, 255, 0.4);

  /* Feedback Semantics */
  --astryx-color-success: #00e676;
  --astryx-color-warning: #ffab00;
  --astryx-color-danger: #ff1744;
  --astryx-color-info: #2979ff;

  /* Typography & Spacing */
  --astryx-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --astryx-font-mono: 'JetBrains Mono', monospace;
  --astryx-radius-sm: 4px;
  --astryx-radius-md: 8px;
  --astryx-radius-lg: 16px;
  --astryx-radius-full: 9999px;
  --astryx-transition-base: 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

Step-by-Step Agent Implementation Procedure

1. Identify Component Requirements

When building features, determine if the UI requires standard presentation or dynamic feedback states (e.g. data upload, LLM generation, multi-stage checkout):

  • For long-running asynchronous tasks: Mandate ProgressBar or Spinner.
  • For initial data loads: Mandate Skeleton to eliminate Cumulative Layout Shift (CLS).

2. Scaffold or Swizzle via CLI

Use the built-in Everything Gemini Astryx runner:

# List all available Astryx agent-ready components
everything-gemini astryx list

# Preview component definition in JSON or terminal format
everything-gemini astryx preview progress-bar

# Swizzle (eject) unminified component source code into src/components/ui/
everything-gemini astryx swizzle progress-bar --output ./src/components/ui

# Check Astryx design system status
everything-gemini astryx status --json

3. Implement Accessible React 19 Component

When implementing Astryx components, enforce native React 19 patterns (e.g. Action state hooks, ref as prop, zero legacy lifecycles):

import React from 'react';

export interface ProgressBarProps {
  value?: number; // 0 to 100, undefined for indeterminate
  max?: number;
  label?: string;
  variant?: 'primary' | 'success' | 'danger' | 'info';
  className?: string;
}

export const ProgressBar: React.FC<ProgressBarProps> = ({
  value,
  max = 100,
  label = 'Loading progress',
  variant = 'primary',
  className = '',
}) => {
  const isIndeterminate = value === undefined || value === null;
  const percentage = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));

  return (
    <div
      role="progressbar"
      aria-label={label}
      aria-valuenow={isIndeterminate ? undefined : Math.round(percentage)}
      aria-valuemin={0}
      aria-valuemax={max}
      aria-busy={isIndeterminate || percentage < 100}
      className={`astryx-progress-track ${className}`}
      style={{
        position: 'relative',
        width: '100%',
        height: '8px',
        backgroundColor: 'var(--astryx-color-bg-overlay)',
        borderRadius: 'var(--astryx-radius-full)',
        overflow: 'hidden',
      }}
    >
      <div
        className={`astryx-progress-fill astryx-variant-${variant} ${isIndeterminate ? 'astryx-indeterminate' : ''}`}
        style={{
          height: '100%',
          width: isIndeterminate ? '35%' : `${percentage}%`,
          backgroundColor: `var(--astryx-color-${variant})`,
          borderRadius: 'var(--astryx-radius-full)',
          transition: isIndeterminate ? 'none' : 'width var(--astryx-transition-base)',
        }}
      />
    </div>
  );
};

Best Practices & Invariants

  • Always Provide Fallback States: Never render empty white screens while waiting for network responses or LLM completions; always provide Skeleton or Spinner.
  • Enforce WCAG 2.1 AA/AAA Contrast: Text and interactive borders must meet a minimum $4.5:1$ contrast ratio against background surfaces.
  • Support Swizzling: Allow developers to eject components rather than locking them into rigid black-box npm packages.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.