Communitygithub.com

aj-geddes/android-kotlin-development

Kotlin を使用してネイティブ Android アプリを開発します。Jetpack を用いた MVVM アーキテクチャ、Compose によるモダン UI、Retrofit による API 呼び出し、Room によるローカルストレージ、ナビゲーションアーキテクチャをカバーします。

android-kotlin-development とは?

このスキルは、Kotlin を使用したネイティブ Android アプリ開発のための包括的なガイドとツールセットを提供します。MVVM アーキテクチャパターンに基づき、Jetpack ライブラリ群を活用して、ViewModel、LiveData、Data Binding などのコンポーネントを効率的に利用できます。また、Jetpack Compose を用いた宣言的 UI 開発、Retrofit による REST API との通信、Room データベースによるローカルデータの永続化、そして Navigation コンポーネントを用いた画面遷移の実装をサポートします。このスキルは、プロジェクトのセットアップから主要なライブラリの統合方法までを網羅しており、開発者がモダンで保守性の高い Android アプリを構築する際の強力なアシスタントとして機能します。Claude Code、Codex、Cursor などの AI エージェント上で動作し、コード生成やアーキテクチャの提案を支援します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aj-geddes/useful-ai-prompts/tree/main/skills/android-kotlin-development

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

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

ドキュメント

android-kotlin-development は何をしますか?

Kotlin を使用してネイティブ Android アプリを開発します。Jetpack を用いた MVVM アーキテクチャ、Compose によるモダン UI、Retrofit による API 呼び出し、Room によるローカルストレージ、ナビゲーションアーキテクチャをカバーします。

概要

このスキルは、Android アプリ開発におけるベストプラクティスを提供します。以下の主要コンポーネントを中心に構成されています:

  • MVVM アーキテクチャ:Jetpack ライブラリ(ViewModel、LiveData、Data Binding)を活用したクリーンなアーキテクチャ
  • Jetpack Compose:宣言的 UI フレームワークによるモダンなユーザーインターフェース
  • Retrofit:タイプセーフな HTTP クライアントによる API 通信
  • Room:SQLite 上に構築された抽象化レイヤーによるローカルデータベース
  • Navigation:画面遷移を管理するための Navigation コンポーネント

使用例

// ViewModel の例
class MainViewModel : ViewModel() {
    private val _text = MutableLiveData<String>()
    val text: LiveData<String> = _text

    fun updateText(newText: String) {
        _text.value = newText
    }
}

依存関係

プロジェクトの build.gradle ファイルに以下の依存関係を追加します:

dependencies {
    implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
    implementation("androidx.compose.ui:ui:1.6.0")
    implementation("com.squareup.retrofit2:retrofit:2.9.0")
    implementation("androidx.room:room-runtime:2.6.1")
    implementation("androidx.navigation:navigation-compose:2.7.7")
}

セットアップ手順

  1. Android Studio で新しいプロジェクトを作成します(Empty Compose Activity テンプレートを推奨)。
  2. build.gradle ファイルに上記の依存関係を追加します。
  3. MVVM アーキテクチャに従って、モデル、ビュー、ViewModel を実装します。
  4. Compose を使用して宣言的に UI を定義します。
  5. Retrofit を使用して API エンドポイントとの通信を設定します。
  6. Room データベースをセットアップし、エンティティと DAO を定義します。
  7. Navigation コンポーネントを使用して画面遷移を構成します。

注意事項

  • すべてのコード例は Kotlin で記述されています。
  • 最新の Android 開発プラクティスに従ってください。
  • 環境変数(例:API_KEY)は適切に管理し、コードにハードコードしないでください。
  • https://example.com/api などの URL は実際のエンドポイントに置き換えてください。

Individual skills in this repo

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

aj-geddes/ansible-automation

Infrastructure automation and configuration management using Ansible playbooks, roles, and inventory. Use for deploying applications, patching, and managing servers.

aj-geddes/architecture-diagrams

Create system architecture diagrams using Mermaid, PlantUML, C4 model, flowcharts, and sequence diagrams. Use when documenting architecture, system design, data flows, or technical workflows.

aj-geddes/code-review-analysis

Perform comprehensive code reviews with best practices, security checks, and constructive feedback. Use when reviewing pull requests, analyzing code quality, checking for security vulnerabilities, or providing code improvement suggestions.

aj-geddes/flask-api-development

Develop lightweight Flask APIs with routing, blueprints, database integration, authentication, and request/response handling. Use when building RESTful APIs, microservices, or lightweight web services with Flask.

aj-geddes/ios-swift-development

Develop native iOS apps with Swift. Covers MVVM architecture, SwiftUI, URLSession for networking, Combine for reactive programming, and Core Data persistence.

aj-geddes/jenkins-pipeline

Build Jenkins declarative and scripted pipelines with stages, agents, parameters, and plugins. Implement multi-branch pipelines and deployment automation.

aj-geddes/markdown-documentation

Master markdown formatting, GitHub Flavored Markdown, README files, and documentation formatting. Use when writing markdown docs, READMEs, or formatting documentation.

aj-geddes/nginx-configuration

Configure Nginx web server for high-performance reverse proxy, load balancing, SSL/TLS, caching, and API gateway functionality.

aj-geddes/nodejs-express-server

Build production-ready Express.js servers with middleware, authentication, routing, and database integration. Use when creating REST APIs, managing requests/responses, implementing middleware chains, and handling server logic.

aj-geddes/rest-api-design

Design RESTful APIs following best practices for resource modeling, HTTP methods, status codes, versioning, and documentation. Use when creating new APIs, designing endpoints, or improving existing API architecture.

aj-geddes/wireframe-prototyping

Create wireframes and interactive prototypes to visualize user interfaces and gather feedback early. Use tools and techniques to communicate design ideas before development.

関連スキル