Communitygithub.com

フロントエンドコンポーネントスキル

Next.js 16+のApp Routerでは、サーバーコンポーネントがデフォルトで使用されます。クライアントコンポーネントは、インタラクティブ性が必要な場合(フック、イベントハンドラ、ブラウザAPI)にのみ使用されます。

フロントエンドコンポーネントスキル とは?

このスキルは、Next.js 16+のApp Router環境において、サーバーコンポーネントとクライアントコンポーネントの適切な使い分けをガイドします。サーバーコンポーネントをデフォルトとし、ページやレイアウト、静的コンテンツに使用します。一方、クライアントコンポーネントは、ユーザー操作やブラウザAPIが必要な場合に限り「use client」ディレクティブを付けて使用します。スキルには、ProtectedRoute、LoadingSpinner、フォーム処理、トースト通知、ドラッグ&ドロップ、Undo/Redoなど、実用的なコンポーネントパターンがTypeScriptコード例とともに豊富に含まれています。また、Tailwind CSSのユーティリティクラスやダークモード、レスポンシブデザインのパターン、WCAG 2.1 AAに準拠したアクセシビリティパターン、ファイル命名規則、そして開発環境の制約(ESLint、Prettier、TypeScript strict mode)も網羅しています。

対応~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/asmayaseen/frontend-component

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

フロントエンドコンポーネントスキル は何をしますか?

目的: サーバー/クライアントパターンと既存のコンポーネント構造に従ったNext.jsコンポーネント作成のガイダンス。

概要

Next.js 16+は、デフォルトでApp Routerとサーバーコンポーネントを使用します。クライアントコンポーネントは、インタラクティブ性が必要な場合(フック、イベントハンドラ、ブラウザAPI)にのみ使用されます。

サーバーコンポーネント vs クライアントコンポーネント

サーバーコンポーネント(デフォルト)

使用するケース:

  • ページとレイアウト
  • 静的コンテンツ
  • APIからのデータ取得(可能な場合)
  • SEO最適化されたコンテンツ

パターン:

// "use client" ディレクティブなし
import { Metadata } from "next";

export const metadata: Metadata = {
  title: "ページタイトル",
};

export default function PageComponent() {
  return <div>静的コンテンツ</div>;
}

例: frontend/app/layout.tsx, frontend/app/page.tsx

クライアントコンポーネント(必要な場合)

使用するケース:

  • インタラクティブ要素(ボタン、フォーム、入力フィールド)
  • イベントハンドラ(onClick、onChangeなど)
  • Reactフック(useState、useEffect、useRouterなど)
  • ブラウザAPI(localStorage、window、documentなど)
  • リアルタイム更新
  • ドラッグ&ドロップ機能

パターン:

"use client"; // 必ず先頭行に記述

import { useState, useEffect } from "react";
import { useRouter } from "next/navigation";

interface ComponentProps {
  prop1: string;
  prop2?: number;
}

export default function ComponentName({ prop1, prop2 }: ComponentProps) {
  const router = useRouter();
  const [state, setState] = useState("");

  useEffect(() => {
    // 副作用
  }, []);

  return <div>{/* コンポーネントのJSX */}</div>;
}

例: frontend/components/ProtectedRoute.tsx, frontend/app/signup/page.tsx

コンポーネント構造テンプレート

"use client"; // クライアントコンポーネントの場合のみ

/**
 * コンポーネント名
 *
 * このコンポーネントが何をするかの簡単な説明
 */

import { useState, useEffect } from "react";
import { ComponentType } from "@/types";
import { cn } from "@/lib/utils";

interface ComponentProps {
  prop1: string;
  prop2?: number;
  className?: string;
}

export default function ComponentName({ prop1, prop2, className }: ComponentProps) {
  // 状態
  const [state, setState] = useState("");

  // 副作用
  useEffect(() => {
    // 副作用
  }, []);

  // ハンドラ
  const handleClick = () => {
    // ハンドラのロジック
  };

  // レンダー
  return (
    <div className={cn("base-classes", className)}>
      {/* コンポーネントの内容 */}
    </div>
  );
}

