designer-skills
Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
Best use case
designer-skills is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
Teams using designer-skills should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/designer-skills/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How designer-skills Compares
| Feature / Agent | designer-skills | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Designer subsystem patterns for LlamaFarm. Covers React 18, TanStack Query, TailwindCSS, and Radix UI.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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
```typescript
// 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
```typescript
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
```typescript
// 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
```typescript
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
```typescript
// 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 |Related Skills
typescript-skills
Shared TypeScript best practices for Designer and Electron subsystems.
server-skills
Server-specific best practices for FastAPI, Celery, and Pydantic. Extends python-skills with framework-specific patterns.
runtime-skills
Universal Runtime best practices for PyTorch inference, Transformers models, and FastAPI serving. Covers device management, model loading, memory optimization, and performance tuning.
react-skills
React 18 patterns for LlamaFarm Designer. Covers components, hooks, TanStack Query, and testing.
rag-skills
RAG-specific best practices for LlamaIndex, ChromaDB, and Celery workers. Covers ingestion, retrieval, embeddings, and performance.
python-skills
Shared Python best practices for LlamaFarm. Covers patterns, async, typing, testing, error handling, and security.
go-skills
Shared Go best practices for LlamaFarm CLI. Covers idiomatic patterns, error handling, and testing.
generate-subsystem-skills
Generate specialized skills for each subsystem in the monorepo. Creates shared language skills and subsystem-specific checklists for high-quality AI code generation.
config-skills
Configuration module patterns for LlamaFarm. Covers Pydantic v2 models, JSONSchema generation, YAML processing, and validation.
common-skills
Best practices for the Common utilities package in LlamaFarm. Covers HuggingFace Hub integration, GGUF model management, and shared utilities.
cli-skills
CLI best practices for LlamaFarm. Covers Cobra, Bubbletea, Lipgloss patterns for Go CLI development.
electron-skills
Electron patterns for LlamaFarm Desktop. Covers main/renderer processes, IPC, security, and packaging.