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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/combine-code-reviewWhat This Skill Does
The combine-code-review skill acts as a specialized static analysis assistant for Apple's Combine framework. It is designed to identify common architectural pitfalls, performance bottlenecks, and dangerous memory patterns that frequently arise in reactive Swift codebases. By leveraging a comprehensive checklist—including verification of [weak self] in closures, correct usage of AnyCancellable storage, and appropriate error handling via tryMap or catch—this agent provides actionable feedback to developers. It specifically targets high-risk areas like operator misuse, improper usage of assign(to:on:), and subject management, ensuring your reactive streams are both memory-safe and predictable.
Installation
To integrate this skill into your environment, run the following command within your terminal while the OpenClaw agent is active:
clawhub install openclaw/skills/skills/anderskev/combine-code-review
Use Cases
This skill is essential when refactoring legacy code that uses RxSwift or early Combine implementations. It is best utilized during pull request reviews, feature architectural design phases, and debugging sessions involving unexpected UI behavior or memory growth. Developers should invoke this skill when the codebase contains imports of Combine, heavy use of @Published properties, or chains involving complex transformations like flatMap and switchToLatest.
Example Prompts
- "Review this view model for potential retain cycles and ensure all subscriptions are handled correctly: [paste code here]"
- "I am getting a memory leak in my Combine pipeline. Can you audit my
sinkclosures andAnyCancellableset usage?" - "My publisher chain keeps terminating early on network errors. How can I use
catchorflatMapto keep the main stream alive?"
Tips & Limitations
To get the most out of the skill, always provide context regarding the ownership model (e.g., is the publisher inside a View, ViewModel, or Service?). The agent relies on specific keyword detection; ensure you provide enough surrounding code to allow it to trace AnyCancellable lifecycles effectively. Note that this skill is a static analysis tool; it cannot execute your code or detect runtime race conditions that require local environment debugging. Always cross-reference the suggested fixes with the provided documentation files like memory.md or operators.md to ensure a deep understanding of the reactive principles being applied.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-combine-code-review": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do