Golang Agent Skills: Go Skills for AI Coding Assistants
Golang Agent Skills is samber's collection of Go-specific instruction files, covering code style, concurrency, testing, and samber's own libraries like lo and do, that load into Claude Code, Cursor, Copilot, or Gemini CLI on demand. Reach for it if you already run one of those assistants on a Go codebase and want fewer generic, Python-flavored suggestions. Skip it if your stack isn't Go or your assistant doesn't support Agent Skills yet.
Understanding Golang Agent Skills
Golang Agent Skills is a repository of standalone Markdown instruction files, each covering one Go topic, such as naming conventions, error wrapping, goroutine patterns, gRPC, or a specific samber library, that an AI coding assistant loads only when the topic comes up, per the README's on-demand model. Each skill pairs a short frontmatter description used for triggering with a longer SKILL.md that carries the actual guidance.
Categories of Go Development Skills
- ✓Code Quality group: golang-code-style, golang-naming, golang-error-handling, golang-safety, golang-structs-interfaces, golang-documentation, golang-lint, and golang-security cover formatting, MixedCaps naming, error wrapping with fmt.Errorf and errors.Is/As, and injection prevention.
- ✓Architecture & Design group: golang-concurrency, golang-context, golang-dependency-injection, golang-data-structures, golang-database, golang-design-patterns, golang-modernize, and golang-refactoring handle goroutines/channels, context.Context propagation, and gopls-driven refactors.
- ✓QA & Performance group: golang-testing, golang-benchmark, golang-performance, golang-troubleshooting, and golang-observability bring table-driven tests, pprof profiling, and slog/Prometheus/OpenTelemetry wiring.
- ✓Project Setup group: golang-project-layout, golang-cli, golang-continuous-integration, golang-dependency-management, golang-gopls, golang-pkg-go-dev, golang-popular-libraries, and golang-stay-updated cover repo layout, GitHub Actions pipelines, and go.mod conventions.
- ✓Framework skills for gRPC, GraphQL (gqlgen/graphql-go), Swagger (swaggo/swag), spf13/cobra, and spf13/viper.
- ✓DI-framework skills split three ways: google/wire (compile-time), uber-go/dig (reflection-based), and uber-go/fx (application framework with lifecycle hooks).
- ✓Seven samber/* library skills, do, hot, lo, mo, oops, ro, slog, document samber's own DI container, a 9-algorithm cache (samber-hot), 500+ generic helpers (samber-lo), and a 150+ operator reactive-stream library (samber-ro).
- ✓golang-stretchr-testify covers assert/require/mock/suite patterns for the testify library.
Adding Skills to Your AI Assistant
Installation depends on which assistant you use. The universal path is the skills CLI: `npx skills add https://github.com/samber/cc-skills-golang --all` (or `--skill golang-performance` for a single skill), which the README says works with any Agent Skills-compatible tool. Claude Code users instead run `/plugin marketplace add samber/cc` followed by `/plugin install cc-skills-golang@samber`. Gemini CLI uses `gemini extensions install https://github.com/samber/cc-skills-golang` (update with `gemini extensions update cc-skills-golang`). Cursor, Copilot, OpenCode, Codex, Openclaw, and Antigravity all follow the same pattern: `git clone` the repo into a client-specific discovery directory such as `~/.cursor/skills/cc-skills-golang` or `~/.agents/skills/cc-skills-golang`, since those tools auto-discover skills from fixed paths like `.agents/skills/` or `.cursor/skills/`.
Leveraging Go Skills in Your Workflow
Once installed, a skill stays dormant until its trigger fires. Each skill's frontmatter description field, as light as 44 tokens for golang-stay-updated and as heavy as 246 tokens for golang-refactoring, is always loaded so the assistant can judge relevance; the full SKILL.md (1,044 to 4,234 tokens per the README's table) and any referenced files under references/ only load when the topic actually comes up in your prompt or diff. The README recommends installing all general-purpose skills together rather than a subset, since some cross-reference each other, error-handling rules that touch logging live in golang-error-handling, not golang-observability, for example. If a skill fires too often or too rarely, the fix is opening an issue proposing a wording change to its description field, which the README calls the primary trigger mechanism.
AI-Driven Code Reviews for Go
- •Wiring the skill plugin into CI so an AI agent reviews PRs alongside golangci-lint, per the repo's GOLANG-AI-DRIVEN-REVIEW.md guide for Claude Code Action and GitHub Copilot.
- •Catching goroutine and channel misuse during a diff review that a linter wouldn't flag, since golang-concurrency and golang-safety encode patterns like concurrent map access and append aliasing.
- •Refactoring an existing codebase with golang-refactoring's staged-PR workflow: gopls Rename/Inline/Extract plus gofmt -r and gopatch, run behind a coverage-adaptive safety net.
- •Bootstrapping a new Go service with golang-project-layout and golang-popular-libraries so the assistant suggests stdlib-first choices instead of reaching for a random package.
- •Wiring observability (slog, Prometheus, OpenTelemetry) or a specific samber library into new code without re-explaining its API in every prompt.
Advantages of Using These Go Skills
- ✓Human-edited, not raw AI output: the README states the skills were "Edited, tested, reviewed and reworked by a human" after being bootstrapped from the author's own Go project commits.
- ✓The repo's own evaluation table claims a jump from 1915/3395 (56%) correct to 3315/3395 (98%) when skills are enabled, a +41pp delta, though that's the maintainer's own benchmark, not an independent one.
- ✓On-demand loading keeps context small: only description fields (44 to 246 tokens each) load at startup, with full SKILL.md content pulled in only when a skill triggers.
- ✓Narrow scope by design, Go only, so you're not loading generic git/CI skills you don't need for language-specific work; the README points to a separate cc-skills repo for that.
- ✓Coverage goes past style into real trade-off calls: golang-dependency-injection compares wire/dig/fx, and golang-popular-libraries flags when the stdlib alone is enough.
Scope and Considerations
- △The evaluation numbers (98% vs 56%) come from the maintainer's own scoring, not a third-party audit; treat the +41pp delta as a claim to verify on your own codebase, not a guarantee.
- △Installing only a subset gives "a partial and potentially inconsistent view of the guidelines" by the README's own admission, since skills cross-reference each other.
- △One listed skill, golang-temporal, is marked to-do with 0 tokens in every column of the skills table, meaning it doesn't exist yet despite being listed.
- △It covers only the Go language and its ecosystem; the README says workflow skills like git conventions, CI/CD, or PR review process live in a separate, non-Go plugin.
- △Setup effort is uneven across clients: Claude Code and Gemini CLI get a one-line install command, while Cursor, Copilot, OpenCode, Codex, Openclaw, and Antigravity all require a manual git clone into a specific directory, with no update command shown beyond git pull.
Exploring Related Skill Collections
Frequently Asked Questions
Golang Agent Skills packages Go-specific conventions, naming, error handling, concurrency, testing, security, as separate Markdown files an AI coding assistant loads only when the topic is relevant, instead of stuffing all of it into one system prompt.
Golang Agent Skills covers only the Go language and its ecosystem, gofmt conventions, goroutines, samber's own libraries, while generic skill collections tend to cover cross-language workflow topics like git conventions or CI/CD, which this repo's README explicitly excludes and points elsewhere for.
The README says they were bootstrapped with Claude Code by distilling the author's own Go project commits, then "edited, tested, reviewed and reworked by a human"; the maintainer states plainly that AI-made skills without that human pass aren't published here.
The README documents install paths for Claude Code, Openclaw, Gemini CLI, Cursor, Copilot, OpenCode, Codex, and Antigravity, plus a universal option through the skills CLI that works with any Agent Skills-compatible tool.
Golang Agent Skills supports single-skill installs via `npx skills add https://github.com/samber/cc-skills-golang --skill golang-performance`, though the README recommends installing all general-purpose skills together since several cross-reference each other.
Golang Agent Skills is released under the MIT license, per the repo's license metadata.
The problem it solves
A generic AI coding assistant applies the same suggestions to Go as it would to Python or JavaScript: flat error handling instead of wrapping with fmt.Errorf and errors.Is/As, no nil-safety or append-aliasing checks, no opinion on wire vs dig vs fx for dependency injection. Golang Agent Skills exists to give the assistant Go's own idioms plus the author's opinions on samber's libraries (lo, do, mo, oops, ro, hot, slog) without you re-typing that context in every session.
Who should try it — and who should skip
Try it if your team writes Go and already runs Claude Code, Cursor, Copilot, Gemini CLI, OpenCode, Codex, Openclaw, or Antigravity for day-to-day coding; installing the recommended general-purpose skills together gets you consistent conventions across error handling, testing, and concurrency without re-explaining them in every prompt. Skip it if you're not on an Agent Skills-compatible assistant yet, if your team's pain points are workflow (git conventions, PR review process, CI/CD) rather than Go language conventions, since those live in the separate cc-skills repo per the README, or if you'd rather write your own house style guide than adopt someone else's opinions on naming and error wrapping wholesale.
