Communitygithub.com

ComeOnOliver/skillshub

SwiftUIビューのベストプラクティスと実例に基づいたガイダンス。SwiftUI UIの作成やリファクタリング、TabViewを用いたタブ設計、画面構成、コンポーネント固有のパターンや例が必要な場合に使用します。

skillshub とは?

このスキル(ComeOnOliver/skillshub)は、SwiftUIアプリケーション開発におけるUIパターンとベストプラクティスを提供します。既存プロジェクトへの参加や新規プロジェクトの開始時に、どのようなアプローチを取るべきか明確な道筋を示します。具体的には、TabViewやNavigationStack、シートの適切な使い方、状態管理、コンポーネント設計など、SwiftUIの推奨パターンに沿った実装を支援します。Claude CodeやCusorなどのAIエージェントが、このスキルを使用することで、コンポーネントリファレンスへのリンクや実例を基に、一貫性のあるSwiftUIコードを生成できます。また、シートのアクションを内部で完結させるパターンや、`.sheet(item:)`の推奨など、具体的なコード例と共に学習できるため、SwiftUI開発者の生産性向上に貢献します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/dimillian/swiftui-ui-patterns

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

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

ドキュメント

SwiftUI UI パターン

クイックスタート

目標に応じてトラックを選択してください:

既存プロジェクト

  • 機能や画面、および主要な対話モデル(リスト、詳細、エディタ、設定、タブ付き)を特定します。
  • リポジトリ内で rg "TabView\(" などで近い例を見つけ、最も近いSwiftUIビューを読みます。
  • ローカルな規約に従います:SwiftUIネイティブな状態を優先し、状態は可能な限りローカルに保ち、共有依存関係には環境注入を使用します。
  • references/components-index.md から関連するコンポーネントリファレンスを選択し、そのガイダンスに従います。
  • 小さく焦点を絞ったサブビューとSwiftUIネイティブなデータフローでビューを構築します。

新規プロジェクトのスキャフォールディング

  • references/app-scaffolding-wiring.md から始めて、TabView + NavigationStack + シートを配線します。
  • 提供されたスケルトンに基づいて、最小限の AppTab と RouterPath を追加します。
  • 最初に必要なUI(TabView、NavigationStack、シート)に基づいて、次のコンポーネントリファレンスを選択します。
  • 新しい画面が追加されるたびに、ルートとシートの列挙型を拡張します。

従うべき一般的なルール

  • 最新のSwiftUI状態(@State、@Binding、@Observable、@Environment)を使用し、不必要なビューモデルを避けます。
  • コンポジションを優先し、ビューは小さく焦点を絞ったものにします。
  • .task と明示的なローディング/エラー状態で async/await を使用します。
  • レガシーファイルを編集する場合のみ、既存のレガシーパターンを維持します。
  • プロジェクトのフォーマッターとスタイルガイドに従います。
  • シート:状態が選択されたモデルを表す場合は、.sheet(isPresented:) よりも .sheet(item:) を優先します。シートの本文内で if let の使用は避けます。シートは自身のアクションを所有し、onCancel/onConfirm クロージャを転送する代わりに、内部で dismiss() を呼び出す必要があります。

新しいSwiftUIビューのワークフロー

  1. ビューの状態とその所有場所を定義します。
  2. @Environment を介して注入する依存関係を特定します。
  3. ビュー階層をスケッチし、繰り返し部分をサブビューに抽出します。
  4. 必要に応じて .task と明示的な状態列挙型を使用して非同期ローディングを実装します。
  5. UIがインタラクティブな場合、アクセシビリティラベルまたは識別子を追加します。
  6. ビルドで検証し、必要に応じて使用箇所の呼び出しを更新します。

コンポーネントリファレンス

エントリポイントとして references/components-index.md を使用します。各コンポーネントリファレンスには以下を含める必要があります:

  • 意図と最適なシナリオ。
  • ローカル規約に沿った最小限の使用パターン。
  • 落とし穴とパフォーマンスに関する注意事項。
  • 現在のリポジトリ内の既存の例へのパス。

シートパターン

項目駆動型シート(推奨)

@State private var selectedItem: Item?

.sheet(item: $selectedItem) { item in
    EditItemSheet(item: item)
}

シートが自身のアクションを所有する

struct EditItemSheet: View {
    @Environment(\.dismiss) private var dismiss
    @Environment(Store.self) private var store

    let item: Item
    @State private var isSaving = false

    var body: some View {
        VStack {
            Button(isSaving ? "保存中…" : "保存") {
                Task { await save() }
            }
        }
    }

    private func save() async {
        isSaving = true
        await store.save(item)
        dismiss()
    }
}

新しいコンポーネントリファレンスの追加

  • references/<component>.md を作成します。
  • 短く実用的に保ち、現在のリポジトリ内の具体的なファイルにリンクします。
  • references/components-index.md を新しいエントリで更新します。

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

関連スキル