From golang-boost
Constructs 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/golang-boost:boost-factory-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:**
REQUIRED BACKGROUND:
boost-start — boost.Start() first.boost-wrapper-config — project ID is read from config, not os.Getenv.import fpubsub "github.com/xgodev/boost/factory/contrib/cloud.google.com/pubsub/v1"
pb, err := fpubsub.NewClient(ctx)
if err != nil { log.Fatalf("pubsub client: %v", err) }
defer pb.Close()
The client reads its project ID and connection options from boost config (boost.factory.gcp.pubsub.apiOptions.projectId and friends). Override at deploy via BOOST_FACTORY_GCP_PUBSUB_APIOPTIONS_PROJECTID=....
The same *pubsub.Client typically feeds both:
boost-wrapper-publisher)boost-bootstrap-adapter-pubsub)Construct once, share, and defer pb.Close() so the gRPC connection drains on shutdown.
| Red flag | Fix |
|---|---|
pubsub.NewClient(ctx, projectID) directly from the upstream SDK | Use fpubsub.NewClient(ctx) so config + observability instrumentation are wired |
Reading GOOGLE_CLOUD_PROJECT via os.Getenv | Use BOOST_FACTORY_GCP_PUBSUB_APIOPTIONS_PROJECTID (or override the koanf key) |
Forgetting defer pb.Close() | Add it — graceful gRPC shutdown |
| Constructing two clients (one for publish, one for subscribe) | Construct one, share it |
npx claudepluginhub xgodev/boost --plugin golang-boostConstructs 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.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.