返回顶部
c

combine-code-review

Reviews Combine framework code for memory leaks, operator misuse, and error handling. Use when reviewing code with import Combine, AnyPublisher, @Published, PassthroughSubject, or CurrentValueSubject.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
107
下载量
0
收藏
概述
安装方式
版本历史

combine-code-review

# Combine Code Review ## Quick Reference | Issue Type | Reference | |------------|-----------| | Publishers, Subjects, AnyPublisher | [references/publishers.md](references/publishers.md) | | map, flatMap, combineLatest, switchToLatest | [references/operators.md](references/operators.md) | | AnyCancellable, retain cycles, [weak self] | [references/memory.md](references/memory.md) | | tryMap, catch, replaceError, Never | [references/error-handling.md](references/error-handling.md) | ## Review Checklist - [ ] All `sink` closures use `[weak self]` when self owns cancellable - [ ] No `assign(to:on:self)` usage (use `assign(to: &$property)` or sink) - [ ] All AnyCancellables stored in Set or property (not discarded) - [ ] Subjects exposed as `AnyPublisher` via `eraseToAnyPublisher()` - [ ] `flatMap` used correctly (not when `map + switchToLatest` needed) - [ ] Error handling inside `flatMap` to keep main chain alive - [ ] `tryMap` followed by `mapError` to restore error types - [ ] `receive(on: DispatchQueue.main)` before UI updates - [ ] PassthroughSubject for events, CurrentValueSubject for state - [ ] Future wrapped in Deferred when used with retry ## When to Load References - Reviewing Subjects or publisher selection → publishers.md - Reviewing operator chains or combining publishers → operators.md - Reviewing subscriptions or memory issues → memory.md - Reviewing error handling or try* operators → error-handling.md ## Review Questions 1. Are all subscriptions being retained? (Check for discarded AnyCancellables) 2. Could any sink or assign create a retain cycle with self? 3. Does flatMap need to be switchToLatest for search/autocomplete? 4. What happens when this publisher fails? (Will it kill the main chain?) 5. Are error types preserved or properly mapped after try* operators?

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 combine-code-review-1776111550 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 combine-code-review-1776111550 技能

通过命令行安装

skillhub install combine-code-review-1776111550

下载 Zip 包

⬇ 下载 combine-code-review v1.2.0

文件大小: 7.77 KB | 发布时间: 2026-4-14 10:01

v1.2.0 最新 2026-4-14 10:01
- Added a detailed SKILL.md guide for reviewing Combine framework code.
- Included quick reference links to operator, publisher, memory, and error-handling documentation.
- Provided a comprehensive review checklist covering memory management, error handling, and operator selection.
- Outlined scenarios for loading specific reference materials.
- Listed key review questions to help ensure code safety and correctness.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部