mobile

移动开发。iOS、Android、SwiftUI、Jetpack Compose、React Native、Flutter、跨平台。当用户提到移动开发、iOS、Android、跨平台时路由到此。

155 stars

Best use case

mobile is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

移动开发。iOS、Android、SwiftUI、Jetpack Compose、React Native、Flutter、跨平台。当用户提到移动开发、iOS、Android、跨平台时路由到此。

Teams using mobile should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/mobile/SKILL.md --create-dirs "https://raw.githubusercontent.com/telagod/code-abyss/main/skills/domains/mobile/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/mobile/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How mobile Compares

Feature / AgentmobileStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

移动开发。iOS、Android、SwiftUI、Jetpack Compose、React Native、Flutter、跨平台。当用户提到移动开发、iOS、Android、跨平台时路由到此。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 移动开发域 · Mobile

```
原生:iOS(SwiftUI/UIKit) | Android(Compose/Kotlin)
跨平台:React Native(TS) | Flutter(Dart)
```

---

## iOS

### SwiftUI

View:`struct V: View { var body: some View {} }`
State:`@State`本地 | `@Binding`双向 | `@StateObject`拥有 | `@ObservedObject`引用 | `@EnvironmentObject`全局
生命周期:`.task { await }` / `.onAppear` / `.onDisappear`
ViewModifier:`struct M: ViewModifier` + `extension View { func style() }`

### Combine

`dataTaskPublisher` → `map` → `decode` → `eraseToAnyPublisher`
订阅:`.sink(receiveCompletion:receiveValue:)` + `.store(in: &cancellables)`
常用:`debounce` / `removeDuplicates` / `combineLatest` / `flatMap`

### iOS 架构

MVVM:Model(`Codable`) → Repository(`protocol`+`async throws`) → ViewModel(`@MainActor ObservableObject`+`@Published`) → View(`@StateObject`)
网络:泛型 `func get<T: Decodable>(_ path:) async throws -> T` + Bearer Token
持久化:UserDefaults(轻量) | Keychain(敏感) | SwiftData(iOS 17+, `@Model`宏) | Core Data

### iOS 检查项

SwiftUI 优先 | `@MainActor` 线程安全 | async/await | 依赖注入 | LazyVStack | Keychain 存敏感 | ViewModel 单测+Mock

---

## Android

### Jetpack Compose

`@Composable fun Screen() {}` | State:`remember { mutableStateOf() }` | `rememberSaveable`
LazyColumn:`items(list, key={it.id})` | Side Effects:`LaunchedEffect` | `DisposableEffect`
Navigation:`NavHost` + `composable(route)` + `navController.navigate()`

### ViewModel + StateFlow

`MutableStateFlow(UiState())` → `.asStateFlow()` → `.update { it.copy() }`
Compose:`val uiState by viewModel.uiState.collectAsState()`

### Coroutines

`viewModelScope.launch { withContext(Dispatchers.IO) {} }` | `coroutineScope { async{} + async{} }`
Flow:`.flowOn(IO)` + `.stateIn(scope, WhileSubscribed(5000), initial)` | 防抖:`.debounce(300).flatMapLatest{}`

### Hilt + Room

Hilt:`@HiltAndroidApp` + `@AndroidEntryPoint` + `@HiltViewModel class VM @Inject constructor(repo)`
Room:`@Entity` → `@Dao`(`@Query`/`@Insert(REPLACE)` 返回 `Flow<List<T>>`) → `@Database`

### Android 检查项

Compose 优先 | StateFlow 替代 LiveData | Hilt 注入 | Room 持久化 | key 优化 LazyColumn | remember 防重组 | ViewModel 单测(runTest)

---

## 跨平台

| 维度 | React Native | Flutter |
|------|--------------|---------|
| 渲染 | 原生组件(桥接) | 自绘(Skia) |
| 热重载 | Fast Refresh | Hot Reload |
| UI 一致性 | 跟随系统 | 完全一致 |

RN:函数组件+Hooks | FlatList+keyExtractor | @react-navigation | Redux Toolkit/Zustand | Hermes/JSI
Flutter:StatelessWidget/StatefulWidget | Riverpod(`ref.watch`) | go_router | MethodChannel 桥接 | `const`构造+`ListView.builder`

### 选型

Web 背景→RN | 极致动画/UI 定制→Flutter | 大量原生交互→RN | 极致原生体验→原生

### 跨平台检查项

列表优化(FlatList/ListView.builder+key) | 状态管理(RTK/Riverpod) | 原生桥接验证 | 冷启动<1.5s | 渲染>55fps

## 触发词

iOS、SwiftUI、Android、Jetpack Compose、React Native、Flutter、跨平台、移动开发

Related Skills

name: parse-error

155
from telagod/code-abyss

this is not frontmatter

multi-script

155
from telagod/code-abyss

too many scripts

missing-description

155
from telagod/code-abyss

No description provided.

invalid-tools

155
from telagod/code-abyss

invalid tool name

clash-skill

155
from telagod/code-abyss

second duplicate

review

155
from telagod/code-abyss

Review skill. Read ~/.claude/skills/gstack/review/checklist.md before acting.

office-hours

155
from telagod/code-abyss

Office hours skill. Uses ~/.claude/skills/gstack/bin/gstack-config.

codex

155
from telagod/code-abyss

Should be skipped for codex host.

gstack

155
from telagod/code-abyss

Root gstack skill. Uses ~/.claude/skills/gstack/bin helpers.

verify-security

155
from telagod/code-abyss

安全校验关卡。自动扫描代码安全漏洞,检测危险模式,确保安全决策有文档记录。当魔尊提到安全扫描、漏洞检测、安全审计、代码安全、OWASP、注入检测、敏感信息泄露时使用。在新建模块、安全相关变更、攻防任务、重构完成时自动触发。

verify-quality

155
from telagod/code-abyss

代码质量校验关卡。检测复杂度、重复代码、命名规范、函数长度等质量指标。当魔尊提到代码质量、复杂度检查、代码异味、重构建议、lint检查、代码规范时使用。在复杂模块、重构完成时自动触发。

verify-module

155
from telagod/code-abyss

模块完整性校验关卡。扫描目录结构、检测缺失文档、验证代码与文档同步。当魔尊提到模块校验、文档检查、结构完整性、README检查、DESIGN检查时使用。在新建模块完成时自动触发。