特定コンポーネントパターン

1. ProtectedRouteパターン

出典: frontend/components/ProtectedRoute.tsx

"use client";

import { useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import { isAuthenticated } from "@/lib/auth";
import LoadingSpinner from "./LoadingSpinner";

interface ProtectedRouteProps {
  children: React.ReactNode;
}

export default function ProtectedRoute({ children }: ProtectedRouteProps) {
  const router = useRouter();
  const [isAuthorized, setIsAuthorized] = useState(false);
  const [isChecking, setIsChecking] = useState(true);

  useEffect(() => {
    async function checkAuth() {
      try {
        const authenticated = await isAuthenticated();

        if (!authenticated) {
          const currentPath = window.location.pathname;
          if (currentPath !== "/signin") {
            sessionStorage.setItem("redirectAfterLogin", currentPath);
          }
          router.push("/signin");
        } else {
          setIsAuthorized(true);
        }
      } catch (error) {
        console.error("認証チェックに失敗しました:", error);
        router.push("/signin");
      } finally {
        setIsChecking(false);
      }
    }

    checkAuth();
  }, [router]);

  if (isChecking) {
    return (
      <div className="min-h-screen flex items-center justify-center">
        <LoadingSpinner size="large" />
      </div>
    );
  }

  if (!isAuthorized) {
    return null;
  }

  return <>{children}</>;
}

パターン:

  • マウント時に認証を確認
  • 確認中はローディングスピナーを表示
  • 目的の遷移先をsessionStorageに保存
  • 認証されていない場合は/signinにリダイレクト
  • 認証されている場合のみ子要素をレンダリング

2. LoadingSpinnerパターン

出典: frontend/components/LoadingSpinner.tsx

interface LoadingSpinnerProps {
  size?: "small" | "medium" | "large";
  color?: string;
  label?: string;
}

export default function LoadingSpinner({
  size = "medium",
  color = "blue",
  label = "読み込み中...",
}: LoadingSpinnerProps) {
  const sizeClasses = {
    small: "w-4 h-4 border-2",
    medium: "w-8 h-8 border-3",
    large: "w-12 h-12 border-4",
  };

  const colorClasses = {
    blue: "border-blue-600 border-t-transparent",
    gray: "border-gray-600 border-t-transparent",
    white: "border-white border-t-transparent",
  };

  const spinnerClass = `${sizeClasses[size]} ${
    colorClasses[color as keyof typeof colorClasses] || colorClasses.blue
  } rounded-full animate-spin`;

  return (
    <div
      className="flex items-center justify-center"
      role="status"
      aria-label={label}
      aria-live="polite"
    >
      <div className={spinnerClass}></div>
      <span className="sr-only">{label}</span>
    </div>
  );
}

パターン:

  • 複数のサイズ(small、medium、large)
  • 複数の色(blue、gray、white)
  • アクセシビリティラベル(role="status"、aria-label、aria-live)
  • sr-onlyクラスを使用したスクリーンリーダー用テキスト

3. フォーム処理パターン

出典: frontend/app/signup/page.tsx

"use client";

import { useState } from "react";
import { useRouter } from "next/navigation";
import { api } from "@/lib/api";
import { isValidEmail, getPasswordStrength } from "@/lib/utils";

export default function SignupPage() {
  const router = useRouter();
  const [formData, setFormData] = useState({
    name: "",
    email: "",
    password: "",
  });
  const [errors, setErrors] = useState<Record<string, string>>({});
  const [isLoading, setIsLoading] = useState(false);
  const [apiError, setApiError] = useState("");

  const validateForm = (): boolean => {
    const newErrors: Record<string, string> = {};

    if (!formData.name.trim()) {
      newErrors.name = "名前は必須です";
    }

    if (!formData.email.trim()) {
      newErrors.email = "メールアドレスは必須です";
    } else if (!isValidEmail(formData.email)) {
      newErrors.email = "有効なメールアドレスを入力してください";
    }

    // その他のバリデーション...

    setErrors(newErrors);
    return Object.keys(newErrors).length === 0;
  };

  const handleSubmit = async (e: React.FormEvent) => {
    e.preventDefault();
    setApiError("");

    if (!validateForm()) {
      return;
    }

    setIsLoading(true);

    try {
      const response = await api.signup(formData);
      if (response.success) {
        router.push("/dashboard");
      } else {
        setApiError(response.message || "サインアップに失敗しました");
      }
    } catch (error: any) {
      setApiError(error.message || "エラーが発生しました");
    } finally {
      setIsLoading(false);
    }
  };

  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
    const { name, value } = e.target;
    setFormData((prev) => ({ ...prev, [name]: value }));
    // ユーザーが入力を開始したら、このフィールドのエラーをクリア
    if (errors[name]) {
      setErrors((prev) => ({ ...prev, [name]: "" }));
    }
  };

  return (
    <form onSubmit={handleSubmit}>
      {/* フォームフィールド */}
    </form>
  );
}

