Skip to content
Development
Skill

/designer-skills

Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.

From plugin
llamafarm
83619 skills1 MCP

Claude Code

$ npx -y skills add llama-farm/llamafarm --skill designer-skills --agent claude-code

SKILL.md

designer-skills.SKILL.md
name: designer-skills
description: Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
allowed-tools: Read, Grep, Glob
user-invocable: false

Designer Skills for LlamaFarm

Framework-specific patterns and checklists for the Designer subsystem (React 18 + TanStack Query + TailwindCSS + Radix UI).

Overview

The Designer is a browser-based project workbench for building AI applications. It provides config editing, chat testing, dataset management, RAG configuration, and model selection.

Tech Stack

| Technology | Version | Purpose | |------------|---------|---------| | React | 18.2 | UI framework with StrictMode | | TypeScript | 5.2+ | Type safety | | TanStack Query | v5 | Server state management | | TailwindCSS | 3.3 | Utility-first CSS | | Radix UI | 1.x | Accessible component primitives | | Vite | 6.x | Build tooling and dev server | | React Router | v7 | Client-side routing | | Vitest | 1.x | Testing framework | | axios | 1.x | HTTP client | | framer-motion | 12.x | Animations |

Directory Structure

designer/src/
  api/          # API service modules (axios-based)
  assets/       # Static assets and icons
  components/   # Feature-organized React components
    ui/         # Radix-based primitive components
  contexts/     # React Context providers
  hooks/        # Custom hooks (TanStack Query wrappers)
  lib/          # Utilities (cn, etc.)
  types/        # TypeScript type definitions
  utils/        # Helper functions
  test/         # Test utilities, factories, mocks

Prerequisites: Shared Skills

Before applying Designer-specific patterns, ensure compliance with:

  • [TypeScript Skills](../typescript-skills/SKILL.md) - Strict typing, patterns, security
  • [React Skills](../react-skills/SKILL.md) - Component patterns, hooks, state management

Framework-Specific Guides

| Guide | Description | |-------|-------------| | [tanstack-query.md](./tanstack-query.md) | Query/Mutation patterns, caching, invalidation | | [tailwind.md](./tailwind.md) | TailwindCSS patterns, theming, responsive design | | [radix.md](./radix.md) | Radix UI component patterns, accessibility | | [performance.md](./performance.md) | Frontend optimizations, bundle size, lazy loading |

Key Patterns

API Client Configuration

// Centralized client with interceptors
export const apiClient = axios.create({
  baseURL: API_BASE_URL,
  headers: { 'Content-Type': 'application/json' },
  timeout: 60000,
})

// Error handling interceptor
apiClient.interceptors.response.use(
  response => response,
  (error: AxiosError) => {
    if (error.response?.status === 422) {
      throw new ValidationError('Validation error', error.response.data)
    }
    throw new NetworkError('Request failed', error)
  }
)

Query Client Configuration

const queryClient = new QueryClient({
  defaultOptions: {
    queries: {
      staleTime: 60_000,
      gcTime: 5 * 60_000,
      retry: 2,
      retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30_000),
      refetchOnWindowFocus: false,
    },
    mutations: { retry: 1 },
  },
})

Class Merging Utility

// lib/utils.ts - Always use cn() for Tailwind classes
import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

Theme Provider Pattern

const ThemeContext = createContext<ThemeContextType | undefined>(undefined)

export function useTheme() {
  const context = useContext(ThemeContext)
  if (!context) throw new Error('useTheme must be used within ThemeProvider')
  return context
}

// Apply via Tailwind dark mode class strategy
useEffect(() => {
  document.documentElement.classList.toggle('dark', theme === 'dark')
}, [theme])

Component Conventions

Feature Components

  • Located in `components/{Feature}/` directories
  • One component per file, named after the component
  • Co-located with feature-specific types and utilities

UI Primitives

  • Located in `components/ui/`
  • Wrap Radix UI primitives with Tailwind styling
  • Use `forwardRef` for ref forwarding
  • Set `displayName` for DevTools

Icons

  • Located in `assets/icons/`
  • Functional components accepting SVG props
  • Use `lucide-react` for standard icons

Testing

// Use MSW for API mocking
import { server } from '@/test/mocks/server'
import { renderWithProviders } from '@/test/utils'

beforeAll(() => server.listen())
afterEach(() => server.resetHandlers())
afterAll(() => server.close())

test('renders with query data', async () => {
  renderWithProviders(<MyComponent />)
  await screen.findByText('Expected text')
})

Checklist Summary

| Category | Critical | High | Medium | Low | |----------|----------|------|--------|-----| | TanStack Query | 3 | 4 | 3 | 2 | | TailwindCSS | 2 | 3 | 4 | 2 | | Radix UI | 3 | 3 | 2 | 1 | | Performance | 2 | 4 | 3 | 2 |

Read more
@llama-farm
Ships withllamafarm

Enterprise AI capabilities on your own hardware. No cloud required. LlamaFarm is an open-source AI platform that runs entirely on your hardware.

83619 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
836
Star history of llama-farm/llamafarm on GitHub, a chart by star-history.com

Other skills on llamafarm.

cli-skills

cli-skills

CLI best practices for LlamaFarm. Covers Cobra, Bubbletea, Lipgloss patterns for Go CLI development.

code-review

code-review

Comprehensive code review for diffs. Analyzes changed code for security vulnerabilities, anti-patterns, and quality issues.…

commit-push-pr

commit-push-pr

Commit changes, push to GitHub, and open a PR. Includes quality checks (security, patterns, simplification). Use --quick to skip…

common-skills

common-skills

Best practices for the Common utilities package in LlamaFarm. Covers HuggingFace Hub integration, GGUF model management, and…

config-skills

config-skills

Configuration module patterns for LlamaFarm. Covers Pydantic v2 models, JSONSchema generation, YAML processing, and validation.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about designer-skills.

Which coding agents can use designer-skills?
designer-skills installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.