Skip to content
cccskills
FreePublished on GitHub

android-ui-guidelines

Jetpack ComposeでUIを実装する時に参照するコーディングガイドライン。「Android UI」「Compose」「Jetpack」「画面実装」「UIコンポーネント」「レイアウト」と言われたら使う。Android/Kotlin UI実装のベストプラクティス、アンチパターン、実装パターンを提供する。

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md2.6 KB
  • REFERENCE.md25.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Android UIコーディングガイドライン

Jetpack ComposeによるUI実装のベストプラクティスを提供するスキルです。

このスキルが提供するもの

  1. 基本原則: 宣言的UI、単一方向データフロー、状態ホイスティング
  2. Composable設計: 命名規則、Modifier、コンポーネント分割
  3. State管理: UiState設計、ViewModel連携、Side Effects
  4. 実装パターン: リスト、フォーム、ナビゲーション、エラー、ローディング
  5. パフォーマンス最適化: Recomposition防止、LazyList最適化
  6. アンチパターン: 避けるべき実装パターン
  7. テスタビリティ: テスト可能な設計

クイックリファレンス

Composable関数の基本形

@Composable
fun MyComponent(
    // 1. 必須パラメータ
    data: Data,
    onClick: () -> Unit,
    // 2. オプショナルパラメータ
    enabled: Boolean = true,
    // 3. Modifier(常にデフォルト値)
    modifier: Modifier = Modifier
) {
    // 渡されたmodifierを最上位要素に適用
    Box(modifier = modifier) {
        // 実装
    }
}

UiState設計

sealed interface ScreenUiState {
    data object Loading : ScreenUiState
    data class Success(val data: Data) : ScreenUiState
    data class Error(val message: String) : ScreenUiState
}

LazyColumnの基本

LazyColumn {
    items(
        items = items,
        key = { it.id }  // 必ずkeyを指定
    ) { item ->
        ItemCard(item = item)
    }
}

詳細ガイドライン

詳細な実装パターンとガイドラインは REFERENCE.md を参照してください。

チェックリスト

実装前

  • 再利用可能なコンポーネントか確認
  • 状態ホイスティングを適用できるか確認
  • Modifierパラメータを追加したか

実装中

  • keyをLazyListに指定したか
  • 重い処理をrememberでキャッシュしたか
  • 副作用をLaunchedEffect等で適切に処理しているか

実装後

  • @Previewが動作するか
  • 不要なRecompositionがないか
  • テストコードを書いたか

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Retrofit + OkHttpを使用したAPIクライアント実装のベストプラクティスを提供する。 「API実装」「APIクライアント」「Retrofit」「OkHttp」「ネットワーク」と言われたら使う。

The English summary is being prepared. Showing the original description.

xtone/ai_development_tools3Updated Oct 16, 2026

Androidプロジェクトのアーキテクチャ設計を支援。プロジェクト特性に応じてMVI/MVVM/シンプルComposeから最適なパターンを提案し、パッケージ構造の設計と既存プロジェクトの分析を行う。

The English summary is being prepared. Showing the original description.

xtone/ai_development_tools3Updated Oct 16, 2026

Firebase Crashlyticsのスタックトレースを解析し、トリアージ分類→根本原因分析→修正提案を出力するスキル。/crash-analyze コマンド、クラッシュ解析、スタックトレース分析、ANR分析、Crashlytics、クラッシュレポート、またはFirebase crashに関連するリクエストで使用される。クラッシュ対応のワークフローを標準化し、対応品質と速度を向上させる。ANR/Non-fatal/Fatal全タイプ対応。

The English summary is being prepared. Showing the original description.

xtone/ai_development_tools3Updated Oct 16, 2026

Android data layer implementation guide. Provides comprehensive patterns for Room Database (Entity, DAO, Migration), DataStore (Preferences), Repository layer design, and common pitfalls. Use when implementing local data storage, cache strategies, or data source integration in Android projects.

The English summary is being prepared. Showing the original description.

xtone/ai_development_tools3Updated Oct 16, 2026

重要: ユーザーがAndroidテスト実行をリクエストした場合、常にこのスキルを最初に使用してください。以下の場合に必ず使用: run TestName, execute test, テストを実行, 結果を分析, run all tests, analyze test failures, fix failing tests、または Android unit test, instrumentation test, Gradle test コマンドに関連する任意のリクエスト。./gradlew test や Bash コマンドを直接使用しないでください - 常にこのスキルに委譲してください。Multi-variantプロジェクト、JAVA_HOME セットアップ、一般的なテストパターンに対応しています。

The English summary is being prepared. Showing the original description.

xtone/ai_development_tools3Updated Oct 16, 2026

非同期処理のバックエンドとフロントエンドを実装する際のベストプラクティスをまとめたスキルです。非同期処理が必要なWebサービスのフロントエンドおよびバックエンドを実装する際に利用されます。

The English summary is being prepared. Showing the original description.

xtone/ai_development_tools3Updated Oct 16, 2026

See all skills by xtone

Report a problem with this skill