From golang-boost
Guides contributors adding factory contribs, wrapper drivers, bootstrap adapters, Echo plugins, or fx modules to the boost Go framework. Covers layout conventions, constructor trios, config registration, and multi-service SDK rules.
How this skill is triggered — by the user, by Claude, or both
Slash command
/golang-boost:boost-maintainerThis 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-wrapper-config — config.Add semantics; new code registers its keys.boost-wrapper-log — logger access pattern in driver code.boost-model-errors — error verbs to mirror.| Adding | Path |
|---|---|
| Publisher driver | wrapper/publisher/driver/contrib/<vendor>/<lib>/v<major>/ |
| Cache driver | wrapper/cache/driver/contrib/<vendor>/<lib>/v<major>/ |
| Logger contrib | wrapper/log/contrib/<vendor>/<lib>/v<major>/ |
| Function adapter | bootstrap/function/adapter/contrib/<vendor>/<lib>/v<major>/ |
| Function middleware | bootstrap/function/middleware/<name>/ |
| Factory contrib | factory/contrib/<vendor>/<lib>/v<major>/ |
| Echo plugin | factory/contrib/labstack/echo/v4/plugins/{native,extra,local}/<name>/ |
| Fx module | fx/modules/<area>/<component>/ |
Package name = the short library name (pubsub, nats, confluent, goka, sns, redis), not the version directory leaf. Alias the upstream SDK at the import site if a name clash would occur:
import asns "github.com/aws/aws-sdk-go-v2/service/sns"
For wrapper/, bootstrap/, and extra/ — split per service:
wrapper/publisher/driver/contrib/aws/sns/v1/
wrapper/publisher/driver/contrib/aws/sqs/v1/
wrapper/cache/driver/contrib/aws/dynamodb/v1/
Do not nest under the SDK module dir (aws/aws-sdk-go-v2/v1/). The umbrella SDK layout (factory/contrib/aws/aws-sdk-go-v2/v1/client/<service>/) is exclusive to factory/contrib/ because factories ship clients that legitimately share an SDK version pin. Drivers don't.
func New(ctx context.Context, c *upstream.Client) (publisher.Driver, error)
func NewWithOptions(ctx context.Context, c *upstream.Client, opts *Options) publisher.Driver
func NewWithConfigPath(ctx context.Context, c *upstream.Client, path string) (publisher.Driver, error)
Every driver/adapter exposes the same trio so call sites are interchangeable.
// config.go
package <pkg>
import "github.com/xgodev/boost/wrapper/config"
const root = "boost.wrapper.publisher.driver.<name>"
func init() {
config.Add(root+".log.level", "INFO", "log level")
config.Add(root+".publishTimeout", "10s", "per-event publish timeout")
}
// ConfigAdd — exported so multi-instance consumers can register at a non-default path.
func ConfigAdd(path string) {
config.Add(path+".log.level", "INFO", "log level")
// mirror the rest with `path` instead of `root`
}
Multi-instance pattern: one binary publishes to multiple SNS topics / Pub/Sub projects / Kafka clusters by calling <driver>.ConfigAdd("boost.wrapper.publisher.driver.<name>.<instance>") per instance.
import (
"github.com/xgodev/boost/model/errors"
"github.com/xgodev/boost/wrapper/log"
)
logger := log.FromContext(ctx).WithTypeOf(*p)
return nil, errors.Wrap(err, errors.Internalf("publish failed"))
Match the verbs in the closest existing driver. boost is consistent enough that diverging stands out in review.
// TODO(maintainer-review):When the new driver has no direct precedent, mark every guess inline:
// TODO(maintainer-review): SNS requires a full ARN. Falling back to options.TopicArn
// when ev.Subject() is not an ARN. Verify this is the wanted behavior, or require
// Subject to always be an ARN.
return p.options.TopicArn
Then call out the marked decisions in the PR description so reviewers know where their judgment is needed.
bootstrap/ for a wrapper-layer concern (or vice versa). Layering is enforced by directory.Driver2 is a better Driver). Extend the existing one or open an RFC issue first.wrapper/config, wrapper/log, and fx modules.os.Setenv to inject config — use config.Add with explicit defaults.New(...). Return the interface.Close() method on the Driver interface itself unless ALL existing implementations need it. Optional close = separate optional interface + feature-detect.bootstrap/, factory/, wrapper/) — architectural change, not a contrib.boost-bootstrap-adapter-pubsub) — open an issue and propose a PR; don't unilaterally redesign the public API.go build ./...
go vet ./...
go test ./...
make v 2>/dev/null || go mod vendor # if you added a dep
<area>/<kind>/contrib/<vendor>/<lib>/v<major>/ (or per-service for multi-service SDKs).init() calls config.Add for every tunable; ConfigAdd(path) exported for multi-instance.model/errors; logger via wrapper/log.FromContext.// TODO(maintainer-review): and called out in the PR.npx claudepluginhub xgodev/boost --plugin golang-boostGuides the boost.Start() boot sequence for Go services using github.com/xgodev/boost: config registry loading, structured logger setup, and correct ordering in main.go.
Guides Go project layout decisions: CLI vs library vs service vs monorepo, module naming, architecture selection, and dependency injection. Activates when starting a new Go project or restructuring an existing codebase.
Guides Go code organization: package structure, naming conventions, project layout, imports, file splitting. Reviews PRs, audits, and refactors boundaries.