パターン:

  • フォームデータ、エラー、ローディング、APIエラー用の個別の状態
  • ブール値を返すバリデーション関数
  • 入力変更時にエラーをクリア
  • 送信中はローディング状態
  • エラー処理のためのtry-catch
  • 成功時にリダイレクト

4. ToastNotificationパターン

出典: frontend/components/ToastNotification.tsx

"use client";

import { useEffect, useState } from "react";
import { ToastMessage, ToastType } from "@/types";

export function useToast() {
  const [toasts, setToasts] = useState<ToastMessage[]>([]);

  const showToast = (type: ToastType, message: string, duration?: number) => {
    const id = `toast-${Date.now()}-${Math.random()}`;
    const newToast: ToastMessage = {
      id,
      type,
      message,
      duration,
    };
    setToasts((prev) => [...prev, newToast]);
  };

  const dismissToast = (id: string) => {
    setToasts((prev) => prev.filter((toast) => toast.id !== id));
  };

  return {
    toasts,
    showToast,
    dismissToast,
    success: (message: string, duration?: number) => showToast("success", message, duration),
    error: (message: string, duration?: number) => showToast("error", message, duration),
    // ...
  };
}

パターン:

  • トースト管理のためのカスタムフック
  • 時間指定による自動非表示
  • 複数のトーストをスタック表示
  • ヘルパーメソッド(success、error、warning、info)

Tailwind CSSパターン

1. ユーティリティクラスのみを使用

<div className="flex items-center justify-center gap-4 p-6 bg-white rounded-lg shadow-md">

パターン: Tailwindのユーティリティクラスを使用し、インラインスタイルは使用しない

2. cn() ユーティリティを使った条件付きクラス

import { cn } from "@/lib/utils";

<div className={cn(
  "base-classes",
  condition && "conditional-classes",
  className // プロパティによるオーバーライドを許可
)}>

パターン: 条件付きクラスには @/lib/utils の cn() を使用

3. ダークモード対応

<div className="bg-white dark:bg-gray-800 text-gray-900 dark:text-white">

パターン: ダークモードスタイルには dark: プレフィックスを使用

4. レスポンシブデザイン

<div className="w-full sm:w-1/2 md:w-1/3 lg:w-1/4">

パターン: ブレークポイントプレフィックス(sm:、md:、lg:、xl:)を使用

アクセシビリティパターン(WCAG 2.1 AA)

1. ARIAラベル

<button aria-label="ダイアログを閉じる">×</button>
<div role="status" aria-live="polite" aria-label="読み込み中...">

パターン: アイコンのみのボタンには常に aria-label を提供

2. セマンティックHTML

<nav>
  <ul>
    <li><a href="/">ホーム</a></li>
  </ul>
</nav>

パターン: セマンティックHTML要素(nav、main、section、articleなど)を使用

3. キーボードナビゲーション

<button
  onClick={handleClick}
  onKeyDown={(e) => {
    if (e.key === "Enter" || e.key === " ") {
      handleClick();
    }
  }}
>

パターン: すべてのインタラクティブ要素でキーボードアクセシビリティを確保

4. スクリーンリーダー用テキスト

<span className="sr-only">コンテンツを読み込み中</span>

