From golang-boost
Constructs portable pub/sub topics and subscriptions via gocloud.dev/pubsub, enabling provider swapping (GCP, Kafka, AWS SNS, mem) without code changes. Activated when boost factory pubsub imports or gocloud.dev questions appear.
How this skill is triggered — by the user, by Claude, or both
Slash command
/golang-boost:boost-factory-gocloud-pubsubThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**REQUIRED BACKGROUND:** `boost-start`, `boost-wrapper-config`.
REQUIRED BACKGROUND: boost-start, boost-wrapper-config.
factory/contrib/gocloud.dev/pubsub/v0/examples/pubsub/main.goimport gcppubsub "github.com/xgodev/boost/factory/contrib/gocloud.dev/pubsub/v0"
topic, err := gcppubsub.NewTopic(ctx)
if err != nil { log.Fatalf("topic: %v", err) }
defer topic.Shutdown(ctx)
sub, err := gcppubsub.NewSubscription(ctx)
defer sub.Shutdown(ctx)
Configure topic/subscription URLs (gcppubsub://..., kafka://..., awssns:///..., mempubsub://...) under boost.factory.gocloud.pubsub.* (override BOOST_FACTORY_GOCLOUD_PUBSUB_*).
| Reach for gocloud.dev | Reach for native (boost-factory-pubsub, boost-factory-kafka, ...) |
|---|---|
| Want to swap providers via URL config without code change | Committed to one provider; want full feature surface |
Tests use mempubsub:// for in-process fakes | Production-only path; tests run against real broker |
The native factories expose more provider-specific knobs. gocloud.dev exposes the lowest-common-denominator API.
| Red flag | Fix |
|---|---|
pubsub.OpenTopic(ctx, url) directly | gcppubsub.NewTopic(ctx) |
URL via os.Getenv | BOOST_FACTORY_GOCLOUD_PUBSUB_* |
Forgetting defer topic.Shutdown(ctx) | Add it |
npx claudepluginhub xgodev/boost --plugin golang-boostConstructs a Google Cloud Pub/Sub client in a Go service using the boost factory wrapper. Covers fpubsub.NewClient, lifecycle, and sharing the client between publisher and subscriber.
Implements publisher-subscriber communication with topic-based routing and fan-out delivery. Provides typed and wildcard pub/sub implementations.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.