mcpField
D
designer-skills

designer-skills

github.com/llama-farm開発83645 回インストール21 週間前に更新
リポジトリ

designer-skills について

designer-skills は、LlamaFarm のブラウザベースの Designer サブシステム向けに、フレームワーク固有のパターンとコードレビュー用チェックリストを提供します。React、TanStack Query、TailwindCSS、Radix UI を扱う開発者向けです。

主な機能

  1. 01TanStack Query のパターン
  2. 02TailwindCSS のスタイル指針
  3. 03Radix UI のアクセシビリティパターン
  4. 04フロントエンド性能チェックリスト
  5. 05コンポーネントとテストの規約

活用シーン

  1. 01Designer UI コンポーネントの実装
  2. 02クエリとミューテーションのレビュー
  3. 03Radix UI のアクセシビリティパターンの適用
  4. 04フロントエンド性能とテストの確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/llama-farm/llamafarm --skill designer-skills

インストール後、Claude Code で/designer-skillsを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

performance.md
radix.md
tailwind.md
tanstack-query.md

詳細

LlamaFarm の Designer スキル

Designer サブシステム(React 18 + TanStack Query + TailwindCSS + Radix UI)向けのフレームワーク固有のパターンとチェックリストです。

概要

Designer は、AI アプリケーションを構築するためのブラウザベースのプロジェクトワークベンチです。設定編集、チャットテスト、データセット管理、RAG 設定、モデル選択を提供します。

技術スタック

技術バージョン用途
React18.2StrictMode を備えた UI フレームワーク
TypeScript5.2+型安全性
TanStack Queryv5サーバー状態管理
TailwindCSS3.3ユーティリティファースト CSS
Radix UI1.xアクセシブルなコンポーネントプリミティブ
Vite6.xビルドツールと開発サーバー
React Routerv7クライアントサイドルーティング
Vitest1.xテストフレームワーク
axios1.xHTTP クライアント
framer-motion12.xアニメーション

ディレクトリ構成

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

前提条件:共有スキル

Designer 固有のパターンを適用する前に、以下に準拠していることを確認してください。

フレームワーク固有のガイド

ガイド説明
tanstack-query.mdクエリ/ミューテーションのパターン、キャッシュ、無効化
tailwind.mdTailwindCSS のパターン、テーマ設定、レスポンシブデザイン
radix.mdRadix UI コンポーネントのパターン、アクセシビリティ
performance.mdフロントエンドの最適化、バンドルサイズ、遅延読み込み

主なパターン

API クライアントの設定
// 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)
  }
)
クエリクライアントの設定
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 },
  },
})
クラス結合ユーティリティ
// 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))
}
テーマプロバイダーのパターン
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])

コンポーネント規約

機能コンポーネント
  • components/{Feature}/ ディレクトリに配置します
  • 1 ファイルにつき 1 コンポーネントとし、コンポーネント名を付けます
  • 機能固有の型やユーティリティと同じ場所に配置します
UI プリミティブ
  • components/ui/ に配置します
  • Radix UI プリミティブを Tailwind スタイルでラップします
  • ref の転送には forwardRef を使用します
  • DevTools 向けに displayName を設定します
アイコン
  • assets/icons/ に配置します
  • SVG props を受け取る関数コンポーネントです
  • 標準アイコンには lucide-react を使用します

テスト

// 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')
})

チェックリストの概要

カテゴリー重大高中低
TanStack Query3432
TailwindCSS2342
Radix UI3321
パフォーマンス2432

コメント