deepagents-architectur…
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing…
Reviews Combine framework code for memory leaks, operator misuse, and error handling. Use when reviewing code with import Combine, AnyPublisher, @Published, PassthroughSubject, or CurrentValueSubject.
$ npx -y skills add existential-birds/beagle --skill combine-code-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/combine-code-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Reviews Combine framework code for memory leaks, operator misuse, and error handling. Use when reviewing code with import Combine, AnyPublisher, @Published, PassthroughSubject, or CurrentValueSubject.
name: combine-code-review description: Reviews Combine framework code for memory leaks, operator misuse, and error handling. Use when reviewing code with import Combine, AnyPublisher, @Published, PassthroughSubject, or CurrentValueSubject.
| 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) |
Complete in order. Do not skip ahead while a prior gate is open.
1. **Scope** — **Pass:** You name at least one file or type under review that imports Combine or uses APIs from the Quick Reference (e.g. `AnyPublisher`, `@Published`, `PassthroughSubject`). If none apply, stop with “out of scope.” 2. **Subscription retention** — **Pass:** For each `sink`, `assign`, and `store(in:)` in scope, you state where the `AnyCancellable` is retained (property, `Set`, task lifetime) or mark **ephemeral** with a one-line reason (e.g. synchronous one-shot that cannot outlive caller). If you cannot tell from the snippet, say **unknown** and ask for surrounding storage, do not assume safe. 3. **Retain-cycle claim** — **Pass:** **Confirmed** leak findings state the capture chain (e.g. self → stored cancellable → closure strongly capturing self). Label suspected cases **risk** / **verify**, not confirmed leaks. When arguing safety, cite `[weak self]`, `[unowned self]`, or non-capturing patterns you relied on. 4. **UI / main thread** — **Pass:** For updates to UIKit/SwiftUI from a chain, you either point to `receive(on: DispatchQueue.main)`, `@MainActor`, or equivalent before the UI work, **or** flag missing scheduling with `file:line`. 5. **Severity and checklist** — **Pass:** Every **high** or **critical** item includes `file:line` (or exact pasted lines) and names which **Review Checklist** row it breaks. Lower-severity notes may omit line numbers but must still be reproducible from named files.
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?
Image: NASA, Public Domain. Source Beagle is an Agent Skills marketplace: framework-aware code review, documentation, testing, architectural analysis, and git workflows for any compatible coding agent.
Repo: existential-birds/beagle
Guides architectural decisions for Deep Agents applications. Use when deciding between Deep Agents vs alternatives, choosing backend strategies, designing…
Reviews Deep Agents code for bugs, anti-patterns, and improvements. Use when reviewing code that uses create_deep_agent, backends, subagents, middleware, or…
Implements agents using Deep Agents. Use when building agents with create_deep_agent, configuring backends, defining subagents, adding middleware, or setting…
Guides architectural decisions for LangGraph applications. Use when deciding between LangGraph vs alternatives, choosing state management strategies, designing…
Reviews LangGraph code for bugs, anti-patterns, and improvements. Use when reviewing code that uses StateGraph, nodes, edges, checkpointing, or other LangGraph…
Implements stateful agent graphs using LangGraph. Use when building graphs, adding nodes/edges, defining state schemas, implementing checkpointing, handling…