本文へ移動
cccskills
無料GitHub で公開

android-architecture

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.

インストール方法を見る

含まれるファイル(4)

  • SKILL.md2.3 KB
  • evals/evals.json3.3 KB
  • references/compose-standards.md1.8 KB
  • references/implementation.md1.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Android Architecture Standards

Priority: P0 (CRITICAL)

1. Layer Your Project (Clean Architecture)

  • Domain: Pure Kotlin (No Android deps). Contains UseCases and Models.
  • Data: Repository impl, DataSources (API/DB). Maps DTO -> Domain.
  • UI: ViewModel + Composable. Maps Domain -> UiState.

See structure & examples for Clean Architecture layer examples.

2. Modularize by Feature and Core

  • Feature Modules: :feature:home, :feature:profile.
  • Core Modules: :core:ui (Design System), :core:network, :core:database.
  • App Module: DI Root and Navigation Guard.

See structure & examples for module configuration.

3. Enforce Unidirectional Data Flow (UDF)

  • Events: UI -> ViewModel (user actions flow UP).
  • State: ViewModel -> UI (StateFlow<UiState> flows DOWN).

4. Verify Jetpack Compose Integration

  • Hosting: Use setContent in Activity (No XML Layouts).
  • State: Hoist state to ViewModel using collectAsStateWithLifecycle.
  • Recomposition: Ensure Composable parameters @Stable or @Immutable.
  • Navigation: Use Compose Navigation with Type-Safe destinations.

Anti-Patterns

  • No Logic in Activity: Host Navigation only.
  • No Repo in UI: Access data exclusively via ViewModel.
  • No Context in Domain: Keep Logic Pure.

Verification

  • Domain layer has zero Android framework imports.
  • Each feature module compiles independently.
  • State flows one-way: Events UP, State DOWN.
  • ./gradlew build succeeds.

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.

日本語の概要は準備中です。原文の説明を表示しています。

HoangNguyen0403/agent-skills-standard5732026年10月12日 更新

Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.

日本語の概要は準備中です。原文の説明を表示しています。

HoangNguyen0403/agent-skills-standard5732026年10月12日 更新

Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.

日本語の概要は準備中です。原文の説明を表示しています。

HoangNguyen0403/agent-skills-standard5732026年10月12日 更新

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

日本語の概要は準備中です。原文の説明を表示しています。

HoangNguyen0403/agent-skills-standard5732026年10月12日 更新

Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test recipes to their specific skills.

日本語の概要は準備中です。原文の説明を表示しています。

HoangNguyen0403/agent-skills-standard5732026年10月12日 更新

Configure release signing, R8 obfuscation, and App Bundle publishing for Android. Use when setting up signing configs, enabling minification, adding ProGuard keep rules, or preparing for Play Store submission.

日本語の概要は準備中です。原文の説明を表示しています。

HoangNguyen0403/agent-skills-standard5732026年10月12日 更新

HoangNguyen0403 のスキルをすべて見る

このスキルの問題を報告する