golang-samber-ro
CLAWHUB · Unverified
Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot 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/ro, when the codebase imports github.com/samber/ro, or when building asynchronous event-driven pipelines, real-time data processing, streams, or reactive architectures in Go. Not for finite slice transforms (→ See `samber/cc-skills-golang@golang-samber-lo` skill). Skill: golang-samber-ro Owner: samber Summary: Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot 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
- 62
- Rank
- 84
- Safety
- 1.3k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 10, 2026
- Adoption signal
- 1.3K downloadsadoption · Oct 10, 2026
- Latest release
- 1.2.0release · Aug 22, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 1.2.0release
golang-samber-ro 1.2.0 - Added direct integration guidance for Go users: now explicitly refers users to complementary skills (`golang-pkg-go-dev` for Go package documentation and `golang-gopls` for code navigation). - Expanded `allowed-tools` to support `godig`, `gopls`, LSP, and related toolchains for richer Go package and code navigation support. - Updated compatibility metadata (now mentions Codex and clarifies usage context). - Removed the redundant `skill-card.md` file.
Observed Aug 22, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s173arkhs3131fq5jf769qq75583hdgt:golang-samber-ro- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-samber-ro/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
145,043 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: golang-samber-ro
description: "Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot 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/ro, when the codebase imports github.com/samber/ro, or when building asynchronous event-driven pipelines, real-time data processing, streams, or reactive architectures in Go. Not for finite slice transforms (→ See `samber/cc-skills-golang@golang-samber-lo` skill)."
user-invocable: true
license: MIT
compatibility: Designed for Claude Code, Codex or similar harness, and for projects using Golang.
metadata:
author: samber
version: "1.2.0"
openclaw:
emoji: "👁"
homepage: https://github.com/samber/cc-skills-golang
requires:
bins:
- go
install: []
skill-library-version: "0.3.0"
allowed-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__*
paths:
- "**/*.go"
---
**Persona:** You are a Go engineer who reaches for reactive streams when data flows asynchronously or infinitely. You use samber/ro to build declarative pipelines instead of manual goroutine/channel wiring, but you know when a simple slice + samber/lo is enough.
**Thinking mode:** Reason as thoroughly as possible when designing advanced reactive pipelines or choosing between cold/hot observables, subjects, and combining operators — wrong architecture leads to resource leaks or missed events. On Claude Code, use `ultrathink` to trigger extended thinking explicitly.
# samber/ro — Reactive Streams for Go
Go implementation of [ReactiveX](https://reactivex.io/). 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.
**Official Resources:**
- [github.com/samber/ro](https://github.com/samber/ro)
- [ro.samber.dev](https://ro.samber.dev)
- [pkg.go.dev/github.com/samber/ro](https://pkg.go.dev/github.com/samber/ro)
This 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/cc-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/cc-skills-golang@golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.
## Why samber/ro (Streams vs Slices)
Go channels + goroutines become unwieldy for complex async_meta.json
{
"ownerId": "kn72rhnkwjfeex9wr1n7y24qa983cjn3",
"slug": "golang-samber-ro",
"version": "1.2.0",
"publishedAt": 1787437787319
}references/operators-guide.md
# Operators Guide
samber/ro provides 150+ operators organized by category. All operators are generic functions that take and return `Observable[T]`, designed for chaining via `Pipe`.
## Pipeline Construction
```go
// Typed pipes (Pipe1 through Pipe25) — compile-time type safety
result := ro.Pipe2(source, op1, op2)
result := ro.Pipe3(source, op1, op2, op3)
// Untyped pipe — uses any, loses type checking
result := ro.Pipe(source, op1, op2, op3)
// Reusable operator composition (curried)
transform := ro.PipeOp2(op1, op2) // returns func(Observable[A]) Observable[C]
result := transform(source)
// Synchronous collection
values, err := ro.Collect(observable)
```
## Creation Operators
Create observables from various sources. Typically the first argument to `Pipe`.
| Operator | Signature | Purpose |
| --- | --- | --- |
| `Just` | `Just[T](values ...T) Observable[T]` | Emit specific values then complete |
| `Of` | `Of[T](values ...T) Observable[T]` | Alias for Just |
| `FromSlice` | `FromSlice[T](items []T) Observable[T]` | Create from existing slice |
| `FromChannel` | `FromChannel[T](ch <-chan T) Observable[T]` | Wrap Go channel as observable |
| `Range` | `Range(start, end int) Observable[int]` | Emit integer sequence |
| `RangeWithStep` | `RangeWithStep(start, end, step int) Observable[int]` | Integer sequence with custom step |
| `RangeWithInterval` | `RangeWithInterval(start, end int, d time.Duration) Observable[int]` | Integers with delay between each |
| `RangeWithStepAndInterval` | `RangeWithStepAndInterval(start, end, step int, d time.Duration) Observable[int]` | Step + interval combined |
| `Interval` | `Interval(d time.Duration) Observable[int64]` | Emit sequential integers at intervals (infinite) |
| `IntervalWithInitial` | `IntervalWithInitial(initial, d time.Duration) Observable[int64]` | Interval with initial delay |
| `Timer` | `Timer(d time.Duration) Observable[int64]` | Single emission after delay |
| `Repeat` | `Repeat[T](item T, count int64) Observable[T]` | Repeat item N times |
| `RepeatWithInterval` | `RepeatWithInterval[T](item T, count int64, d time.Duration) Observable[T]` | Repeat with delay |
| `Defer` | `Defer[T](factory func() Observable[T]) Observable[T]` | Lazily create observable on subscription |
| `Future` | `Future[T](factory func() (T, error)) Observable[T]` | Single async value from function |
| `Start` | `Start(cb func() (any, error)) Observable[any]` | Execute callback and emit result |
| `Empty` | `Empty[T]() Observable[T]` | Complete immediately, no values |
| `Never` | `Never[T]() Observable[T]` | Never emit or complete |
| `Throw` | `Throw[T](err error) Observable[T]` | Immediately error |
```go
// Custom observable with direct control
obs := ro.NewObservable[int](func(ctx context.Context, observer ro.Observer[int]) error {
observer.Next(1)
observer.Next(2)
observer.Complete()
return nil
})
```
## Transformation Operators
Transform each value in the stream.
| Operator | Purpose |
| references/patterns.md
# Reactive Patterns
Real-world patterns for building production reactive pipelines with samber/ro.
## Pattern 1: Remote Call with Retry and Timeout
Wrap a remote call (HTTP, gRPC, database) with automatic retry, exponential backoff, timeout, and fallback.
```go
result := ro.Pipe3(
fetchUser(userID), // ro.Observable[User] — wraps your remote call
ro.Timeout[User](5*time.Second),
ro.RetryWithConfig[User](ro.RetryConfig{
Max: 3,
Delay: 500 * time.Millisecond,
BackoffMultiplier: 2.0,
MaxDelay: 5 * time.Second,
}),
ro.Catch[User](func(err error) ro.Observable[User] {
log.Printf("remote call failed after retries: %v, using cache", err)
return getCachedUser(userID)
}),
)
user, err := ro.Collect(result)
```
**Why ro over plain calls:** declarative retry + timeout + fallback in 10 lines vs manual for-loops with sleep, context, and error tracking.
## Pattern 2: Continuous Event Stream (Hot Observable)
Share a single long-lived connection (WebSocket, SSE, message queue) across multiple consumers.
```go
// Cold observable wrapping any event stream source
eventStream := ro.NewObservable[TickerEvent](func(ctx context.Context, obs ro.Observer[TickerEvent]) error {
// connect to your stream source (WebSocket, NATS, Kafka, etc.)
for {
event, err := streamSource.Read(ctx)
if err != nil {
return err
}
obs.Next(event)
}
})
// Share: one connection, multiple consumers
shared := ro.Pipe1(eventStream, ro.Share[TickerEvent]())
// Consumer 1: update UI
shared.Subscribe(ro.OnNext(func(e TickerEvent) {
updateDashboard(e)
}))
// Consumer 2: record metrics
shared.Subscribe(ro.OnNext(func(e TickerEvent) {
metrics.RecordTick(e.Symbol, e.Price)
}))
// Consumer 3: alert on threshold
ro.Pipe1(shared, ro.Filter(func(e TickerEvent) bool {
return e.Price > alertThreshold
})).Subscribe(ro.OnNext(sendAlert))
```
The `rohttp` plugin provides WebSocket and HTTP streaming observables (see [Plugin Ecosystem](./plugin-ecosystem.md)).
## Pattern 3: Fan-In from Multiple Sources
Merge events from multiple independent sources, batch, and process.
```go
combined := ro.Pipe2(
ro.Merge(
apiStream,
pushStream,
cronScheduleStream,
),
ro.Distinct[Event](),
ro.BufferWithTimeOrCount[Event](100, 5*time.Second),
ro.Map(func(batch []Event) ProcessResult {
return processBatch(batch)
}),
)
```
**When to use Merge vs Concat vs Zip:**
| Operator | Behavior | Use when |
| --- | --- | --- |
| `Merge` | Interleave: emit from any source as it arrives | Independent streams, order doesn't matter |
| `Concat` | Sequential: finish first source, then start second | Ordered processing, fallback chains |
| `Zip` | Pair: wait for one value from each source | Correlated data (user + settings, request + response) |
| `CombineLatest` | Latest: re-emit combined whenever any soreferences/plugin-ecosystem.md
# Plugin Ecosystem
samber/ro ships 40+ plugins that extend the core library with domain-specific operators. Plugins are separate Go modules — install only what you need.
```bash
go get github.com/samber/ro/plugins/<category>/<name>
```
## Data Manipulation
| Plugin | Import | Purpose |
| --- | --- | --- |
| Bytes | `plugins/bytes` | Byte slice operations on streams |
| Strings | `plugins/strings` | String transformations (split, trim, join) |
| Sort | `plugins/sort` | Sorting operators for ordered streams |
| Strconv | `plugins/strconv` | Type conversion (string <-> numeric) |
| Iter | `plugins/iter` | Go 1.23+ iterator interop |
| SIMD (experimental) | `plugins/exp/simd` | SIMD-accelerated numeric transforms |
## Encoding and Serialization
| Plugin | Import | Purpose |
| ------ | ------------------------- | -------------------------------- |
| JSON | `plugins/encoding/json` | Marshal/unmarshal JSON in stream |
| CSV | `plugins/encoding/csv` | Parse/generate CSV rows |
| Base64 | `plugins/encoding/base64` | Encode/decode Base64 |
| Gob | `plugins/encoding/gob` | Go binary encoding |
```go
import rojson "github.com/samber/ro/plugins/encoding/json"
// Parse JSON stream: []byte -> MyStruct
parsed := ro.Pipe1(rawBytes, rojson.Unmarshal[MyStruct]())
```
## Scheduling
| Plugin | Import | Purpose |
| ------ | -------------- | ------------------------------------- |
| Cron | `plugins/cron` | Emit on cron expressions or intervals |
| ICS | `plugins/ics` | Parse iCal files into event streams |
```go
import rocron "github.com/samber/ro/plugins/cron"
// Emit every day at midnight
daily := rocron.Schedule("0 0 * * *")
```
## Network and I/O
| Plugin | Import | Purpose |
| -------- | ------------------ | ---------------------------------------- |
| HTTP | `plugins/http` | HTTP request operators (GET, POST, etc.) |
| I/O | `plugins/io` | File and stream reading/writing |
| FSNotify | `plugins/fsnotify` | File system change events |
```go
import rofsnotify "github.com/samber/ro/plugins/fsnotify"
// Watch directory for changes
events := rofsnotify.Watch("/var/log/app/")
ro.Pipe1(events, ro.Filter(func(e fsnotify.Event) bool {
return e.Op == fsnotify.Write
})).Subscribe(ro.OnNext(func(e fsnotify.Event) {
log.Println("Modified:", e.Name)
}))
```
## Observability and Logging
| Plugin | Import | Purpose |
| ------- | ------------------------------- | ------------------------------- |
| Log | `plugins/observability/log` | stdlib `log` integration |
| Zap | `plugins/observability/zap` | Uber Zap structured logging |
| Logrus | `plugins/observability/logrus` | Logrus logging |
| Slog | `plugins/observability/slog` | GAionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-samber-golang-samber-ro. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about golang-samber-ro. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-samber-golang-samber-ro, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/samber/skills/golang-samber-ro",
"sourceUrl": "https://clawhub.ai/samber/skills/golang-samber-ro",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T19:22:15.675Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-samber-ro/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-samber-ro/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T19:22:15.675Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.3K downloads",
"href": "https://clawhub.ai/samber/golang-samber-ro",
"sourceUrl": "https://clawhub.ai/samber/golang-samber-ro",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T19:22:15.675Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.2.0",
"href": "https://clawhub.ai/samber/golang-samber-ro",
"sourceUrl": "https://clawhub.ai/samber/golang-samber-ro",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-22T22:29:47.319Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-samber-ro/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-samber-golang-samber-ro/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.2.0",
"description": "golang-samber-ro 1.2.0 - Added direct integration guidance for Go users: now explicitly refers users to complementary skills (`golang-pkg-go-dev` for Go package documentation and `golang-gopls` for code navigation). - Expanded `allowed-tools` to support `godig`, `gopls`, LSP, and related toolchains for richer Go package and code navigation support. - Updated compatibility metadata (now mentions Codex and clarifies usage context). - Removed the redundant `skill-card.md` file.",
"href": "https://clawhub.ai/samber/golang-samber-ro",
"sourceUrl": "https://clawhub.ai/samber/golang-samber-ro",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-22T22:29:47.319Z",
"isPublic": true
}
]
}Record generated Nov 25, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-samber-golang-samber-ro/run-check
