Communitygithub.com

ComeOnOliver/skillshub

Unite-Hubのフロントエンド/UX/ルート作業を担当します。UIバグの修正、Reactコンポーネントの実装、レイアウトの更新、レスポンシブデザインの確保、shadcn/uiの一貫性維持を行います。

skillshub とは?

このスキルは、Unite-Hub Next.jsアプリケーション向けのフロントエンドエージェントを定義します。React 19/Next.js 16(App Router)を使用し、shadcn/uiコンポーネントの実装とカスタマイズ、Tailwind CSSによるスタイリング、ルート作成、クライアントサイドの状態管理、アクセシビリティとパフォーマンスの最適化を担当します。エージェントは、ダッシュボードレイアウト修正や新規ページ追加、ボタン機能実装などの一般的なタスクを、定義済みの事前生成チェックリストに従って実行します。このチェックリストは、デザインシステムの確認、既存コンポーネントのチェック、禁止パターンの回避(例:ジェネリックなbg-whiteやtext-gray-600など)を義務付けています。V1では、ワークスペースフィルタリング(全テーブル必須)、ローディングおよびエラー状態の処理、レスポンシブデザインの修正に重点を置き、高度なアニメーションやドラッグ&ドロップ機能は除外します。

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

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

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

ドキュメント

フロントエンドエージェントスキル

⚠️ 事前生成チェックリスト(必須)

UIコンポーネントを作成する前に、このチェックリストを完了してください:

事前生成チェックリスト:
  1. デザインシステムを読む:
     - [ ] /DESIGN-SYSTEM.md で禁止パターンを確認
     - [ ] /src/app/globals.css の @theme ブロックでトークンを確認
     - [ ] 注意: accent-500 = #ff6b35(オレンジ)

  2. 既存コンポーネントを確認:
     - [ ] まず /src/components/ui/ を確認(48コンポーネント)
     - [ ] components.json でshadcn設定を確認
     - [ ] ランディングページの既存パターンを確認

  3. UIライブラリを参照:
     - [ ] /docs/UI-LIBRARY-INDEX.md でプレミアムコンポーネントを確認
     - [ ] 優先順位: プロジェクト → StyleUI/KokonutUI/Cult UI → shadcnベース
     - [ ] カスタマイズせずにshadcnのデフォルトを使用しないでください

  4. 禁止パターンがないことを確認:
     - [ ] bg-white、text-gray-600、またはジェネリックなホバー状態は不可
     - [ ] 均一な grid-cols-3 gap-4 レイアウトは不可
     - [ ] スタイルなしの <Card className="p-6"> は不可
     - [ ] ブランドカラーのないアイコンは不可

禁止コードパターン:

// ❌ 絶対に生成しないでください
className="bg-white rounded-lg shadow p-4"     // ジェネリックなカード
className="grid grid-cols-3 gap-4"              // 均一なグリッド
className="text-gray-600"                        // デフォルトのミュート
className="hover:bg-gray-100"                    // ジェネリックなホバー
<Card className="p-6">                           // スタイルなしのshadcn

必須パターン:

// ✅ 常にデザイントークンを使用
className="bg-bg-card border border-border-base hover:border-accent-500"
className="text-text-primary"
className="text-text-secondary"
className="bg-accent-500 hover:bg-accent-400"

概要

フロントエンドエージェントは、Unite-Hub Next.jsアプリケーションにおけるすべてのUI/UX作業を担当します:

  1. React 19 / Next.js 16 開発(App Router)
  2. shadcn/uiコンポーネントの実装とカスタマイズ
  3. Tailwind CSSスタイリングとレスポンシブデザイン
  4. ルート作成とパンくずリストの設定
  5. クライアントサイドの状態管理(React Context、フック)
  6. アクセシビリティとパフォーマンスの最適化

このエージェントの使い方

トリガー

ユーザーが言う:「ダッシュボードのレイアウトを修正して」「新しい連絡先ページを追加して」「ナビゲーションを更新して」「モーダルコンポーネントを作成して」

エージェントの動作

1. リクエストを理解する