パターン: スクリーンリーダーのみに表示するテキストには sr-only クラスを使用

5. フォーカス管理

<input
  autoFocus
  className="focus:outline-none focus:ring-2 focus:ring-blue-500"
/>

パターン: 常に可視のフォーカスインジケータを提供

ファイル命名規則

  • ページ: ケバブケース(例: signup.tsx、signin.tsx)
  • コンポーネント: パスカルケース(例: TaskList.tsx、TaskItem.tsx)
  • レイアウト: layout.tsx
  • エラーページ: error.tsx、not-found.tsx

憲法要件

  • FR-033: Next.js 16+ App Router構造 ✅
  • FR-034: サーバーコンポーネントがデフォルト、必要な場合のみクライアント ✅
  • FR-035: エラーバウンダリ ✅
  • FR-036: WCAG 2.1 AA準拠 ✅
  • FR-037: TypeScript strictモード ✅
  • FR-038: Prettierフォーマット ✅
  • FR-039: ESLintルール ✅

参考資料

  • 仕様書: specs/002-frontend-todo-app/spec.md - コンポーネント仕様
  • 既存コンポーネント: frontend/components/*.tsx - コンポーネント例
  • 既存ページ: frontend/app/*.tsx - ページ例

高度なコンポーネントパターン

1. ドラッグ&ドロップパターン(フェーズ7 - T065)

ライブラリ: @dnd-kit/core

"use client";

import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
import { SortableContext, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";

export default function SortableTaskList({ tasks, onReorder }: Props) {
  const sensors = useSensors(
    useSensor(PointerSensor),
    useSensor(KeyboardSensor, {
      coordinateGetter: sortableKeyboardCoordinates,
    })
  );

  const handleDragEnd = (event: DragEndEvent) => {
    const { active, over } = event;
    if (over && active.id !== over.id) {
      onReorder(active.id, over.id);
    }
  };

  return (
    <DndContext sensors={sensors} collisionDetection={closestCenter} onDragEnd={handleDragEnd}>
      <SortableContext items={tasks.map(t => t.id)} strategy={verticalListSortingStrategy}>
        {tasks.map(task => (
          <SortableTaskItem key={task.id} task={task} />
        ))}
      </SortableContext>
    </DndContext>
  );
}

パターン: ドラッグ&ドロップには @dnd-kit/core を使用し、ドラッグ終了時に並べ替えを処理

2. アンドゥ/リドゥパターン(フェーズ7 - T066)

"use client";

import { useReducer } from "react";

interface HistoryState<T> {
  past: T[];
  present: T;
  future: T[];
}

function historyReducer<T>(state: HistoryState<T>, action: { type: string; newPresent?: T }): HistoryState<T> {
  const { past, present, future } = state;

  switch (action.type) {
    case "UNDO":
      if (past.length === 0) return state;
      return {
        past: past.slice(0, past.length - 1),
        present: past[past.length - 1],
        future: [present, ...future],
      };
    case "REDO":
      if (future.length === 0) return state;
      return {
        past: [...past, present],
        present: future[0],
        future: future.slice(1),
      };
    case "SET":
      if (action.newPresent === present) return state;
      return {
        past: [...past, present],
        present: action.newPresent!,
        future: [],
      };
    default:
      return state;
  }
}

export function useHistory<T>(initialPresent: T) {
  const [state, dispatch] = useReducer(historyReducer, {
    past: [],
    present: initialPresent,
    future: [],
  });

  const undo = () => dispatch({ type: "UNDO" });
  const redo = () => dispatch({ type: "REDO" });
  const set = (newPresent: T) => dispatch({ type: "SET", newPresent });
  const canUndo = state.past.length > 0;
  const canRedo = state.future.length > 0;

  return { state: state.present, set, undo, redo, canUndo, canRedo };
}

パターン: 履歴管理には useReducer を使用し、canUndo と canRedo の状態を公開

エラーバウンダリパターン

1. グローバルエラーバウンダリ

出典: frontend/app/error.tsx

"use client";

export default function GlobalError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
  return (
    <div>
      <h2>予期しないエラーが発生しました</h2>
      <p>{error.message || "何か問題が発生しました。後でもう一度お試しください。"}</p>
      <button onClick={() => reset()}>再試行</button>
    </div>
  );
}

パターン: error.tsx は "use client" を使用し、エラーとリセット関数を受け取る

2. グラニュラエラーバウンダリ(フェーズ7 - T067)

"use client";

import { Component, ErrorInfo, ReactNode } from "react";

interface Props {
  children: ReactNode;
  fallback?: ReactNode;
  onError?: (error: Error, errorInfo: ErrorInfo) => void;
}

interface State {
  hasError: boolean;
  error?: Error;
}

export class ErrorBoundary extends Component<Props, State> {
  public state: State = { hasError: false };

  public static getDerivedStateFromError(error: Error): State {
    return { hasError: true, error };
  }

  public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
    console.error("ErrorBoundary caught:", error, errorInfo);
    this.props.onError?.(error, errorInfo);
  }

  public render() {
    if (this.state.hasError) {
      return this.props.fallback || (
        <div className="p-4 bg-red-50 border border-red-200 rounded">
          <h3 className="text-red-800 font-semibold">エラーが発生しました</h3>
          <p className="text-red-600 text-sm mt-1">{this.state.error?.message}</p>
          <button
            className="mt-2 text-sm text-red-700 underline"
            onClick={() => this.setState({ hasError: false, error: undefined })}
          >
            再試行
          </button>
        </div>
      );
    }

    return this.props.children;
  }
}

パターン: クラスベースのErrorBoundaryで、フォールバックUIとエラーコールバックをサポート

データフェッチングパターン

1. サーバーサイドデータフェッチング

// サーバーコンポーネント - "use client" なし
import { api } from "@/lib/api";

export default async function TasksPage() {
  const tasks = await api.getTasks();

  return (
    <div>
      <h1>タスク一覧</h1>
      <ul>
        {tasks.map(task => (
          <li key={task.id}>{task.title}</li>
        ))}
      </ul>
    </div>
  );
}

パターン: サーバーコンポーネント内で直接データを取得

2. クライアントサイドデータフェッチング(必要な場合)

"use client";

import { useState, useEffect } from "react";
import { api } from "@/lib/api";
import { Task } from "@/types";

export default function TasksPage() {
  const [tasks, setTasks] = useState<Task[]>([]);
  const [isLoading, setIsLoading] = useState(true);
  const [error, setError] = useState<string | null>(null);

  useEffect(() => {
    async function fetchTasks() {
      try {
        const data = await api.getTasks();
        setTasks(data);
      } catch (err: any) {
        setError(err.message);
      } finally {
        setIsLoading(false);
      }
    }

    fetchTasks();
  }, []);

  if (isLoading) return <div>読み込み中...</div>;
  if (error) return <div>エラー: {error}</div>;

  return (
    <div>
      <h1>タスク一覧</h1>
      <ul>
        {tasks.map(task => (
          <li key={task.id}>{task.title}</li>
        ))}
      </ul>
    </div>
  );
}

パターン: 個別のローディング、エラー、データ状態を管理するカスタムフックに抽出可能

最適化パターン

1. React.memo

import { memo } from "react";

const TaskItem = memo(function TaskItem({ task, onToggle }: Props) {
  return (
    <div>
      <input type="checkbox" checked={task.done} onChange={() => onToggle(task.id)} />
      <span>{task.title}</span>
    </div>
  );
});

パターン: プロパティが変更されない限り再レンダリングを防ぐために memo を使用

2. useCallbackとuseMemo

import { useCallback, useMemo } from "react";

export default function TaskList({ tasks, filter }: Props) {
  const filteredTasks = useMemo(
    () => tasks.filter(task => task.status === filter),
    [tasks, filter]
  );

  const handleToggle = useCallback((id: string) => {
    // トグルロジック
  }, []); // 安定した依存関係

  return (
    <div>
      {filteredTasks.map(task => (
        <TaskItem key={task.id} task={task} onToggle={handleToggle} />
      ))}
    </div>
  );
}

パターン: 高価な計算には useMemo を、コールバックの安定性には useCallback を使用

ルーティングパターン

1. プログラマティックナビゲーション

"use client";

import { useRouter } from "next/navigation";

export default function NavigationExample() {
  const router = useRouter();

  const goToDashboard = () => {
    router.push("/dashboard");
  };

  const goBack = () => {
    router.back();
  };

  return (
    <div>
      <button onClick={goToDashboard}>ダッシュボードへ</button>
      <button onClick={goBack}>戻る</button>
    </div>
  );
}

パターン: クライアントコンポーネント内で useRouter を使用

2. 動的ルートセグメント

// app/tasks/[taskId]/page.tsx
export default async function TaskDetailPage({ params }: { params: { taskId: string } }) {
  const task = await getTask(params.taskId);

  return (
    <div>
      <h1>{task.title}</h1>
      <p>{task.description}</p>
    </div>
  );
}

パターン: サーバーコンポーネントで params を使用して動的ルートデータにアクセス

状態管理パターン

1. ローカル状態(useState)

// コンポーネント固有の状態には useState を使用
const [isOpen, setIsOpen] = useState(false);
const [formData, setFormData] = useState({ name: "", email: "" });

パターン: コンポーネントに紐づく場合はローカル状態を使用

2. グローバル状態(useContext)

"use client";

import { createContext, useContext, useState, ReactNode } from "react";

interface ThemeContextType {
  theme: "light" | "dark";
  toggleTheme: () => void;
}

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

export function ThemeProvider({ children }: { children: ReactNode }) {
  const [theme, setTheme] = useState<"light" | "dark">("light");

  const toggleTheme = () => {
    setTheme(prev => prev === "light" ? "dark" : "light");
  };

  return (
    <ThemeContext.Provider value={{ theme, toggleTheme }}>
      {children}
    </ThemeContext.Provider>
  );
}

export function useTheme() {
  const context = useContext(ThemeContext);
  if (!context) {
    throw new Error("useTheme は ThemeProvider 内で使用してください");
  }
  return context;
}

パターン: 複数のコンポーネントで共有される状態には createContext と useContext を使用

テストパターン

1. コンポーネントテスト(Jest + React Testing Library)

import { render, screen, fireEvent } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import TaskItem from "./TaskItem";

describe("TaskItem", () => {
  const mockTask = { id: "1", title: "テストタスク", done: false };
  const mockOnToggle = jest.fn();

  it("タスクのタイトルを表示する", () => {
    render(<TaskItem task={mockTask} onToggle={mockOnToggle} />);
    expect(screen.getByText("テストタスク")).toBeInTheDocument();
  });

  it("チェックボックスをクリックすると onToggle を呼び出す", async () => {
    render(<TaskItem task={mockTask} onToggle={mockOnToggle} />);
    await userEvent.click(screen.getByRole("checkbox"));
    expect(mockOnToggle).toHaveBeenCalledWith("1");
  });
});

パターン: コンポーネントテストにはReact Testing Libraryを使用

2. フックテスト(renderHook)

import { renderHook, act } from "@testing-library/react";
import { useCounter } from "./useCounter";

describe("useCounter", () => {
  it("カウンターをインクリメントする", () => {
    const { result } = renderHook(() => useCounter());

    act(() => {
      result.current.increment();
    });

    expect(result.current.count).toBe(1);
  });
});

パターン: フックのテストには renderHook と act を使用

パフォーマンスベストプラクティス

  1. 画像の最適化: next/image コンポーネントを使用
  2. リンクのプリフェッチ: next/link はデフォルトでビューポート内のリンクをプリフェッチ
  3. 動的インポート: 必要に応じて大きなライブラリやコンポーネントを遅延読み込み
  4. バンドル分析: バンドルサイズを監視し、不要な依存関係を避ける
import dynamic from "next/dynamic";

const HeavyComponent = dynamic(() => import("./HeavyComponent"), {
  loading: () => <p>読み込み中...</p>,
});

パターン: 大きなコンポーネントや頻繁に使用されないコンポーネントには dynamic インポートを使用

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

関連スキル