[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BFE2R5HD76HF5R266NHB8F":3,"skill-same:01M7BFE2R5HD76HF5R266NHB8F":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7BFE2R5HD76HF5R266NHB8F","kotlin-coroutines-flows",null,"Kotlin协程与Flow在Android和KMP中的模式——结构化并发、Flow操作符、StateFlow、错误处理和测试。","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fdocs\u002Fzh-CN\u002Fskills\u002Fkotlin-coroutines-flows\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: kotlin-coroutines-flows\ndescription: Kotlin协程与Flow在Android和KMP中的模式——结构化并发、Flow操作符、StateFlow、错误处理和测试。\norigin: ECC\n---\n\n# Kotlin 协程与 Flow\n\n适用于 Android 和 Kotlin 多平台项目的结构化并发模式、基于 Flow 的响应式流以及协程测试。\n\n## 何时启用\n\n* 使用 Kotlin 协程编写异步代码\n* 使用 Flow、StateFlow 或 SharedFlow 实现响应式数据\n* 处理并发操作（并行加载、防抖、重试）\n* 测试协程和 Flow\n* 管理协程作用域与取消\n\n## 结构化并发\n\n### 作用域层级\n\n```\nApplication\n  └── viewModelScope (ViewModel)\n        └── coroutineScope { } (结构化子作用域)\n              ├── async { } (并发任务)\n              └── async { } (并发任务)\n```\n\n始终使用结构化并发——绝不使用 `GlobalScope`：\n\n```kotlin\n\u002F\u002F BAD\nGlobalScope.launch { fetchData() }\n\n\u002F\u002F GOOD — scoped to ViewModel lifecycle\nviewModelScope.launch { fetchData() }\n\n\u002F\u002F GOOD — scoped to composable lifecycle\nLaunchedEffect(key) { fetchData() }\n```\n\n### 并行分解\n\n使用 `coroutineScope` + `async` 处理并行工作：\n\n```kotlin\nsuspend fun loadDashboard(): Dashboard = coroutineScope {\n    val items = async { itemRepository.getRecent() }\n    val stats = async { statsRepository.getToday() }\n    val profile = async { userRepository.getCurrent() }\n    Dashboard(\n        items = items.await(),\n        stats = stats.await(),\n        profile = profile.await()\n    )\n}\n```\n\n### SupervisorScope\n\n当子协程失败不应取消同级协程时，使用 `supervisorScope`：\n\n```kotlin\nsuspend fun syncAll() = supervisorScope {\n    launch { syncItems() }       \u002F\u002F failure here won't cancel syncStats\n    launch { syncStats() }\n    launch { syncSettings() }\n}\n```\n\n## Flow 模式\n\n### Cold Flow —— 一次性操作到流的转换\n\n```kotlin\nfun observeItems(): Flow\u003CList\u003CItem>> = flow {\n    \u002F\u002F Re-emits whenever the database changes\n    itemDao.observeAll()\n        .map { entities -> entities.map { it.toDomain() } }\n        .collect { emit(it) }\n}\n```\n\n### 用于 UI 状态的 StateFlow\n\n```kotlin\nclass DashboardViewModel(\n    observeProgress: ObserveUserProgressUseCase\n) : ViewModel() {\n    val progress: StateFlow\u003CUserProgress> = observeProgress()\n        .stateIn(\n            scope = viewModelScope,\n            started = SharingStarted.WhileSubscribed(5_000),\n            initialValue = UserProgress.EMPTY\n        )\n}\n```\n\n`WhileSubscribed(5_000)` 会在最后一个订阅者离开后，保持上游活动 5 秒——可在配置更改时存活而无需重启。\n\n### 组合多个 Flow\n\n```kotlin\nval uiState: StateFlow\u003CHomeState> = combine(\n    itemRepository.observeItems(),\n    settingsRepository.observeTheme(),\n    userRepository.observeProfile()\n) { items, theme, profile ->\n    HomeState(items = items, theme = theme, profile = profile)\n}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), HomeState())\n```\n\n### Flow 操作符\n\n```kotlin\n\u002F\u002F Debounce search input\nsearchQuery\n    .debounce(300)\n    .distinctUntilChanged()\n    .flatMapLatest { query -> repository.search(query) }\n    .catch { emit(emptyList()) }\n    .collect { results -> _state.update { it.copy(results = results) } }\n\n\u002F\u002F Retry with exponential backoff\nfun fetchWithRetry(): Flow\u003CData> = flow { emit(api.fetch()) }\n    .retryWhen { cause, attempt ->\n        if (cause is IOException && attempt \u003C 3) {\n            delay(1000L * (1 shl attempt.toInt()))\n            true\n        } else {\n            false\n        }\n    }\n```\n\n### 用于一次性事件的 SharedFlow\n\n```kotlin\nclass ItemListViewModel : ViewModel() {\n    private val _effects = MutableSharedFlow\u003CEffect>()\n    val effects: SharedFlow\u003CEffect> = _effects.asSharedFlow()\n\n    sealed interface Effect {\n        data class ShowSnackbar(val message: String) : Effect\n        data class NavigateTo(val route: String) : Effect\n    }\n\n    private fun deleteItem(id: String) {\n        viewModelScope.launch {\n            repository.delete(id)\n            _effects.emit(Effect.ShowSnackbar(\"Item deleted\"))\n        }\n    }\n}\n\n\u002F\u002F Collect in Composable\nLaunchedEffect(Unit) {\n    viewModel.effects.collect { effect ->\n        when (effect) {\n            is Effect.ShowSnackbar -> snackbarHostState.showSnackbar(effect.message)\n            is Effect.NavigateTo -> navController.navigate(effect.route)\n        }\n    }\n}\n```\n\n## 调度器\n\n```kotlin\n\u002F\u002F CPU-intensive work\nwithContext(Dispatchers.Default) { parseJson(largePayload) }\n\n\u002F\u002F IO-bound work\nwithContext(Dispatchers.IO) { database.query() }\n\n\u002F\u002F Main thread (UI) — default in viewModelScope\nwithContext(Dispatchers.Main) { updateUi() }\n```\n\n在 KMP 中，使用 `Dispatchers.Default` 和 `Dispatchers.Main`（在所有平台上可用）。`Dispatchers.IO` 仅适用于 JVM\u002FAndroid——在其他平台上使用 `Dispatchers.Default` 或通过依赖注入提供。\n\n## 取消\n\n### 协作式取消\n\n长时间运行的循环必须检查取消状态：\n\n```kotlin\nsuspend fun processItems(items: List\u003CItem>) = coroutineScope {\n    for (item in items) {\n        ensureActive()  \u002F\u002F throws CancellationException if cancelled\n        process(item)\n    }\n}\n```\n\n### 使用 try\u002Ffinally 进行清理\n\n```kotlin\nviewModelScope.launch {\n    try {\n        _state.update { it.copy(isLoading = true) }\n        val data = repository.fetch()\n        _state.update { it.copy(data = data) }\n    } finally {\n        _state.update { it.copy(isLoading = false) }  \u002F\u002F always runs, even on cancellation\n    }\n}\n```\n\n## 测试\n\n### 使用 Turbine 测试 StateFlow\n\n```kotlin\n@Test\nfun `search updates item list`() = runTest {\n    val fakeRepository = FakeItemRepository().apply { emit(testItems) }\n    val viewModel = ItemListViewModel(GetItemsUseCase(fakeRepository))\n\n    viewModel.state.test {\n        assertEquals(ItemListState(), awaitItem())  \u002F\u002F initial\n\n        viewModel.onSearch(\"query\")\n        val loading = awaitItem()\n        assertTrue(loading.isLoading)\n\n        val loaded = awaitItem()\n        assertFalse(loaded.isLoading)\n        assertEquals(1, loaded.items.size)\n    }\n}\n```\n\n### 使用 TestDispatcher 测试\n\n```kotlin\n@Test\nfun `parallel load completes correctly`() = runTest {\n    val viewModel = DashboardViewModel(\n        itemRepo = FakeItemRepo(),\n        statsRepo = FakeStatsRepo()\n    )\n\n    viewModel.load()\n    advanceUntilIdle()\n\n    val state = viewModel.state.value\n    assertNotNull(state.items)\n    assertNotNull(state.stats)\n}\n```\n\n### 模拟 Flow\n\n```kotlin\nclass FakeItemRepository : ItemRepository {\n    private val _items = MutableStateFlow\u003CList\u003CItem>>(emptyList())\n\n    override fun observeItems(): Flow\u003CList\u003CItem>> = _items\n\n    fun emit(items: List\u003CItem>) { _items.value = items }\n\n    override suspend fun getItemsByCategory(category: String): Result\u003CList\u003CItem>> {\n        return Result.success(_items.value.filter { it.category == category })\n    }\n}\n```\n\n## 应避免的反模式\n\n* 使用 `GlobalScope`——会导致协程泄漏，且无法结构化取消\n* 在没有作用域的情况下于 `init {}` 中收集 Flow——应使用 `viewModelScope.launch`\n* 将 `MutableStateFlow` 与可变集合一起使用——始终使用不可变副本：`_state.update { it.copy(list = it.list + newItem) }`\n* 捕获 `CancellationException`——应让其传播以实现正确的取消\n* 使用 `flowOn(Dispatchers.Main)` 进行收集——收集调度器是调用方的调度器\n* 在 `@Composable` 中创建 `Flow` 而不使用 `remember`——每次重组都会重新创建 Flow\n\n## 参考\n\n关于 Flow 在 UI 层的消费，请参阅技能：`compose-multiplatform-patterns`。\n关于协程在各层中的适用位置，请参阅技能：`android-clean-architecture`。\n","# Kotlin 协程与 Flow\n\n适用于 Android 和 Kotlin 多平台项目的结构化并发模式、基于 Flow 的响应式流以及协程测试。\n\n## 何时启用\n\n* 使用 Kotlin 协程编写异步代码\n* 使用 Flow、StateFlow 或 SharedFlow 实现响应式数据\n* 处理并发操作（并行加载、防抖、重试）\n* 测试协程和 Flow\n* 管理协程作用域与取消\n\n## 结构化并发\n\n### 作用域层级\n\n```\nApplication\n  └── viewModelScope (ViewModel)\n        └── coroutineScope { } (结构化子作用域)\n              ├── async { } (并发任务)\n              └── async { } (并发任务)\n```\n\n始终使用结构化并发——绝不使用 `GlobalScope`：\n\n```kotlin\n\u002F\u002F BAD\nGlobalScope.launch { fetchData() }\n\n\u002F\u002F GOOD — scoped to ViewModel lifecycle\nviewModelScope.launch { fetchData() }\n\n\u002F\u002F GOOD — scoped to composable lifecycle\nLaunchedEffect(key) { fetchData() }\n```\n\n### 并行分解\n\n使用 `coroutineScope` + `async` 处理并行工作：\n\n```kotlin\nsuspend fun loadDashboard(): Dashboard = coroutineScope {\n    val items = async { itemRepository.getRecent() }\n    val stats = async { statsRepository.getToday() }\n    val profile = async { userRepository.getCurrent() }\n    Dashboard(\n        items = items.await(),\n        stats = stats.await(),\n        profile = profile.await()\n    )\n}\n```\n\n### SupervisorScope\n\n当子协程失败不应取消同级协程时，使用 `supervisorScope`：\n\n```kotlin\nsuspend fun syncAll() = supervisorScope {\n    launch { syncItems() }       \u002F\u002F failure here won't cancel syncStats\n    launch { syncStats() }\n    launch { syncSettings() }\n}\n```\n\n## Flow 模式\n\n### Cold Flow —— 一次性操作到流的转换\n\n```kotlin\nfun observeItems(): Flow\u003CList\u003CItem>> = flow {\n    \u002F\u002F Re-emits whenever the database changes\n    itemDao.observeAll()\n        .map { entities -> entities.map { it.toDomain() } }\n        .collect { emit(it) }\n}\n```\n\n### 用于 UI 状态的 StateFlow\n\n```kotlin\nclass DashboardViewModel(\n    observeProgress: ObserveUserProgressUseCase\n) : ViewModel() {\n    val progress: StateFlow\u003CUserProgress> = observeProgress()\n        .stateIn(\n            scope = viewModelScope,\n            started = SharingStarted.WhileSubscribed(5_000),\n            initialValue = UserProgress.EMPTY\n        )\n}\n```\n\n`WhileSubscribed(5_000)` 会在最后一个订阅者离开后，保持上游活动 5 秒——可在配置更改时存活而无需重启。\n\n### 组合多个 Flow\n\n```kotlin\nval uiState: StateFlow\u003CHomeState> = combine(\n    itemRepository.observeItems(),\n    settingsRepository.observeTheme(),\n    userRepository.observeProfile()\n) { items, theme, profile ->\n    HomeState(items = items, theme = theme, profile = profile)\n}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), HomeState())\n```\n\n### Flow 操作符\n\n```kotlin\n\u002F\u002F Debounce search input\nsearchQuery\n    .debounce(300)\n    .distinctUntilChanged()\n    .flatMapLatest { query -> repository.search(query) }\n    .catch { emit(emptyList()) }\n    .collect { results -> _state.update { it.copy(results = results) } }\n\n\u002F\u002F Retry with exponential backoff\nfun fetchWithRetry(): Flow\u003CData> = flow { emit(api.fetch()) }\n    .retryWhen { cause, attempt ->\n        if (cause is IOException && attempt \u003C 3) {\n            delay(1000L * (1 shl attempt.toInt()))\n            true\n        } else {\n            false\n        }\n    }\n```\n\n### 用于一次性事件的 SharedFlow\n\n```kotlin\nclass ItemListViewModel : ViewModel() {\n    private val _effects = MutableSharedFlow\u003CEffect>()\n    val effects: SharedFlow\u003CEffect> = _effects.asSharedFlow()\n\n    sealed interface Effect {\n        data class ShowSnackbar(val message: String) : Effect\n        data class NavigateTo(val route: String) : Effect\n    }\n\n    private fun deleteItem(id: String) {\n        viewModelScope.launch {\n            repository.delete(id)\n            _effects.emit(Effect.ShowSnackbar(\"Item deleted\"))\n        }\n    }\n}\n\n\u002F\u002F Collect in Composable\nLaunchedEffect(Unit) {\n    viewModel.effects.collect { effect ->\n        when (effect) {\n            is Effect.ShowSnackbar -> snackbarHostState.showSnackbar(effect.message)\n            is Effect.NavigateTo -> navController.navigate(effect.route)\n        }\n    }\n}\n```\n\n## 调度器\n\n```kotlin\n\u002F\u002F CPU-intensive work\nwithContext(Dispatchers.Default) { parseJson(largePayload) }\n\n\u002F\u002F IO-bound work\nwithContext(Dispatchers.IO) { database.query() }\n\n\u002F\u002F Main thread (UI) — default in viewModelScope\nwithContext(Dispatchers.Main) { updateUi() }\n```\n\n在 KMP 中，使用 `Dispatchers.Default` 和 `Dispatchers.Main`（在所有平台上可用）。`Dispatchers.IO` 仅适用于 JVM\u002FAndroid——在其他平台上使用 `Dispatchers.Default` 或通过依赖注入提供。\n\n## 取消\n\n### 协作式取消\n\n长时间运行的循环必须检查取消状态：\n\n```kotlin\nsuspend fun processItems(items: List\u003CItem>) = coroutineScope {\n    for (item in items) {\n        ensureActive()  \u002F\u002F throws CancellationException if cancelled\n        process(item)\n    }\n}\n```\n\n### 使用 try\u002Ffinally 进行清理\n\n```kotlin\nviewModelScope.launch {\n    try {\n        _state.update { it.copy(isLoading = true) }\n        val data = repository.fetch()\n        _state.update { it.copy(data = data) }\n    } finally {\n        _state.update { it.copy(isLoading = false) }  \u002F\u002F always runs, even on cancellation\n    }\n}\n```\n\n## 测试\n\n### 使用 Turbine 测试 StateFlow\n\n```kotlin\n@Test\nfun `search updates item list`() = runTest {\n    val fakeRepository = FakeItemRepository().apply { emit(testItems) }\n    val viewModel = ItemListViewModel(GetItemsUseCase(fakeRepository))\n\n    viewModel.state.test {\n        assertEquals(ItemListState(), awaitItem())  \u002F\u002F initial\n\n        viewModel.onSearch(\"query\")\n        val loading = awaitItem()\n        assertTrue(loading.isLoading)\n\n        val loaded = awaitItem()\n        assertFalse(loaded.isLoading)\n        assertEquals(1, loaded.items.size)\n    }\n}\n```\n\n### 使用 TestDispatcher 测试\n\n```kotlin\n@Test\nfun `parallel load completes correctly`() = runTest {\n    val viewModel = DashboardViewModel(\n        itemRepo = FakeItemRepo(),\n        statsRepo = FakeStatsRepo()\n    )\n\n    viewModel.load()\n    advanceUntilIdle()\n\n    val state = viewModel.state.value\n    assertNotNull(state.items)\n    assertNotNull(state.stats)\n}\n```\n\n### 模拟 Flow\n\n```kotlin\nclass FakeItemRepository : ItemRepository {\n    private val _items = MutableStateFlow\u003CList\u003CItem>>(emptyList())\n\n    override fun observeItems(): Flow\u003CList\u003CItem>> = _items\n\n    fun emit(items: List\u003CItem>) { _items.value = items }\n\n    override suspend fun getItemsByCategory(category: String): Result\u003CList\u003CItem>> {\n        return Result.success(_items.value.filter { it.category == category })\n    }\n}\n```\n\n## 应避免的反模式\n\n* 使用 `GlobalScope`——会导致协程泄漏，且无法结构化取消\n* 在没有作用域的情况下于 `init {}` 中收集 Flow——应使用 `viewModelScope.launch`\n* 将 `MutableStateFlow` 与可变集合一起使用——始终使用不可变副本：`_state.update { it.copy(list = it.list + newItem) }`\n* 捕获 `CancellationException`——应让其传播以实现正确的取消\n* 使用 `flowOn(Dispatchers.Main)` 进行收集——收集调度器是调用方的调度器\n* 在 `@Composable` 中创建 `Flow` 而不使用 `remember`——每次重组都会重新创建 Flow\n\n## 参考\n\n关于 Flow 在 UI 层的消费，请参阅技能：`compose-multiplatform-patterns`。\n关于协程在各层中的适用位置，请参阅技能：`android-clean-architecture`。\n",{"name":5,"origin":24,"description":7},"ECC","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fdocs\u002Fzh-CN\u002Fskills\u002Fkotlin-coroutines-flows",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill kotlin-coroutines-flows",{"tool":40,"command":41},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill kotlin-coroutines-flows",{"tool":43,"command":44},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill kotlin-coroutines-flows","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-Everything-claude-code\u002Fdocs\u002Fzh-CN\u002Fskills\u002Fkotlin-coroutines-flows\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]