From go-specialist
Manages Go tool dependencies using the tool directive (Go 1.24+). Detects codegen tools like sqlc, templ, buf, swag via indicator files and adds them to go.mod for reproducible builds.
How this skill is triggered — by the user, by Claude, or both
Slash command
/go-specialist:go-toolThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manage Go development tool dependencies using the `tool` directive introduced in Go 1.24. This ensures reproducible builds by tracking tool versions in `go.mod` — eliminating the old `tools.go` workaround and version drift across developers and CI.
Manage Go development tool dependencies using the tool directive introduced in Go 1.24. This ensures reproducible builds by tracking tool versions in go.mod — eliminating the old tools.go workaround and version drift across developers and CI.
For detailed per-tool information, see the reference catalog.
.templ, .proto, sqlc.yml, etc.)tools.go pattern to the native tool directiveBefore proceeding, verify:
go.mod in the project root. Abort if missing.go directive in go.mod. If the version is below 1.24, inform the user: "The Go tool directive requires Go 1.24+. Update the go directive in go.mod to 1.24 or later."Scan the project for indicator files and compare against existing tool declarations in go.mod.
Parse go.mod for the tool block to identify already-tracked tools.
Use Glob to detect files that suggest specific tools:
| Indicator | Tool | Module Path |
|---|---|---|
sqlc.yml / sqlc.yaml / sqlc.json | sqlc | github.com/sqlc-dev/sqlc/cmd/sqlc |
**/*.templ | templ | github.com/a-h/templ/cmd/templ |
**/*.proto + (buf.yaml or buf.gen.yaml) | buf | github.com/bufbuild/buf/cmd/buf |
swagger.yaml / swagger.json | swag | github.com/swaggo/swag/cmd/swag |
openapi.yaml / openapi.json | oapi-codegen | github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen |
**/*.css with @tailwind or @apply | gotailwindcss | github.com/gotailwindcss/tailwind/cmd/gotailwindcss |
//go:build wireinject in Go source | wire | github.com/google/wire/cmd/wire |
For stringer and enumer, detection requires context: const blocks with iota patterns. These are best suggested when the user is working with enum-like types. |
Present a table comparing detected recommendations against existing tools:
| Tool | Status | Reason |
|---|---|---|
| templ | Missing | .templ files found but tool not in go.mod |
| sqlc | Present | Already tracked in go.mod |
go get -tool <module-path>@latest
Replace @latest with a specific version if the user requests one.
go mod tidy
go tool <tool-name> --help
Confirm the tool runs without error.
Based on the tool, suggest the appropriate //go:generate directive. See the reference catalog for canonical directives per tool.
General pattern:
//go:generate go tool <name> <args>
Place the directive in the file closest to the generated output.
go get -tool <module-path>@none
go mod tidy
Search for and remove any //go:generate directives that reference the removed tool:
Grep for: //go:generate go tool <name>
Parse the tool (...) block from go.mod.
For each declared tool, search for //go:generate go tool <name> in Go source files.
| Tool | In go.mod | Has go:generate | Status |
|---|---|---|---|
| sqlc | Yes | Yes | OK |
| moq | Yes | No | Possibly unused |
| templ | No | Yes | Missing from go.mod |
go tool <name> in directives — not a direct binary path. This ensures the version pinned in go.mod is used.go generate ./...The go tool directive only supports tools written in Go. For non-Go tools (Node.js, Rust, Python), use alternative management:
Exception: For Tailwind CSS, use gotailwindcss — a pure Go implementation that works with go get -tool. See the reference catalog for details.
| Condition | Action |
|---|---|
No go.mod found | Abort: "Not a Go module — no go.mod found. Run go mod init first." |
| Go version < 1.24 | Abort: "Go tool directive requires Go 1.24+. Update the go directive in go.mod." |
go get -tool fails | Display error. Common causes: invalid module path, network issues, module not found. |
| Tool already in go.mod | Skip: "Tool already tracked in go.mod." Suggest verifying version if needed. |
go tool <name> fails after install | Check go mod tidy was run. Verify the module provides a binary at the expected path. |
npx claudepluginhub sgaunet/claude-plugins --plugin go-specialistManages Go modules and dependencies: initializes projects, edits go.mod/go.sum, handles versioning/conflicts, sets up workspaces, troubleshoots errors.
Manages Go project dependencies: go.mod, upgrades, vulnerability scanning, conflict resolution, go.work workspaces, and automated update setup with Dependabot/Renovate.
Master Go 1.21+ with advanced concurrency, performance optimization, and production-ready microservices. Useful for building Go services, CLIs, or microservices.