Mobile logo

Mobile

CommunityPopular
fengshao1227
mobile

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

Overview

Publisherfengshao1227
Repositoryccg-workflow
Skill namemobile
Stars
5.9K
Forks
446
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by fengshao1227 on GitHub. Read the source before you install it.

Installation

Install the Mobile AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fengshao1227/ccg-workflow.git /tmp/ccg-workflow
mkdir -p .claude/skills
cp -r /tmp/ccg-workflow/templates/skills/domains/mobile .claude/skills/mobile
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mobile in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Mobile on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Mobile is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

移动开发域 · Mobile Development

域概览

原生开发                    跨平台开发
├── iOS (SwiftUI/UIKit)     ├── React Native (JS/TS)
├── Android (Compose/Kotlin) └── Flutter (Dart)
└── 共通:MVVM / 网络层 / 持久化 / 测试

iOS 开发

SwiftUI 核心模式

  • View 组件:struct MyView: View { var body: some View { ... } }
  • State 管理:
    • @State — 本地状态
    • @Binding — 父子双向绑定
    • @StateObject — 拥有 ObservableObject
    • @ObservedObject — 引用 ObservableObject
    • @EnvironmentObject / @Environment — 全局注入
  • ObservableObject:@Published 属性自动触发 UI 更新
  • Custom ViewModifier:struct CardModifier: ViewModifier + extension View { func cardStyle() }
  • 生命周期:.task { await ... } / .onAppear / .onDisappear

UIKit 集成

  • UIViewControllerRepresentable:包装 UIViewController 到 SwiftUI
  • UIViewRepresentable:包装 UIView 到 SwiftUI
  • Coordinator 模式:处理 delegate 回调
  • Auto Layout:NSLayoutConstraint.activate([...]) + translatesAutoresizingMaskIntoConstraints = false

Combine 响应式

  • Publisher:URLSession.shared.dataTaskPublishermapdecodeeraseToAnyPublisher
  • 订阅:.sink(receiveCompletion:receiveValue:) + .store(in: &cancellables)
  • 常用 Operators:debounce / removeDuplicates / combineLatest / flatMap
  • Subject:PassthroughSubject(无初始值)/ CurrentValueSubject(有初始值)

iOS 架构

MVVM(推荐):

  • Model:Codable 数据结构
  • Repository:protocol + async throws 方法
  • ViewModel:@MainActor class VM: ObservableObject + @Published 属性
  • View:@StateObject private var viewModel = VM()

VIPER(复杂场景):

  • View ←→ Presenter ←→ Interactor → Entity
  • Router 处理导航

网络层

  • APIClient:泛型 func get<T: Decodable>(_ path:) async throws -> T
  • Token 管理:request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
  • 错误处理:enum APIError: Error { case invalidURL, invalidResponse, httpError(Int) }

数据持久化

  • UserDefaults:@propertyWrapper struct UserDefault<T> 简化访问
  • Keychain:SecItemAdd / SecItemCopyMatching 存储敏感数据
  • Core Data:NSPersistentContainer + NSManagedObjectContext
  • SwiftData(iOS 17+):@Model 宏简化持久化

iOS Checklist

  • SwiftUI 优先,UIKit 按需集成
  • @MainActor 确保 UI 线程安全
  • async/await 替代回调
  • 依赖注入提升可测试性
  • LazyVStack/LazyHStack 优化大列表
  • 图片缓存(NSCache)减少内存压力
  • Keychain 存储敏感数据(非 UserDefaults)
  • 单元测试覆盖 ViewModel + Mock Repository

Android 开发

Jetpack Compose 核心模式

  • Composable:@Composable fun MyScreen() { ... }
  • State 管理:
    • remember { mutableStateOf(value) } — 本地状态
    • rememberSaveable — 跨配置变更保存
    • derivedStateOf — 派生状态避免重组
  • LazyColumn:items(list, key = { it.id }) 提供稳定 key
  • Side Effects:
    • LaunchedEffect(key) — 启动协程
    • DisposableEffect(key) — 清理资源(onDispose)
    • SideEffect — 同步状态到外部
    • snapshotFlow { state } — 监听状态变化转 Flow
  • Navigation:NavHost + composable(route) + navController.navigate()
  • Custom Modifier:fun Modifier.myModifier(): Modifier = composed { ... }

ViewModel + StateFlow

  • StateFlow(推荐替代 LiveData):
    • MutableStateFlow(UiState()) + .asStateFlow()
    • _uiState.update { it.copy(isLoading = true) }
    • Compose 中:val uiState by viewModel.uiState.collectAsState()
  • UiState data class:封装 loading / error / data

