[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79AW12BZP1JJG66HTYJ3ZYH":3,"skill-same:01M79AW12BZP1JJG66HTYJ3ZYH":81},{"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":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":6,"updatedAt":45,"install":46,"resources":58},"01M79AW12BZP1JJG66HTYJ3ZYH","golang-samber-ro",null,"Reactive streams and event-driven programming in Golang using samber\u002Fro — ReactiveX implementation with 150+ type-safe operators, cold\u002Fhot observables, 5 subject types (Publish, Behavior, Replay, Async, Unicast), declarative pipelines via Pipe, 40+ plugins (HTTP, cron, fsnotify, JSON, logging), automatic backpressure, error propagation, and Go context integration. Apply when using or adopting samber\u002Fro, when the codebase imports github.com\u002Fsamber\u002Fro, or when building asynchronous event-driven pipelines, real-time data processing, streams, or reactive architectures in Go. Not for finite slice transforms (→ See `samber\u002Fcc-skills-golang@golang-samber-lo` skill).","CCH-HQ\u002Fcchp-automation","CCH-HQ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F253065381?v=4","01M79AG9QPRTJEVTCT1ZS7TM9J","CCH HQ","01M79AG9RNM4TAB3PJQH71X62P",2,"MIT","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: golang-samber-ro\ndescription: \"Reactive streams and event-driven programming in Golang using samber\u002Fro — ReactiveX implementation with 150+ type-safe operators, cold\u002Fhot observables, 5 subject types (Publish, Behavior, Replay, Async, Unicast), declarative pipelines via Pipe, 40+ plugins (HTTP, cron, fsnotify, JSON, logging), automatic backpressure, error propagation, and Go context integration. Apply when using or adopting samber\u002Fro, when the codebase imports github.com\u002Fsamber\u002Fro, or when building asynchronous event-driven pipelines, real-time data processing, streams, or reactive architectures in Go. Not for finite slice transforms (→ See `samber\u002Fcc-skills-golang@golang-samber-lo` skill).\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.1.3\"\n  openclaw:\n    emoji: \"👁\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n    install: []\n    skill-library-version: \"0.3.0\"\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent mcp__context7__resolve-library-id mcp__context7__query-docs AskUserQuestion Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*\n---\n\n**Persona:** You are a Go engineer who reaches for reactive streams when data flows asynchronously or infinitely. You use samber\u002Fro to build declarative pipelines instead of manual goroutine\u002Fchannel wiring, but you know when a simple slice + samber\u002Flo is enough.\n\n**Thinking mode:** Use `ultrathink` when designing advanced reactive pipelines or choosing between cold\u002Fhot observables, subjects, and combining operators. Wrong architecture leads to resource leaks or missed events.\n\n# samber\u002Fro — Reactive Streams for Go\n\nGo implementation of [ReactiveX](https:\u002F\u002Freactivex.io\u002F). Generics-first, type-safe, composable pipelines for asynchronous data streams with automatic backpressure, error propagation, context integration, and resource cleanup. 150+ operators, 5 subject types, 40+ plugins.\n\n**Official Resources:**\n\n- [github.com\u002Fsamber\u002Fro](https:\u002F\u002Fgithub.com\u002Fsamber\u002Fro)\n- [ro.samber.dev](https:\u002F\u002Fro.samber.dev)\n- [pkg.go.dev\u002Fgithub.com\u002Fsamber\u002Fro](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fsamber\u002Fro)\n\nThis skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber\u002Fcc-skills-golang@golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber\u002Fcc-skills-golang@golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n## Why samber\u002Fro (Streams vs Slices)\n\nGo channels + goroutines become unwieldy for complex async pipelines: manual channel closures, verbose goroutine lifecycle, error propagation across nested selects, and no composable operators. `samber\u002Fro` solves this with declarative, chainable stream operators.\n\n**When to use which tool:**\n\n| Scenario | Tool | Why |\n| --- | --- | --- |\n| Transform a slice (map, filter, reduce) | `samber\u002Flo` | Finite, synchronous, eager — no stream overhead needed |\n| Simple goroutine fan-out with error handling | `errgroup` | Standard lib, lightweight, sufficient for bounded concurrency |\n| Infinite event stream (WebSocket, tickers, file watcher) | `samber\u002Fro` | Declarative pipeline with backpressure, retry, timeout, combine |\n| Real-time data enrichment from multiple async sources | `samber\u002Fro` | CombineLatest\u002FZip compose dependent streams without manual select |\n| Pub\u002Fsub with multiple consumers sharing one source | `samber\u002Fro` | Hot observables (Share\u002FSubjects) handle multicast natively |\n\n**Key differences: lo vs ro**\n\n| Aspect | `samber\u002Flo` | `samber\u002Fro` |\n| --- | --- | --- |\n| Data | Finite slices | Infinite streams |\n| Execution | Synchronous, blocking | Asynchronous, non-blocking |\n| Evaluation | Eager (allocates intermediate slices) | Lazy (processes items as they arrive) |\n| Timing | Immediate | Time-aware (delay, throttle, interval, timeout) |\n| Error model | Return `(T, error)` per call | Error channel propagates through pipeline |\n| Use case | Collection transforms | Event-driven, real-time, async pipelines |\n\n## Installation\n\n```bash\ngo get github.com\u002Fsamber\u002Fro\n```\n\n## Core Concepts\n\nFour building blocks:\n\n1. **Observable** — a data source that emits values over time. Cold by default: each subscriber triggers independent execution from scratch\n2. **Observer** — a consumer with three callbacks: `onNext(T)`, `onError(error)`, `onComplete()`\n3. **Operator** — a function that transforms an observable into another observable, chained via `Pipe`\n4. **Subscription** — the connection between observable and observer. Call `.Wait()` to block or `.Unsubscribe()` to cancel\n\n```go\nobservable := ro.Pipe2(\n    ro.RangeWithInterval(0, 5, 1*time.Second),\n    ro.Filter(func(x int) bool { return x%2 == 0 }),\n    ro.Map(func(x int) string { return fmt.Sprintf(\"even-%d\", x) }),\n)\n\nobservable.Subscribe(ro.NewObserver(\n    func(s string) { fmt.Println(s) },      \u002F\u002F onNext\n    func(err error) { log.Println(err) },    \u002F\u002F onError\n    func() { fmt.Println(\"Done!\") },         \u002F\u002F onComplete\n))\n\u002F\u002F Output: \"even-0\", \"even-2\", \"even-4\", \"Done!\"\n\n\u002F\u002F Or collect synchronously:\nvalues, err := ro.Collect(observable)\n```\n\n## Cold vs Hot Observables\n\n**Cold** (default): each `.Subscribe()` starts a new independent execution. Safe and predictable — use by default.\n\n**Hot**: multiple subscribers share a single execution. Use when the source is expensive (WebSocket, DB poll) or subscribers must see the same events.\n\n| Convert with | Behavior |\n| --- | --- |\n| `Share()` | Cold → hot with reference counting. Last unsubscribe tears down |\n| `ShareReplay(n)` | Same as Share + buffers last N values for late subscribers |\n| `Connectable()` | Cold → hot, but waits for explicit `.Connect()` call |\n| Subjects | Natively hot — call `.Send()`, `.Error()`, `.Complete()` directly |\n\n| Subject | Constructor | Replay behavior |\n| --- | --- | --- |\n| `PublishSubject` | `NewPublishSubject[T]()` | None — late subscribers miss past events |\n| `BehaviorSubject` | `NewBehaviorSubject[T](initial)` | Replays last value to new subscribers |\n| `ReplaySubject` | `NewReplaySubject[T](bufferSize)` | Replays last N values |\n| `AsyncSubject` | `NewAsyncSubject[T]()` | Emits only last value, only on complete |\n| `UnicastSubject` | `NewUnicastSubject[T](bufferSize)` | Single subscriber only |\n\nFor subject details and hot observable patterns, see [Subjects Guide](.\u002Freferences\u002Fsubjects-guide.md).\n\n## Operator Quick Reference\n\n| Category | Key operators | Purpose |\n| --- | --- | --- |\n| Creation | `Just`, `FromSlice`, `FromChannel`, `Range`, `Interval`, `Defer`, `Future` | Create observables from various sources |\n| Transform | `Map`, `MapErr`, `FlatMap`, `Scan`, `Reduce`, `GroupBy` | Transform or accumulate stream values |\n| Filter | `Filter`, `Take`, `TakeLast`, `Skip`, `Distinct`, `Find`, `First`, `Last` | Selectively emit values |\n| Combine | `Merge`, `Concat`, `Zip2`–`Zip6`, `CombineLatest2`–`CombineLatest5`, `Race` | Merge multiple observables |\n| Error | `Catch`, `OnErrorReturn`, `OnErrorResumeNextWith`, `Retry`, `RetryWithConfig` | Recover from errors |\n| Timing | `Delay`, `DelayEach`, `Timeout`, `ThrottleTime`, `SampleTime`, `BufferWithTime` | Control emission timing |\n| Side effect | `Tap`\u002F`Do`, `TapOnNext`, `TapOnError`, `TapOnComplete` | Observe without altering stream |\n| Terminal | `Collect`, `ToSlice`, `ToChannel`, `ToMap` | Consume stream into Go types |\n\nUse typed `Pipe2`, `Pipe3` ... `Pipe25` for compile-time type safety across operator chains. The untyped `Pipe` uses `any` and loses type checking.\n\nFor the complete operator catalog (150+ operators with signatures), see [Operators Guide](.\u002Freferences\u002Foperators-guide.md).\n\n## Common Mistakes\n\n| Mistake | Why it fails | Fix |\n| --- | --- | --- |\n| Using `ro.OnNext()` without error handler | Errors are silently dropped — bugs hide in production | Use `ro.NewObserver(onNext, onError, onComplete)` with all 3 callbacks |\n| Using untyped `Pipe()` instead of `Pipe2`\u002F`Pipe3` | Loses compile-time type safety, errors surface at runtime | Use `Pipe2`, `Pipe3`...`Pipe25` for typed operator chains |\n| Forgetting `.Unsubscribe()` on infinite streams | Goroutine leak — the observable runs forever | Use `TakeUntil(signal)`, context cancellation, or explicit `Unsubscribe()` |\n| Using `Share()` when cold is sufficient | Unnecessary complexity, harder to reason about lifecycle | Use hot observables only when multiple consumers need the same stream |\n| Using `samber\u002Fro` for finite slice transforms | Stream overhead (goroutines, subscriptions) for a synchronous operation | Use `samber\u002Flo` — it's simpler, faster, and purpose-built for slices |\n| Not propagating context for cancellation | Streams ignore shutdown signals, causing resource leaks on termination | Chain `ContextWithTimeout` or `ThrowOnContextCancel` in the pipeline |\n\n## Best Practices\n\n1. **Always handle all three events** — use `NewObserver(onNext, onError, onComplete)`, not just `OnNext`. Unhandled errors cause silent data loss\n2. **Use `Collect()` for synchronous consumption** — when the stream is finite and you need `[]T`, `Collect` blocks until complete and returns the slice + error\n3. **Prefer typed Pipe functions** — `Pipe2`, `Pipe3`...`Pipe25` catch type mismatches at compile time. Reserve untyped `Pipe` for dynamic operator chains\n4. **Bound infinite streams** — use `Take(n)`, `TakeUntil(signal)`, `Timeout(d)`, or context cancellation. Unbounded streams leak goroutines\n5. **Use `Tap`\u002F`Do` for observability** — log, trace, or meter emissions without altering the stream. Chain `TapOnError` for error monitoring\n6. **Prefer `samber\u002Flo` for simple transforms** — if the data is a finite slice and you need Map\u002FFilter\u002FReduce, use `lo`. Reach for `ro` when data arrives over time, from multiple sources, or needs retry\u002Ftimeout\u002Fbackpressure\n\n## Plugin Ecosystem\n\n40+ plugins extend ro with domain-specific operators:\n\n| Category | Plugins | Import path prefix |\n| --- | --- | --- |\n| Encoding | JSON, CSV, Base64, Gob | `plugins\u002Fencoding\u002F...` |\n| Network | HTTP, I\u002FO, FSNotify | `plugins\u002Fhttp`, `plugins\u002Fio`, `plugins\u002Ffsnotify` |\n| Scheduling | Cron, ICS | `plugins\u002Fcron`, `plugins\u002Fics` |\n| Observability | Zap, Slog, Zerolog, Logrus, Sentry, Oops | `plugins\u002Fobservability\u002F...`, `plugins\u002Fsamber\u002Foops` |\n| Rate limiting | Native, Ulule | `plugins\u002Fratelimit\u002F...` |\n| Data | Bytes, Strings, Sort, Strconv, Regexp, Template | `plugins\u002Fbytes`, `plugins\u002Fstrings`, etc. |\n| System | Process, Signal | `plugins\u002Fproc`, `plugins\u002Fsignal` |\n\nFor the full plugin catalog with import paths and usage examples, see [Plugin Ecosystem](.\u002Freferences\u002Fplugin-ecosystem.md).\n\nFor real-world reactive patterns (retry+timeout, WebSocket fan-out, graceful shutdown, stream combination), see [Patterns](.\u002Freferences\u002Fpatterns.md).\n\nIf you encounter a bug or unexpected behavior in samber\u002Fro, open an issue at [github.com\u002Fsamber\u002Fro\u002Fissues](https:\u002F\u002Fgithub.com\u002Fsamber\u002Fro\u002Fissues).\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-samber-lo` skill for finite slice transforms (Map, Filter, Reduce, GroupBy) — use lo when data is already in a slice\n- → See `samber\u002Fcc-skills-golang@golang-samber-mo` skill for monadic types (Option, Result, Either) that compose with ro pipelines\n- → See `samber\u002Fcc-skills-golang@golang-samber-hot` skill for in-memory caching (also available as an ro plugin)\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for goroutine\u002Fchannel patterns when reactive streams are overkill\n- → See `samber\u002Fcc-skills-golang@golang-observability` skill for monitoring reactive pipelines in production\n","**Persona:** You are a Go engineer who reaches for reactive streams when data flows asynchronously or infinitely. You use samber\u002Fro to build declarative pipelines instead of manual goroutine\u002Fchannel wiring, but you know when a simple slice + samber\u002Flo is enough.\n\n**Thinking mode:** Use `ultrathink` when designing advanced reactive pipelines or choosing between cold\u002Fhot observables, subjects, and combining operators. Wrong architecture leads to resource leaks or missed events.\n\n# samber\u002Fro — Reactive Streams for Go\n\nGo implementation of [ReactiveX](https:\u002F\u002Freactivex.io\u002F). Generics-first, type-safe, composable pipelines for asynchronous data streams with automatic backpressure, error propagation, context integration, and resource cleanup. 150+ operators, 5 subject types, 40+ plugins.\n\n**Official Resources:**\n\n- [github.com\u002Fsamber\u002Fro](https:\u002F\u002Fgithub.com\u002Fsamber\u002Fro)\n- [ro.samber.dev](https:\u002F\u002Fro.samber.dev)\n- [pkg.go.dev\u002Fgithub.com\u002Fsamber\u002Fro](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fsamber\u002Fro)\n\nThis skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber\u002Fcc-skills-golang@golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber\u002Fcc-skills-golang@golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n## Why samber\u002Fro (Streams vs Slices)\n\nGo channels + goroutines become unwieldy for complex async pipelines: manual channel closures, verbose goroutine lifecycle, error propagation across nested selects, and no composable operators. `samber\u002Fro` solves this with declarative, chainable stream operators.\n\n**When to use which tool:**\n\n| Scenario | Tool | Why |\n| --- | --- | --- |\n| Transform a slice (map, filter, reduce) | `samber\u002Flo` | Finite, synchronous, eager — no stream overhead needed |\n| Simple goroutine fan-out with error handling | `errgroup` | Standard lib, lightweight, sufficient for bounded concurrency |\n| Infinite event stream (WebSocket, tickers, file watcher) | `samber\u002Fro` | Declarative pipeline with backpressure, retry, timeout, combine |\n| Real-time data enrichment from multiple async sources | `samber\u002Fro` | CombineLatest\u002FZip compose dependent streams without manual select |\n| Pub\u002Fsub with multiple consumers sharing one source | `samber\u002Fro` | Hot observables (Share\u002FSubjects) handle multicast natively |\n\n**Key differences: lo vs ro**\n\n| Aspect | `samber\u002Flo` | `samber\u002Fro` |\n| --- | --- | --- |\n| Data | Finite slices | Infinite streams |\n| Execution | Synchronous, blocking | Asynchronous, non-blocking |\n| Evaluation | Eager (allocates intermediate slices) | Lazy (processes items as they arrive) |\n| Timing | Immediate | Time-aware (delay, throttle, interval, timeout) |\n| Error model | Return `(T, error)` per call | Error channel propagates through pipeline |\n| Use case | Collection transforms | Event-driven, real-time, async pipelines |\n\n## Installation\n\n```bash\ngo get github.com\u002Fsamber\u002Fro\n```\n\n## Core Concepts\n\nFour building blocks:\n\n1. **Observable** — a data source that emits values over time. Cold by default: each subscriber triggers independent execution from scratch\n2. **Observer** — a consumer with three callbacks: `onNext(T)`, `onError(error)`, `onComplete()`\n3. **Operator** — a function that transforms an observable into another observable, chained via `Pipe`\n4. **Subscription** — the connection between observable and observer. Call `.Wait()` to block or `.Unsubscribe()` to cancel\n\n```go\nobservable := ro.Pipe2(\n    ro.RangeWithInterval(0, 5, 1*time.Second),\n    ro.Filter(func(x int) bool { return x%2 == 0 }),\n    ro.Map(func(x int) string { return fmt.Sprintf(\"even-%d\", x) }),\n)\n\nobservable.Subscribe(ro.NewObserver(\n    func(s string) { fmt.Println(s) },      \u002F\u002F onNext\n    func(err error) { log.Println(err) },    \u002F\u002F onError\n    func() { fmt.Println(\"Done!\") },         \u002F\u002F onComplete\n))\n\u002F\u002F Output: \"even-0\", \"even-2\", \"even-4\", \"Done!\"\n\n\u002F\u002F Or collect synchronously:\nvalues, err := ro.Collect(observable)\n```\n\n## Cold vs Hot Observables\n\n**Cold** (default): each `.Subscribe()` starts a new independent execution. Safe and predictable — use by default.\n\n**Hot**: multiple subscribers share a single execution. Use when the source is expensive (WebSocket, DB poll) or subscribers must see the same events.\n\n| Convert with | Behavior |\n| --- | --- |\n| `Share()` | Cold → hot with reference counting. Last unsubscribe tears down |\n| `ShareReplay(n)` | Same as Share + buffers last N values for late subscribers |\n| `Connectable()` | Cold → hot, but waits for explicit `.Connect()` call |\n| Subjects | Natively hot — call `.Send()`, `.Error()`, `.Complete()` directly |\n\n| Subject | Constructor | Replay behavior |\n| --- | --- | --- |\n| `PublishSubject` | `NewPublishSubject[T]()` | None — late subscribers miss past events |\n| `BehaviorSubject` | `NewBehaviorSubject[T](initial)` | Replays last value to new subscribers |\n| `ReplaySubject` | `NewReplaySubject[T](bufferSize)` | Replays last N values |\n| `AsyncSubject` | `NewAsyncSubject[T]()` | Emits only last value, only on complete |\n| `UnicastSubject` | `NewUnicastSubject[T](bufferSize)` | Single subscriber only |\n\nFor subject details and hot observable patterns, see [Subjects Guide](.\u002Freferences\u002Fsubjects-guide.md).\n\n## Operator Quick Reference\n\n| Category | Key operators | Purpose |\n| --- | --- | --- |\n| Creation | `Just`, `FromSlice`, `FromChannel`, `Range`, `Interval`, `Defer`, `Future` | Create observables from various sources |\n| Transform | `Map`, `MapErr`, `FlatMap`, `Scan`, `Reduce`, `GroupBy` | Transform or accumulate stream values |\n| Filter | `Filter`, `Take`, `TakeLast`, `Skip`, `Distinct`, `Find`, `First`, `Last` | Selectively emit values |\n| Combine | `Merge`, `Concat`, `Zip2`–`Zip6`, `CombineLatest2`–`CombineLatest5`, `Race` | Merge multiple observables |\n| Error | `Catch`, `OnErrorReturn`, `OnErrorResumeNextWith`, `Retry`, `RetryWithConfig` | Recover from errors |\n| Timing | `Delay`, `DelayEach`, `Timeout`, `ThrottleTime`, `SampleTime`, `BufferWithTime` | Control emission timing |\n| Side effect | `Tap`\u002F`Do`, `TapOnNext`, `TapOnError`, `TapOnComplete` | Observe without altering stream |\n| Terminal | `Collect`, `ToSlice`, `ToChannel`, `ToMap` | Consume stream into Go types |\n\nUse typed `Pipe2`, `Pipe3` ... `Pipe25` for compile-time type safety across operator chains. The untyped `Pipe` uses `any` and loses type checking.\n\nFor the complete operator catalog (150+ operators with signatures), see [Operators Guide](.\u002Freferences\u002Foperators-guide.md).\n\n## Common Mistakes\n\n| Mistake | Why it fails | Fix |\n| --- | --- | --- |\n| Using `ro.OnNext()` without error handler | Errors are silently dropped — bugs hide in production | Use `ro.NewObserver(onNext, onError, onComplete)` with all 3 callbacks |\n| Using untyped `Pipe()` instead of `Pipe2`\u002F`Pipe3` | Loses compile-time type safety, errors surface at runtime | Use `Pipe2`, `Pipe3`...`Pipe25` for typed operator chains |\n| Forgetting `.Unsubscribe()` on infinite streams | Goroutine leak — the observable runs forever | Use `TakeUntil(signal)`, context cancellation, or explicit `Unsubscribe()` |\n| Using `Share()` when cold is sufficient | Unnecessary complexity, harder to reason about lifecycle | Use hot observables only when multiple consumers need the same stream |\n| Using `samber\u002Fro` for finite slice transforms | Stream overhead (goroutines, subscriptions) for a synchronous operation | Use `samber\u002Flo` — it's simpler, faster, and purpose-built for slices |\n| Not propagating context for cancellation | Streams ignore shutdown signals, causing resource leaks on termination | Chain `ContextWithTimeout` or `ThrowOnContextCancel` in the pipeline |\n\n## Best Practices\n\n1. **Always handle all three events** — use `NewObserver(onNext, onError, onComplete)`, not just `OnNext`. Unhandled errors cause silent data loss\n2. **Use `Collect()` for synchronous consumption** — when the stream is finite and you need `[]T`, `Collect` blocks until complete and returns the slice + error\n3. **Prefer typed Pipe functions** — `Pipe2`, `Pipe3`...`Pipe25` catch type mismatches at compile time. Reserve untyped `Pipe` for dynamic operator chains\n4. **Bound infinite streams** — use `Take(n)`, `TakeUntil(signal)`, `Timeout(d)`, or context cancellation. Unbounded streams leak goroutines\n5. **Use `Tap`\u002F`Do` for observability** — log, trace, or meter emissions without altering the stream. Chain `TapOnError` for error monitoring\n6. **Prefer `samber\u002Flo` for simple transforms** — if the data is a finite slice and you need Map\u002FFilter\u002FReduce, use `lo`. Reach for `ro` when data arrives over time, from multiple sources, or needs retry\u002Ftimeout\u002Fbackpressure\n\n## Plugin Ecosystem\n\n40+ plugins extend ro with domain-specific operators:\n\n| Category | Plugins | Import path prefix |\n| --- | --- | --- |\n| Encoding | JSON, CSV, Base64, Gob | `plugins\u002Fencoding\u002F...` |\n| Network | HTTP, I\u002FO, FSNotify | `plugins\u002Fhttp`, `plugins\u002Fio`, `plugins\u002Ffsnotify` |\n| Scheduling | Cron, ICS | `plugins\u002Fcron`, `plugins\u002Fics` |\n| Observability | Zap, Slog, Zerolog, Logrus, Sentry, Oops | `plugins\u002Fobservability\u002F...`, `plugins\u002Fsamber\u002Foops` |\n| Rate limiting | Native, Ulule | `plugins\u002Fratelimit\u002F...` |\n| Data | Bytes, Strings, Sort, Strconv, Regexp, Template | `plugins\u002Fbytes`, `plugins\u002Fstrings`, etc. |\n| System | Process, Signal | `plugins\u002Fproc`, `plugins\u002Fsignal` |\n\nFor the full plugin catalog with import paths and usage examples, see [Plugin Ecosystem](.\u002Freferences\u002Fplugin-ecosystem.md).\n\nFor real-world reactive patterns (retry+timeout, WebSocket fan-out, graceful shutdown, stream combination), see [Patterns](.\u002Freferences\u002Fpatterns.md).\n\nIf you encounter a bug or unexpected behavior in samber\u002Fro, open an issue at [github.com\u002Fsamber\u002Fro\u002Fissues](https:\u002F\u002Fgithub.com\u002Fsamber\u002Fro\u002Fissues).\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-samber-lo` skill for finite slice transforms (Map, Filter, Reduce, GroupBy) — use lo when data is already in a slice\n- → See `samber\u002Fcc-skills-golang@golang-samber-mo` skill for monadic types (Option, Result, Either) that compose with ro pipelines\n- → See `samber\u002Fcc-skills-golang@golang-samber-hot` skill for in-memory caching (also available as an ro plugin)\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for goroutine\u002Fchannel patterns when reactive streams are overkill\n- → See `samber\u002Fcc-skills-golang@golang-observability` skill for monitoring reactive pipelines in production\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":35,"compatibility":36,"user-invocable":37},{"author":25,"version":26,"openclaw":27},"samber","1.1.3",{"emoji":28,"install":29,"homepage":30,"requires":31,"skill-library-version":34},"👁",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":32},[33],"go","0.3.0","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent mcp__context7__resolve-library-id mcp__context7__query-docs AskUserQuestion Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*","Designed for Claude Code or similar AI coding agents, and for projects using Golang.",true,"main","a93764baed707eda5a68d91e19e5719368e6335e","skills-backup\u002Fskills\u002Fgolang-samber-ro",0,"https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation","https:\u002F\u002Fgithub.com\u002FCCH-HQ","https:\u002F\u002Fclaude-code-hub.app\u002F","2026-11-09 20:50:54",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":37},[48,51,54],{"tool":49,"command":50},"npx","npx skills add CCH-HQ\u002Fcchp-automation --skill golang-samber-ro",{"tool":52,"command":53},"bunx","bunx skills add CCH-HQ\u002Fcchp-automation --skill golang-samber-ro",{"tool":55,"command":56},"pnpm","pnpm dlx skills add CCH-HQ\u002Fcchp-automation --skill golang-samber-ro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002FSKILL.md",[59,65,69,73,77],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"evals\u002Fevals.json","REFERENCE","参考文档",17758,"https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002Fevals\u002Fevals.json",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Foperators-guide.md",14184,"https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002Freferences\u002Foperators-guide.md",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fpatterns.md",7430,"https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002Freferences\u002Fpatterns.md",{"path":74,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fplugin-ecosystem.md",5974,"https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002Freferences\u002Fplugin-ecosystem.md",{"path":78,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fsubjects-guide.md",5836,"https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fgolang-samber-ro\u002Freferences\u002Fsubjects-guide.md",[82,89,96,103,110,117],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M79B44RKSB6Z0GENGYFCCZYA","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M79B410BHDSNHZ7MKAYXWJHS","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M79B3XK29MCD5HGD50YGYXQZ","wizard","Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fwizard\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M79B3TFQEXXM2KK5V44H64DV","wayfinder","Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M79B3Q3WTMJDM6NNGG1X4NYK","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M79B3GW8YCKT7W489HKWFMNC","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002FCCH-HQ\u002Fcchp-automation\u002Fblob\u002Fmain\u002Fskills-backup\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[]]