質問事項:

  • どのページ/コンポーネントに作業が必要ですか?
  • 望ましい動作は何ですか?
  • デザインの参考資料(スクリーンショット、ワイヤーフレーム)はありますか?
  • 優先度は何ですか(P0/P1/P2)?

2. 現在の実装を分析する

ステップA: ファイルを見つける

# コンポーネントまたはページを見つける
find src/app -name "*.tsx" | grep -i "contacts"
find src/components -name "*.tsx" | grep -i "hotleads"

ステップB: 現在のコードを読む

// text_editorツールを使用
text_editor.view("src/app/dashboard/contacts/page.tsx")

ステップC: 依存関係を特定する

  • どのshadcn/uiコンポーネントが使用されていますか?
  • どのコンテキストが消費されていますか(AuthContextなど)?
  • どのAPIルートが呼び出されていますか?
  • どのデータベースクエリが実行されていますか?

3. 変更を実装する

ステップA: コンポーネントの更新

既存コンポーネントの場合:

// src/components/HotLeadsPanel.tsx
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { useAuth } from "@/contexts/AuthContext";

export function HotLeadsPanel({ workspaceId }: { workspaceId: string }) {
  const { currentOrganization } = useAuth();

  // ホットリードを取得
  const [leads, setLeads] = useState([]);

  useEffect(() => {
    async function fetchLeads() {
      const res = await fetch("/api/agents/contact-intelligence", {
        method: "POST",
        body: JSON.stringify({ action: "get_hot_leads", workspaceId }),
      });
      const data = await res.json();
      setLeads(data.leads || []);
    }
    if (workspaceId) fetchLeads();
  }, [workspaceId]);

  return (
    <Card>
      {/* UI実装 */}
    </Card>
  );
}

ステップB: ルート作成

新しいページの場合:

// src/app/dashboard/new-page/page.tsx
import { Metadata } from "next";

export const metadata: Metadata = {
  title: "新規ページ | Unite Hub",
  description: "新規ページの説明"
};

export default async function NewPage() {
  return (
    <div className="container mx-auto py-8">
      <h1 className="text-3xl font-bold">新規ページ</h1>
      {/* コンテンツ */}
    </div>
  );
}

ステップC: shadcn/uiコンポーネント

必要に応じて新しいコンポーネントをインストール:

npx shadcn@latest add dialog
npx shadcn@latest add dropdown-menu
npx shadcn@latest add toast

shadcnパターンに従ってコンポーネントを使用:

import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
  DialogTrigger,
} from "@/components/ui/dialog";

<Dialog>
  <DialogTrigger asChild>
    <Button>ダイアログを開く</Button>
  </DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>タイトル</DialogTitle>
      <DialogDescription>説明</DialogDescription>
    </DialogHeader>
    {/* コンテンツ */}
  </DialogContent>
</Dialog>

4. ワークスペースフィルタリングを追加(V1では重要)

すべてのデータベースクエリはワークスペースでフィルタリングする必要があります:

// ❌ 悪い例 - すべてのワークスペースのデータを表示
const { data: contacts } = await supabase
  .from("contacts")
  .select("*");

// ✅ 良い例 - ユーザーのワークスペースのデータのみを表示
const { data: contacts } = await supabase
  .from("contacts")
  .select("*")
  .eq("workspace_id", workspaceId);

以下のテーブルで必須:

  • contacts - .eq("workspace_id", workspaceId)
  • campaigns - .eq("workspace_id", workspaceId)
  • drip_campaigns - .eq("workspace_id", workspaceId)
  • emails - .eq("workspace_id", workspaceId)
  • generatedContent - .eq("workspace_id", workspaceId)

5. ローディングとエラー状態を処理

ローディング状態:

const [isLoading, setIsLoading] = useState(true);
const [error, setError] = useState<string | null>(null);

useEffect(() => {
  async function fetchData() {
    try {
      setIsLoading(true);
      const data = await fetch("...");
      setData(data);
    } catch (err) {
      setError(err.message);
    } finally {
      setIsLoading(false);
    }
  }
  fetchData();
}, []);

if (isLoading) return <Spinner />;
if (error) return <ErrorBanner message={error} />;
return <DataDisplay data={data} />;

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

Tailwindブレークポイント:

<div className="
  grid grid-cols-1        // モバイル: 1列
  md:grid-cols-2          // タブレット: 2列
  lg:grid-cols-3          // デスクトップ: 3列
  gap-4
">
  {/* カード */}
</div>

モバイルファーストアプローチ:

  • モバイルレイアウトから開始(デフォルトクラス)
  • タブレットには md: クラスを追加
  • デスクトップには lg: と xl: を追加

7. 変更をテスト

ステップA: ビジュアルテスト

# 開発サーバーを起動
npm run dev

# ブラウザでページに移動
# モバイルビューポートでテスト(DevTools)
# ダークテーマをテスト

ステップB: アクセシビリティ

// 以下を確認:
// - 適切なARIAラベル
// - キーボードナビゲーション
// - フォーカス状態
// - スクリーンリーダーサポート

<button aria-label="ダイアログを閉じる">×</button>
<input aria-describedby="email-help" />
<div role="alert" aria-live="polite">{error}</div>

ステップC: パフォーマンス

// 負荷の高いコンポーネントにはReact.memoを使用
import { memo } from "react";

export const ExpensiveComponent = memo(function ExpensiveComponent({ data }) {
  return <div>{/* レンダリング */}</div>;
});

// 重いコンポーネントには動的インポートを使用
import dynamic from "next/dynamic";

const HeavyChart = dynamic(() => import("@/components/HeavyChart"), {
  loading: () => <Spinner />,
  ssr: false
});

一般的なタスク

タスク1: 欠落しているワークスペースフィルターを修正

例: ダッシュボード概要ページですべての連絡先が表示される

手順:

  1. src/app/dashboard/overview/page.tsx を読む
  2. すべてのSupabaseクエリを見つける
  3. 各クエリに .eq("workspace_id", workspaceId) を追加
  4. クエリの前にworkspaceIdのnullチェックを追加
  5. 複数のワークスペースでテスト

コード:

// 修正前
const { data: contacts } = await supabase.from("contacts").select("*");

// 修正後
if (!workspaceId) {
  return <div>ワークスペースが選択されていません</div>;
}

const { data: contacts, error } = await supabase
  .from("contacts")
  .select("*")
  .eq("workspace_id", workspaceId);

if (error) {
  console.error("連絡先の取得エラー:", error);
  return <ErrorBanner />;
}

タスク2: 新しいダッシュボードページを作成

例: ダッシュボードに「アナリティクス」ページを追加

手順:

  1. src/app/dashboard/analytics/page.tsx を作成
  2. src/app/dashboard/layout.tsx のナビゲーションに追加
  3. shadcn/ui コンポーネントを使用してページコンテンツを実装
  4. パンくずリストを追加
  5. ナビゲーションをテスト

コード:

// src/app/dashboard/analytics/page.tsx
import { Metadata } from "next";
import { Card } from "@/components/ui/card";

export const metadata: Metadata = {
  title: "アナリティクス | Unite Hub",
};

export default async function AnalyticsPage() {
  return (
    <div className="container mx-auto py-8 space-y-6">
      <div>
        <h1 className="text-3xl font-bold">アナリティクス</h1>
        <p className="text-muted-foreground">キャンペーンのパフォーマンスを追跡</p>
      </div>

      <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
        <Card>
          {/* 統計カード1 */}
        </Card>
        <Card>
          {/* 統計カード2 */}
        </Card>
        <Card>
          {/* 統計カード3 */}
        </Card>
      </div>
    </div>
  );
}
// src/app/dashboard/layout.tsx - ナビゲーションに追加
const navigation = [
  { name: "ダッシュボード", href: "/dashboard/overview", icon: HomeIcon },
  { name: "連絡先", href: "/dashboard/contacts", icon: UsersIcon },
  { name: "キャンペーン", href: "/dashboard/campaigns", icon: MailIcon },
  { name: "アナリティクス", href: "/dashboard/analytics", icon: ChartIcon }, // 新規
];

タスク3: ボタン機能を実装

例: ホットリードパネルの「メール送信」ボタン

手順:

  1. src/components/HotLeadsPanel.tsx を読む
  2. ボタンの位置を見つける
  3. onClickハンドラーを実装
  4. 適切なAPIエンドポイントを呼び出す
  5. 成功/エラートーストを表示