Kotlin Coroutines & Flow

  • 协程:viewModelScope.launch { withContext(Dispatchers.IO) { ... } }
  • 并发:coroutineScope { val a = async { ... }; val b = async { ... } }
  • Flow:flow { emit(value) } + .flowOn(Dispatchers.IO)
  • StateFlow:.stateIn(scope, SharingStarted.WhileSubscribed(5000), initial)
  • 搜索防抖:searchQuery.debounce(300).filter { it.isNotEmpty() }.flatMapLatest { ... }
  • Channel:Channel<Event>(BUFFERED) + .receiveAsFlow() 一次性事件

依赖注入 (Hilt)

  • @HiltAndroidApp Application + @AndroidEntryPoint Activity
  • @Module @InstallIn(SingletonComponent::class) 提供依赖
  • @Provides @Singleton 提供实例 / @Binds 绑定接口
  • ViewModel:@HiltViewModel class VM @Inject constructor(repo) + hiltViewModel()

Room 数据库

  • Entity:@Entity(tableName) + @PrimaryKey + @ColumnInfo
  • DAO:@Query / @Insert(onConflict = REPLACE) / @Delete + 返回 Flow<List<T>>
  • Database:@Database(entities, version) + Room.databaseBuilder

网络层 (Retrofit)

  • ApiService:@GET / @POST / @Path / @Query / @Body / @Multipart
  • Interceptor:AuthInterceptor 注入 Bearer Token
  • OkHttpClient:addInterceptor + connectTimeout

Android Checklist

  • Compose 优先,View 系统按需使用
  • StateFlow 替代 LiveData
  • Hilt 依赖注入
  • Room 本地持久化
  • key 参数优化 LazyColumn
  • remember / derivedStateOf 避免过度重组
  • Coil 图片加载 + 缓存策略
  • 单元测试覆盖 ViewModel(runTest + advanceUntilIdle)

跨平台开发

React Native vs Flutter

维度React NativeFlutter
语言TypeScriptDart
渲染原生组件(桥接)自绘引擎(Skia)
性能接近原生接近原生
热重载Fast RefreshHot Reload
生态npm(成熟)pub.dev(快速增长)
UI 一致性跟随系统完全一致
包体积~7MB~15MB

React Native 核心模式

  • 组件:函数组件 + Hooks(useState / useEffect / useCallback / useMemo)
  • 列表:FlatList + keyExtractor + initialNumToRender + windowSize
  • Navigation:@react-navigation/native + createNativeStackNavigator
  • 状态管理:Redux Toolkit(createSlice + createAsyncThunk)/ Zustand
  • 原生桥接:NativeModules 调用 iOS(Swift) / Android(Kotlin) 原生代码
  • 性能:React.memo / Hermes 引擎 / 新架构 JSI(无桥接序列化)

Flutter 核心模式

  • Widget:StatelessWidget / StatefulWidget + setState
  • 状态管理:
    • Provider:ChangeNotifier + Consumer / context.watch
    • Riverpod(推荐):FutureProvider / StateNotifierProvider + ref.watch
  • Navigation:go_router(GoRoute + context.go/push/pop
  • 原生桥接:MethodChannel + Platform Channels(iOS Swift / Android Kotlin)
  • 性能:const 构造函数 / ListView.builder / RepaintBoundary / ValueKey

选型建议

场景推荐理由
团队有 Web 背景React Native学习成本低
追求极致性能/动画Flutter自绘引擎 60fps
UI 高度定制Flutter完全控制渲染
大量原生交互React Native桥接生态成熟
需要原生极致体验原生开发无桥接开销

跨平台 Checklist

  • 选型匹配团队技术栈和业务需求
  • 列表优化:FlatList(RN) / ListView.builder(Flutter) + key
  • 状态管理:Redux Toolkit(RN) / Riverpod(Flutter)
  • 原生模块桥接方案验证
  • 包体积优化:ProGuard(Android) / tree-shake-icons(Flutter)
  • 性能基线:冷启动 < 1.5s / 渲染 > 55fps

通用最佳实践

实践说明
MVVM 架构分离 UI / 业务逻辑 / 数据层
依赖注入Hilt(Android) / Protocol(iOS) / Context(RN)
响应式状态StateFlow / Combine / Hooks / Riverpod
网络层封装统一错误处理 + Token 管理 + 重试
本地持久化Room / Core Data / AsyncStorage / Hive
列表优化懒加载 + 稳定 key + 缓存
测试覆盖ViewModel 单元测试 + UI 测试关键流程

触发词

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

Frequently asked questions

What does the Mobile AI skill do?

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

Why use Mobile on TypingMind?

Because you install it once and use it with any model. Mobile is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Mobile in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fengshao1227/ccg-workflow/tree/main/templates/skills/domains/mobile. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Mobile?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Mobile?

As many as you like. As long as a model supports skills, you can use Mobile with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Mobile AI skill free?

Yes. It is published on GitHub by fengshao1227 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