android-kotlin-development by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill android-kotlin-development使用 Kotlin 构建健壮的原生 Android 应用程序,采用现代架构模式、Jetpack 库以及用于声明式 UI 的 Compose。
最小工作示例:
// Models
data class User(
val id: String,
val name: String,
val email: String,
val avatarUrl: String? = null
)
data class Item(
val id: String,
val title: String,
val description: String,
val imageUrl: String? = null,
val price: Double
)
// API Service with Retrofit
interface ApiService {
@GET("/users/{id}")
suspend fun getUser(@Path("id") userId: String): User
@PUT("/users/{id}")
suspend fun updateUser(
@Path("id") userId: String,
@Body user: User
// ... (完整实现请参阅参考指南)
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 指南 | 内容 |
|---|---|
| 模型与 API 服务 | 模型与 API 服务 |
| 使用 Jetpack 的 MVVM ViewModels | 使用 Jetpack 的 MVVM ViewModels |
| Jetpack Compose UI | Jetpack Compose UI |
每周安装量
335
代码仓库
GitHub 星标数
116
首次出现
2026年1月21日
安全审计
安装于
opencode281
gemini-cli273
codex269
github-copilot246
cursor225
amp206
Build robust native Android applications using Kotlin with modern architecture patterns, Jetpack libraries, and Compose for declarative UI.
Minimal working example:
// Models
data class User(
val id: String,
val name: String,
val email: String,
val avatarUrl: String? = null
)
data class Item(
val id: String,
val title: String,
val description: String,
val imageUrl: String? = null,
val price: Double
)
// API Service with Retrofit
interface ApiService {
@GET("/users/{id}")
suspend fun getUser(@Path("id") userId: String): User
@PUT("/users/{id}")
suspend fun updateUser(
@Path("id") userId: String,
@Body user: User
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Models & API Service | Models & API Service |
| MVVM ViewModels with Jetpack | MVVM ViewModels with Jetpack |
| Jetpack Compose UI | Jetpack Compose UI |
Weekly Installs
335
Repository
GitHub Stars
116
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode281
gemini-cli273
codex269
github-copilot246
cursor225
amp206
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装