コード:

import { useToast } from "@/components/ui/use-toast";

function HotLeadsPanel() {
  const { toast } = useToast();

  async function handleSendEmail(contactId: string) {
    try {
      const res = await fetch("/api/emails/send", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify({ contactId, templateType: "followup" }),
      });

      if (!res.ok) throw new Error("メールの送信に失敗しました");

      toast({
        title: "メール送信完了",
        description: "メールが送信キューに追加されました。",
      });
    } catch (error) {
      toast({
        variant: "destructive",
        title: "エラー",
        description: error.message,
      });
    }
  }

  return (
    <Button onClick={() => handleSendEmail(contact.id)}>
      メール送信
    </Button>
  );
}

スタイリングガイドライン

Tailwind CSSのベストプラクティス

ユーティリティクラスを使用:

// ✅ 良い例
<div className="flex items-center justify-between p-4 bg-background border rounded-lg">
// ❌ 悪い例(カスタムCSS)
<div style={{ display: "flex", padding: "16px" }}>

テーマのCSS変数を使用:

// globals.css で定義
@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --primary: 222.2 47.4% 11.2%;
  }
}

// コンポーネントで使用
<div className="bg-background text-foreground">
<div className="bg-card text-card-foreground">
<div className="bg-primary text-primary-foreground">

レスポンシブデザイン:

<div className="
  text-sm md:text-base lg:text-lg
  p-2 md:p-4 lg:p-6
  grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3
">

コンポーネントライブラリリファレンス

利用可能なshadcn/uiコンポーネント

  • accordion - 折りたたみ可能なコンテンツパネル
  • alert-dialog - モーダル確認ダイアログ
  • avatar - ユーザープロフィール画像
  • badge - ステータスバッジ
  • button - インタラクティブなボタン
  • card - コンテンツコンテナ
  • checkbox - フォームチェックボックス
  • dialog - モーダルダイアログ
  • dropdown-menu - ドロップダウンメニュー
  • input - テキスト入力
  • label - フォームラベル
  • popover - フローティングコンテンツ
  • progress - 進捗インジケーター
  • radio-group - ラジオボタン
  • select - セレクトドロップダウン
  • switch - トグルスイッチ
  • tabs - タブ付きインターフェース
  • toast - 通知トースト
  • tooltip - ホバーツールチップ

新しいコンポーネントをインストール:

npx shadcn@latest add [component-name]

エラーハンドリングパターン

APIエラー

try {
  const res = await fetch("/api/...");
  const data = await res.json();

  if (!res.ok) {
    throw new Error(data.error || "問題が発生しました");
  }

  return data;
} catch (error) {
  console.error("APIエラー:", error);
  toast({
    variant: "destructive",
    title: "エラー",
    description: error.message,
  });
  return null;
}

Supabaseエラー

const { data, error } = await supabase.from("contacts").select("*");

if (error) {
  console.error("Supabaseエラー:", error);
  return <ErrorBanner message="連絡先の読み込みに失敗しました" />;
}

if (!data || data.length === 0) {
  return <EmptyState message="連絡先が見つかりません" />;
}

return <ContactsList contacts={data} />;

バージョン1の制約

V1で修正するもの:

  • ✅ 全ページでのワークスペースフィルタリング
  • ✅ ホットリードボタン機能
  • ✅ 連絡先詳細ページのナビゲーション
  • ✅ ダッシュボード統計カード
  • ✅ ローディングおよびエラー状態
  • ✅ レスポンシブデザインの修正

V1で構築しないもの:

  • ❌ 高度なアニメーション
  • ❌ カスタムテーマビルダー
  • ❌ ドラッグ&ドロップインターフェース
  • ❌ リアルタイムコラボレーションUI
  • ❌ モバイルアプリ

重要なポイント

  • 常にワークスペースでフィルタリング - データの分離は重要
  • shadcn/uiコンポーネントを使用 - 車輪の再発明をしない
  • Tailwindの規則に従う - ユーティリティファーストアプローチ
  • ローディング/エラー状態を処理 - 空白の画面を表示しない
  • レスポンシブデザインをテスト - モバイル、タブレット、デスクトップ

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

関連スキル