在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用文件资源管理器
6 个文件SKILL.md
readonlyModern Android development - Jetpack, Compose, Architecture Components
Jetpack Compose - composables, state, effects, theming
Kotlin coroutines - structured concurrency, Flows, exception handling
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
Kotlin Flow - StateFlow, SharedFlow, operators, testing
Ktor framework - routing, authentication, WebSockets
| name | kotlin-di |
| description | Dependency Injection - Hilt, Koin, scopes, testing |
| version | 1.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 02-kotlin-android |
| bond_type | SECONDARY_BOND |
| execution | {"timeout_ms":30000,"retry":{"max_attempts":3,"backoff":"exponential","initial_delay_ms":1000}} |
| parameters | {"required":[{"name":"framework","type":"string","validation":"^(hilt|koin)$"}],"optional":[{"name":"platform","type":"string","default":"android"}]} |
| logging | {"level":"info","events":["skill_invoked","framework_loaded","error_occurred"]} |
Dependency Injection with Hilt and Koin.
@HiltAndroidApp
class App : Application()
@Module
@InstallIn(SingletonComponent::class)
object AppModule {
@Provides @Singleton
fun provideDatabase(@ApplicationContext context: Context) =
Room.databaseBuilder(context, AppDatabase::class.java, "app.db").build()
@Provides
fun provideUserDao(db: AppDatabase) = db.userDao()
}
@HiltViewModel
class UserViewModel @Inject constructor(
private val repository: UserRepository
) : ViewModel()
val appModule = module {
single { HttpClient(getEngine()) }
single { UserRepository(get()) }
viewModel { UserViewModel(get()) }
}
// Start Koin
startKoin {
modules(appModule)
}
// Inject
val repository: UserRepository by inject()
@HiltAndroidTest
class UserViewModelTest {
@get:Rule val hiltRule = HiltAndroidRule(this)
@BindValue @JvmField
val repository: UserRepository = mockk()
@Inject lateinit var viewModel: UserViewModel
@Before fun setup() { hiltRule.inject() }
}
| Issue | Resolution |
|---|---|
| "No binding for..." | Add @Provides or @Binds |
| ViewModel not injected | Use hiltViewModel() in Compose |
Skill("kotlin-di")