Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

android-kotlin安卓 科特林

Agent Skill

android-kotlin 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

367

周安装

15

GitHub Stars

13

下载量

119
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:android-kotlin(安卓 科特林)
来源仓库:https://github.com/maroffo/claude-forge
仓库路径:skills/android-kotlin
安装命令:
npx skills add https://github.com/maroffo/claude-forge --skill android-kotlin
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/maroffo/claude-forge --skill android-kotlin

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合围绕仓库状态、代码变更或协作事项进行整理时使用。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写。
  • 注意该技能归类为前端设计,但功能描述未体现设计能力,需验证。

SKILL.md

ABOUTME: Android/Kotlin - Compose, architecture, testing, performance

ABOUTME: Kotlin 2.x, Compose 1.7+, type-safe navigation, Baseline Profiles

Android/Kotlin

Commands

./gradlew assembleDebug|assembleRelease|test|connectedAndroidTest|lint|ktlintFormat
./gradlew :feature:home:build                    # Module-specific

See: _AST_GREP.md (sg patterns) | _PATTERNS.md | source-control


Architecture

Clean Architecture Structure

feature/
├── data/repository/, datasource/local/, datasource/remote/
├── domain/model/, repository/ (interface), usecase/
└── presentation/screen/, viewmodel/

Use Cases

Single responsibility, orchestration here (NOT in ViewModel).

class SignInUseCase(private val auth: AuthRepository, private val user: UserRepository) {
    suspend operator fun invoke(email: String, password: String): Result<User> {
        val result = auth.signIn(email, password).getOrElse { return Result.failure(it) }
        user.saveUserLocally(result)
        return Result.success(result)
    }
}

ViewModel Pattern

class FeedViewModel(private val getFeed: GetFeedUseCase) : ViewModel() {
    private val _uiState = MutableStateFlow<FeedUiState>(FeedUiState.Loading)
    val uiState = _uiState.asStateFlow()

    private val _sideEffects = Channel<FeedSideEffect>(Channel.BUFFERED)
    val sideEffects = _sideEffects.receiveAsFlow()

    fun loadFeed() = viewModelScope.launch {
        _uiState.value = FeedUiState.Loading
        getFeed().onSuccess { _uiState.value = FeedUiState.Success(it) }
                 .onFailure { _uiState.value = FeedUiState.Error(it.message) }
    }
}

sealed interface FeedUiState { /* Loading, Success, Error */ }
sealed interface FeedSideEffect { /* NavigateToDetail, ShowSnackbar */ }

Dependency Injection

AspectHiltKoin
TypeCompile-timeRuntime
Build timeSlowerFaster
Error detectionCompileRuntime
KMP supportNoYes
Best forLarge/enterpriseSmall-medium/KMP

Hilt: @HiltAndroidApp, @AndroidEntryPoint, @HiltViewModel, @Inject constructor Koin: module {}, single, factory, viewModelOf, koinViewModel()

See references/compose-patterns.md for setup examples.


Compose Essentials

State hoisting: Lift state to the caller, pass callbacks down.

@Composable
fun UserCard(user: User, onClick: () -> Unit, modifier: Modifier = Modifier) {
    Card(onClick = onClick, modifier = modifier) { /* content */ }
}

State management:

  • remember {mutableStateOf()}, lost on config change
  • rememberSaveable {mutableStateOf()}, survives config change
  • derivedStateOf, computed state

Side effects: LaunchedEffect(key), DisposableEffect

Type-safe navigation: @Serializable routes (2.8.0+)

See references/compose-patterns.md for detailed examples.


Code Review Checklists

Architecture

  • VMs don't chain use cases (orchestration in domain)
  • VMs don't call repositories directly
  • Use cases have single responsibility
  • State immutable (use copy())
  • Side effects use Channel/SharedFlow (not StateFlow)

Compose

  • State hoisted appropriately
  • remember vs rememberSaveable correct
  • Side effects use correct APIs
  • Stable types for parameters
  • key used in LazyColumn/LazyRow

Red Flags

CriticalHigh
Network/DB on main threadUse case chaining in VM
StateFlow for one-time eventsMutable state exposed from VM
Hardcoded strings in UIMissing key in LazyColumn
Missing error handlingcollectAsState vs collectAsStateWithLifecycle
R8 disabled in release

Quick Reference

Kotlin 2.x features: Guard conditions (2.1), context parameters (2.2), K2 compiler benefits → references/kotlin-features.md

Compose patterns: State, side effects, navigation, image loading → references/compose-patterns.md

Networking & Data: Retrofit, Ktor, Room, DataStore → references/data-layer.md

Testing: Compose UI tests, ViewModel tests, snapshot tests → references/testing-patterns.md

Performance: R8, Baseline Profiles, Compose optimization → references/performance.md


Resources

Official: android.com/kotlin | compose | architecture | type-safe nav | baseline profiles

Kotlin: 2.2 | 2.1.20 | 2.3

Libraries: Coil | Koin | Hilt | Retrofit | Ktor | Room

Testing: Compose testing | Paparazzi | Turbine

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.22%
按下载量换算41

Claude

29.82%
按下载量换算35

Cursor

19.21%
按下载量换算23

Gemini CLI

9.18%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills