AI agent skills are reusable instruction sets that extend your coding assistant with domain-specific expertise, loaded on demand so they don't bloat your context. This repository covers Go-specific skills only (language, testing, security, observability, etc.); for dev workflow skills (git conventions, CI/CD, PR reviews) you'll want to add a separate skills plugin.
For generic skills, please visit cc-skills.
[!IMPORTANT] Bootstrapped with Claude Code by distilling my Go project commits. Edited, tested, reviewed and reworked by a human.
No AI slop here. AI-made skills are useless.
Install with skills CLI (universal, works with any Agent Skills-compatible tool):
npx skills add https://github.com/samber/cc-skills-golang --all
# or a single skill:
npx skills add https://github.com/samber/cc-skills-golang --skill golang-performanceClaude Code
/plugin marketplace add samber/cc
/plugin install cc-skills-golang@samberOpenclaw
Copy skills into the cross-client discovery directory:
git clone https://github.com/samber/cc-skills-golang.git ~/.openclaw/skills/cc-skills-golang
# or in workspace:
git clone https://github.com/samber/cc-skills-golang.git ~/.openclaw/workspace/skills/cc-skills-golangGemini CLI
gemini extensions install https://github.com/samber/cc-skills-golangUpdate with gemini extensions update cc-skills-golang.
Cursor
Copy skills into the cross-client discovery directory:
git clone https://github.com/samber/cc-skills-golang.git ~/.cursor/skills/cc-skills-golangCursor auto-discovers skills from .agents/skills/ and .cursor/skills/.
Copilot
Copy skills into the cross-client discovery directory:
/plugin install https://github.com/samber/cc-skills-golang
# or
git clone https://github.com/samber/cc-skills-golang.git ~/.copilot/skills/cc-skills-golangCopilot auto-discovers skills from .copilot/skills/.
OpenCode
Copy skills into the cross-client discovery directory:
git clone https://github.com/samber/cc-skills-golang.git ~/.agents/skills/cc-skills-golangOpenCode auto-discovers skills from .agents/skills/, .opencode/skills/, and .claude/skills/.
Codex (OpenAI)
Clone into the cross-client discovery path:
git clone https://github.com/samber/cc-skills-golang.git ~/.agents/skills/cc-skills-golangCodex auto-discovers skills from ~/.agents/skills/ and .agents/skills/. Update with cd ~/.agents/skills/cc-skills-golang && git pull.
Antigravity
Clone and symlink into the cross-client discovery path:
git clone https://github.com/samber/cc-skills-golang.git ~/.antigravity/skills/cc-skills-golangUpdate with cd ~/.antigravity/skills/cc-skills-golang && git pull.
These skills are designed as atomic, cross-referencing units. A skill may reference conventions defined in another (e.g. error-handling rules that affect logging live in golang-error-handling, not golang-observability). Installing only a subset will give you a partial and potentially inconsistent view of the guidelines. For best results, install all general-purpose skills together.
ββββββββββββββββββββββββββββββββββββββββββ
β Golang Skills β
ββββββββββββββββββββ¬ββββββββββββββββββββββ
β
βββββββββββββββββββ¬βββββββββββββββββββββββΌβββββββββββββββββββββββ
βΌ βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββ
β Code Quality β β Arch & Designβ β QA & Perf β β Project Start β
ββββββββββββββββ€ ββββββββββββββββ€ βββββββββββββββββββ€ ββββββββββββββββββββ€
β code-style β β design-patt β β testing β β project-layout β
β naming β β concurrency β β benchmark β β popular-libs β
β error-handl β β context β β performance β β cli β
β safety β β dep-inject β β troubleshoot β β CI β
β structs-ifaceβ β data-structs β β observability β β stay-updated β
β documentationβ β database β β β β dep-management β
β lint β β modernize β β β β β
β security β β β β β β β
ββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Framework / Library Skills β
ββββββββββββββββ¬βββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββ¬ββββββββββββ€
β APIs β DI β Frameworks β samber/* β Testing β
ββββββββββββββββΌβββββββββββββββββΌβββββββββββββββΌββββββββββββββΌββββββββββββ€
β grpc β google-wire β spf13-cobra β samber-lo β stretchr- β
β graphql β uber-dig β spf13-viper β samber-mo β testify β
β swagger β uber-fx β β samber-ro β β
β β β β samber-do β β
β β β β samber-hot β β
β β β β samber-slog β β
β β β β samber-oops β β
ββββββββββββββββ΄βββββββββββββββββ΄βββββββββββββββ΄ββββββββββββββ΄ββββββββββββ
- βοΈ Recommended
- β Published
- π· Work in progress
- β To-do
- β‘ Command available
- π§ Ultrathink automatically
- βοΈ Overridable (see doc below)
- Description (tok): weight of the
descriptionfield from YAML frontmatter, always loaded into Claude's context for skill triggering - SKILL.md (tok): weight of the full
SKILL.mdfile loaded when the skill triggers - Directory (tok): weight of all files in the skill directory (SKILL.md + referenced markdown files)
General purpose:
| Skill | Flags | Error rate gap | Description (tok) | SKILL.md (tok) | Directory (tok) | |
|---|---|---|---|---|---|---|
| βοΈ | β
golang-code-style |
β‘ βοΈ | -40% | 115 | 2,069 | 2,685 |
| βοΈ | β
golang-data-structures |
β‘ | -39% | 92 | 2,464 | 6,176 |
| βοΈ | β
golang-database |
β‘ βοΈ | -38% | 97 | 2,725 | 7,248 |
| βοΈ | β
golang-design-patterns |
β‘ βοΈ | -37% | 66 | 2,610 | 9,316 |
| βοΈ | β
golang-documentation |
β‘ βοΈ | -53% | 73 | 2,678 | 10,549 |
| βοΈ | β
golang-error-handling |
β‘ βοΈ | -26% | 139 | 1,520 | 4,394 |
| βοΈ | π· golang-how-to |
β | 0 | 0 | 0 | |
| βοΈ | β
golang-modernize |
β‘ | -61% | 68 | 2,476 | 7,599 |
| βοΈ | β
golang-naming |
β‘ βοΈ | -23% | 158 | 2,865 | 7,233 |
| βοΈ | β
golang-safety |
β‘ | -58% | 78 | 2,457 | 5,227 |
| βοΈ | β
golang-testing |
β‘ π§ βοΈ | -32% | 113 | 3,105 | 6,212 |
| βοΈ | β
golang-troubleshooting |
β‘ π§ | -32% | 126 | 2,735 | 15,901 |
| βοΈ | β
golang-security |
β‘ π§ | -32% | 84 | 2,873 | 20,894 |
β
golang-benchmark |
β‘ π§ | -50% | 99 | 2,135 | 29,248 | |
β
golang-cli |
β‘ | -43% | 122 | 2,274 | 6,089 | |
β
golang-concurrency |
β‘ βοΈ | -39% | 71 | 1,873 | 6,338 | |
β
golang-context |
β‘ βοΈ | -34% | 80 | 1,144 | 3,940 | |
β
golang-continuous-integration |
β‘ | -59% | 82 | 2,835 | 6,477 | |
β
golang-dependency-injection |
β‘ βοΈ | -47% | 176 | 2,842 | 5,113 | |
β
golang-dependency-management |
β‘ | -54% | 77 | 1,877 | 4,957 | |
β
golang-structs-interfaces |
β‘ βοΈ | -35% | 110 | 2,999 | 2,999 | |
β
golang-lint |
β‘ | -41% | 98 | 1,714 | 5,493 | |
β
golang-observability |
β‘ βοΈ | -37% | 161 | 2,921 | 18,453 | |
β
golang-performance |
β‘ π§ | -39% | 127 | 1,953 | 17,855 | |
β
golang-popular-libraries |
β‘ | -30% | 61 | 788 | 4,131 | |
β
golang-project-layout |
β‘ | -38% | 69 | 1,510 | 5,718 | |
β
golang-stay-updated |
β‘ | -56% | 43 | 1,916 | 1,916 |
Tools:
| Skill | Flags | Error rate gap | Description (tok) | SKILL.md (tok) | Directory (tok) |
|---|---|---|---|---|---|
β
golang-google-wire |
β‘ | -16% | 122 | 2,511 | 7,243 |
β
golang-graphql |
-16% | 76 | 2,935 | 7,766 | |
β
golang-grpc |
β‘ | -41% | 69 | 2,149 | 4,965 |
β
golang-spf13-cobra |
β‘ | β | 176 | 2,455 | 7,218 |
β
golang-spf13-viper |
β‘ | β | 170 | 2,412 | 6,936 |
β
golang-swagger |
β‘ | β | 144 | 2,125 | 3,123 |
β
golang-uber-dig |
β‘ | -10% | 107 | 2,264 | 5,904 |
β
golang-uber-fx |
β‘ | -5% | 118 | 2,499 | 6,747 |
β
golang-samber-do |
β‘ | -81% | 71 | 1,746 | 3,269 |
β
golang-samber-hot |
β‘ | -54% | 118 | 1,843 | 7,273 |
β
golang-samber-lo |
β‘ | -40% | 165 | 2,410 | 10,031 |
β
golang-samber-mo |
β‘ π§ | -48% | 81 | 2,800 | 11,215 |
β
golang-samber-oops |
β‘ | -59% | 69 | 2,380 | 2,692 |
β
golang-samber-ro |
β‘ π§ | -50% | 152 | 2,845 | 11,136 |
β
golang-samber-slog |
β‘ | -19% | 118 | 2,588 | 9,234 |
β golang-temporal |
β | 0 | 0 | 0 | |
β
golang-stretchr-testify |
β‘ | -47% | 90 | 1,714 | 2,533 |
| With Skill | Without Skill | Delta | |
|---|---|---|---|
| Overall | 3315/3395 (98%) | 1915/3395 (56%) | +41pp |
See EVALUATIONS.md for the full per-skill breakdown.
Go code formatting and conventions. gofmt, goimports, linting rules, comment conventions, and project-level style consistency. Overridable by company skills.
Go documentation standards. Package docs, godoc conventions, code comments, example functions, README structure, and API reference generation. Overridable.
Go error handling best practices. Error creation, wrapping with fmt.Errorf and errors.Is/As, sentinel errors, custom error types, error codes, and panic recovery. Overridable.
Go linting best practices and golangci-lint configuration. Presets, custom rules, CI integration, inline suppression, and output interpretation.
Go naming conventions across all identifier types. Packages, constructors, structs, interfaces, constants, errors, receivers, acronyms, test functions. Covers MixedCaps rules, Get-prefix, and utils/helpers anti-patterns. Overridable.
Defensive Go coding. Prevents panics, silent data corruption, and runtime bugs. nil safety, append aliasing, map concurrent access, float comparison, zero-value design, numeric overflow.
Go security best practices. Injection prevention (SQL, command, XSS), cryptography, filesystem/network safety, secrets management, cookie security, and tool configuration. Audit and review modes.
Go struct and interface design. Composition, embedding, type assertions, interface segregation, struct tags (JSON/YAML/DB), pointer vs value receivers. Overridable.
Go concurrency patterns. Goroutines, channels, sync primitives, context cancellation, worker pools, fan-out/fan-in, pipelines. Overridable.
Idiomatic context.Context usage. Creation, cancellation, timeouts, values, propagation patterns, and common anti-patterns. Overridable.
Go data structures internals and usage. Slices (capacity growth, append aliasing), maps, channels, sync primitives, and when to use each.
Go database access patterns. Parameter binding, connection pooling, transactions, migrations, sqlboiler/sqlc code generation, query builders. Overridable.
Dependency injection patterns in Go. Constructor injection, interface-based DI, wire/dig/fx comparison, and when DI is worth the complexity. Overridable.
Idiomatic Go design patterns. Functional options, constructors, builder pattern, middleware chains, circuit breaker, and architecture guides with file trees and code. Overridable.
Modernize Go code to use recent language features. Range-over-int, min/max builtins, iterators, slices/maps/cmp/slog stdlib packages, testing patterns (t.Context, b.Loop, synctest), and tooling upgrades.
Go benchmarking, profiling, and performance measurement. pprof, trace, CPU/memory/block profiles, flame graphs, benchmark comparison (benchstat), continuous profiling.
Go production observability. Structured logging (slog), Prometheus metrics, OpenTelemetry tracing, pprof profiling, RUM tracking, alerting, Grafana dashboards. Overridable.
Go performance optimization. Allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, hot-path optimization. Review and hot-path modes.
Production-ready Go tests. Table-driven tests, fuzzing, fixtures, goroutine leak detection (goleak), snapshot testing, code coverage, integration tests, parallel tests. Overridable.
Systematic Go debugging methodology. Common pitfalls, test-driven debugging, pprof capture, Delve debugger, race detection, GODEBUG tracing, production debugging.
Go CLI application development. Project layout, exit codes, signal handling, I/O patterns, argument parsing, and terminal UX.
CI/CD pipeline configuration for Go projects using GitHub Actions. Build, test, lint, and release workflows.
Go module dependency strategies. go.mod conventions, versioning, replace directives, tool dependencies, and multi-module workspaces.
Curated recommendations for production-ready Go libraries and frameworks. When the stdlib is enough vs when to reach for a package.
Go project structure and workspace setup. cmd/internal/pkg conventions, monorepo layout, CLI project structure, and when to keep things flat.
Resources to stay current with Go. Official channels, community hubs, key people to follow, and learning resources.
GraphQL API development in Go using gqlgen/graphql-go. Schema definition, resolvers, subscriptions, dataloader, and federation.
gRPC in Go. Protobuf organization, service definitions, streaming, interceptors, error codes, and code generation workflow.
OpenAPI/Swagger docs with swaggo/swag. Annotation comments, code generation, framework integrations (gin, echo, fiber, chi), security definitions.
Compile-time dependency injection with google/wire. Provider sets, injector generation, wire.Build, and structured DI patterns.
Reflection-based DI with uber-go/dig. Provide/Invoke, dig.In/dig.Out, named values, value groups, optional dependencies, and Decorate.
Application framework with uber-go/fx. fx.New, fx.Provide/Invoke, fx.Module, lifecycle hooks, fx.Annotate, fx.Decorate, signal-aware Run.
CLI command trees with spf13/cobra. Command hierarchy, RunE hooks, flag management, shell completion, usage templates, and testing with SetArgs.
Layered configuration with spf13/viper. Flag > env > file > KV > default precedence, BindPFlag, hot reload, test isolation, and remote KV integration.
Dependency injection with samber/do. Type-safe service containers, lifecycle management, scopes, health checks, and graceful shutdown.
In-memory caching with samber/hot. 9 eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, SIEVE...), TTL, loaders, sharding, stale-while-revalidate, Prometheus metrics.
Functional programming helpers with samber/lo. 500+ type-safe generic functions for slices, maps, channels, strings. Immutable (lo), parallel (lop), mutable (lom), iterators (loi), SIMD.
Monadic types with samber/mo. Option, Result, Either, Future, IO, Task, State for type-safe nullable values, error handling, and functional composition.
Structured error handling with samber/oops. Error builders, stack traces, error codes, context attributes, public vs developer messages, panic recovery, and APM integration.
Reactive streams with samber/ro. 150+ type-safe operators, cold/hot observables, 5 subject types, 40+ plugins, automatic backpressure, and Go context integration.
Structured logging pipeline with samber/slog-**** packages. Multi-handler routing (slog-multi), sampling, formatting, HTTP middleware, and 20+ backend sinks.
Testing with stretchr/testify. assert, require, mock, and suite packages. Assertions, mock expectations, argument matchers, suite lifecycle, and custom matchers.
Add AI agents as PR reviewers alongside traditional static analysis. When configured with this skill plugin, the agent applies the relevant Go skills per review area β catching architectural drift, logic bugs, and concurrency hazards that linters cannot detect.
See GOLANG-AI-DRIVEN-REVIEW.md for full setup instructions (Claude Code Action and GitHub Copilot).
If a skill triggers too often or not often enough, please open an issue suggesting a description change. The description field in SKILL.md frontmatter is the primary triggering mechanism β small wording adjustments can significantly improve trigger accuracy. Some SKILL.md files might have a When to use section which is another level of exclusion. Finally, SKILL.md files are an entrypoint for lazy loading references with deep knowledge located in references/.
Claude reports very little overlap between skills in this repo, thanks to cross-reference. I suggest enabling most of the skills and leveraging lazy loading. The recommended βοΈ skills load ~1,100 tokens of descriptions at startup; full skill content is only pulled in when relevant. Note:
- I estimate that 50% of
golang-namingandgolang-code-styleoverlap with linters (golangci-lint). - A large part of the security rules in
golang-securityhave been distilled from the Bearer (SAST) checklist. The skill is still useful for methodology. - If your team has its own conventions, create a company skill and declare the override explicitly near the top of its body:
This skill supersedes samber/cc-skills-golang@golang-naming skill for [company] projects.Skills marked βοΈ in the table above support this mechanism.
- 100 tokens per skill description - what? when to use this skill?
- 1.000β2.500 tokens per SKILL.md β keep the main file focused on essentials
- Use secondary markdown files for depth β reference them from SKILL.md with relative links (e.g.,
[Logging](./logging.md)). Claude reads these on demand when the topic is relevant, so they don't count against the context budget until needed - Up to 10.000 tokens for full skill and secondary files
- 2β4 skills loaded simultaneously in a typical session β design skills to coexist
- Stay below ~10k tokens of total loaded SKILL.md anytime to avoid degrading response quality
For more guidelines, please check CLAUDE.md.
- βοΈ Star this repo - Your star powers the caffeine engine!
- βοΈ Buy me a coffee - I'll literally use it to build more skills while drinking actual coffee
Copyright Β© 2026 Samuel Berthe.
This project is under MIT license.