Back to list
llama-farm

designer-skills

by llama-farm

Deploy any AI model, agent, database, RAG, and pipeline locally or remotely in minutes

792🍴 45📅 Jan 23, 2026

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

TechnologyVersionPurpose
React18.2UI framework with StrictMode
TypeScript5.2+Type safety
TanStack Queryv5Server state management
TailwindCSS3.3Utility-first CSS
Radix UI1.xAccessible component primitives
Vite6.xBuild tooling and dev server
React Routerv7Client-side routing
Vitest1.xTesting framework
axios1.xHTTP client
framer-motion12.xAnimations

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:

Framework-Specific Guides

GuideDescription
tanstack-query.mdQuery/Mutation patterns, caching, invalidation
tailwind.mdTailwindCSS patterns, theming, responsive design
radix.mdRadix UI component patterns, accessibility
performance.mdFrontend 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

CategoryCriticalHighMediumLow
TanStack Query3432
TailwindCSS2342
Radix UI3321
Performance2432

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 500以上

+10
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

0/5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon