用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/championswimmer/TwoFac --skill kmp-modules命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | kmp-modules |
| description | Guidance on where to place different types of code in this Kotlin Multiplatform project. |
This repository follows standard Kotlin Multiplatform source-set conventions, organized into distinct modules, each serving a specific purpose.
The project is divided into three primary modules. Understanding their responsibilities and dependencies is key to placing code in the correct location.
sharedLib (Shared Logic)This is the core module containing all business logic, data models, state management, and storage mechanisms.
cliApp or composeApp.expect/actual declarations.composeApp (GUI Library)This module contains most of the common Graphical User Interface (GUI) application code, built using Compose Multiplatform.
sharedLib to fetch data, observe state, and trigger actions.sharedLib.<platform>Main source sets.main window) and iOS (framework) within their source sets.androidApp (Android App Entry Point)This is a thin wrapper module that hosts the Android application entry point.
Application class, Activity, manifest, and app-level resources (icons, strings).composeApp which provides all the shared UI and business logic.TwoFacApplication (Application class) and MainActivity (Activity).AndroidManifest.xml with application/activity declarations.composeApp/androidMain.cliApp (Command Line Interface)This module contains code specifically related to the Command Line Interface application.
sharedLib to perform corresponding operations without needing a graphical interface.mordant).Within each Kotlin Multiplatform module (especially sharedLib and composeApp), the code is further organized by source sets:
commonMain: Shared production code that is platform-agnostic. Most of the code should live here.commonTest: Shared tests for testing code in commonMain.<platform>Main (e.g., jvmMain, iosMain, androidMain): Platform-specific implementations. Place code here when you need to access platform APIs (e.g., java.io.File on JVM, NSUserDefaults on iOS) that are not available in the common standard library.<platform>Test: Platform-specific tests.sharedLib/src/commonMain.sharedLib that are easy to consume for both declarative reactive UIs (composeApp) and procedural/terminal UIs (cliApp).expect/actual mechanism.基于 SOC 职业分类