No slash command · from fuse-go
Guides idiomatic sequential Go 1.27: error wrapping with %w, errors.Join/Is/As, slog structured logging, generics, consumer-side interfaces, and go fix modernizers. Excludes concurrency (see go-concurrency).
Ships in fuse-go. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Idiomatic sequential Go for 1.27. For anything touching goroutines, channels,
errgroup, or context cancellation, use go-concurrency instead.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
| Feature | Description |
|---|---|
| Error handling | Explicit if err != nil, %w wrapping, errors.Join, errors.AsType (1.26) |
| Structured logging | log/slog stdlib — handlers, attrs, groups, LogValuer |
| Generics | Type params, constraints, self-referential types (1.26), generic methods (1.27) |
| Interfaces | Small, consumer-side — "accept interfaces, return structs" |
| Modernizers | go fix auto-applies dozens of idiom/API fixers (1.26; more added in 1.27) |
if err != nil - No sugar exists; never discard with _ = err%w, not %v - Preserves the chain for errors.Is/As/AsTypego fix + go vet - Let modernizers migrate to current idioms (1.26+)internal/
├── user/
│ ├── user.go # struct + value-receiver methods
│ ├── errors.go # sentinel + typed errors
│ └── repository.go # consumer-side interface, concrete struct returned
└── platform/
└── logging/
└── logger.go # slog setup, one *slog.Logger injected downward
→ See error-patterns.md for full example
| Topic | Reference | When to Consult |
|---|---|---|
| Error handling | error-handling.md | Wrapping, sentinels, errors.Join, AsType |
| Structured logging | slog-logging.md | Choosing handlers, attrs, groups, perf |
| Generics & 1.26–1.27 | generics-and-1.26.md | Type params, generic methods (1.27), self-ref types, new(expr) |
| Interfaces & style | interfaces-and-style.md | Interface placement, naming, receivers |
| Template | When to Use |
|---|---|
| error-patterns.md | Building an error strategy for a package |
| slog-setup.md | Wiring a structured logger into an app |
if err != nil {
return fmt.Errorf("load user %d: %w", id, err) // %w keeps the chain
}
// 1.26: type-safe, generic replacement for errors.As
if pathErr, ok := errors.AsType[*fs.PathError](err); ok {
log.Printf("failed path: %s", pathErr.Path)
}
→ See error-handling.md
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
logger.Info("user created", "id", id, slog.Duration("took", elapsed))
→ See slog-logging.md
%w; check with errors.Is/AsTypeslog.LogAttrs on hot paths to avoid allocationgo fix to adopt current APIs and idioms automatically (1.26+)_ = err) or return bare err when context helpsIFoo interface prefixesreferences/error-handling.md (opens in a new tab)references/generics-and-1.26.md (opens in a new tab)references/interfaces-and-style.md (opens in a new tab)references/slog-logging.md (opens in a new tab)references/templates/error-patterns.md (opens in a new tab)references/templates/slog-setup.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fusengine/claude-plugins --plugin fuse-go5 skills in this plugin
/go-architectureUse when laying out a new Go service, choosing an HTTP router or DB layer, or wiring dependencies. Not for concurrency (go-concurrency) or language idioms (go-core-idioms)./go-concurrencyUse when writing or reviewing Go concurrency — goroutines, channels, errgroup, context cancellation, or goroutine leaks. Not for sequential idioms (go-core-idioms)./go-testing-qualityUse when writing or reviewing Go tests, adding coverage, benchmarking, or profiling a Go program. Not for CI/lint wiring (go-tooling-security) or non-Go tests./go-tooling-securityUse when setting up Go modules/workspaces, configuring golangci-lint v2, running govulncheck, or building a Go CI quality gate. Not for app logic or non-Go audits.Other plugins' skills for the same job