
samber / cc-skills-golang
★ 2,400A skill package that teaches your agent 43 capabilities — every one documented and browsable below, no GitHub required · by samber.
Each skill below is one capability this package teaches your agent. Install the whole package, or open a skill to install just that one.
Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or investigating production performance with Prometheus runtime metrics. Also use when the developer needs deep analysis on a specific performance indicator - this skill provides the measurement methodology, while...
12 files — installable on its own
Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI unit testing. Also triggers when code uses cobra, viper, or urfave/cli. For cobra-specific APIs → See `samber/cc-skills-golang@golang-spf13-cobra` skill; for viper configuration layering → See...
17 files — installable on its own
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber/cc-skills-golang@golang-naming` skill), linter configuration (→ See `samber/cc-skills-golang@golang-lint` skill), or doc comments (→ See `samber/cc-skills-golang@golang-documentation` skill).
5 files — installable on its own
Golang concurrency patterns. Use when writing or reviewing concurrent Go code involving goroutines, channels, select, locks, sync primitives, errgroup, singleflight, worker pools, or fan-out/fan-in pipelines. Also triggers when you detect goroutine leaks, race conditions, channel ownership issues, or need to choose between channels and mutexes.
7 files — installable on its own
Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or unexpired contexts, choosing between context.Background/TODO/WithoutCancel, or storing values in context. Not for code that merely accepts ctx as first parameter.
7 files — installable on its own
CI/CD pipeline configuration using GitHub Actions for Golang projects — testing, linting, SAST, security scanning, code coverage, Dependabot, Renovate, GoReleaser, code review automation, and release pipelines. Use when setting up or improving Go project CI, configuring GitHub Actions workflows, adding linters or security scanners, automating dependency updates, or adding quality gates.
22 files — installable on its own
Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container/list/heap/ring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container/ packages, unsafe or weak pointers, or questioning slice/map internals.
9 files — installable on its own
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use when writing, reviewing, or debugging Golang code that interacts with PostgreSQL, MariaDB, MySQL, or SQLite; for database testing; or for questions about database/sql, sqlx, or pgx. Does NOT generate database schemas or migration SQL.
8 files — installable on its own
Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google/wire, uber-go/dig, uber-go/fx, samber/do). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service...
8 files — installable on its own
Dependency management strategies for Golang projects — go.mod management, installing/upgrading packages, Minimal Version Selection, vulnerability scanning, outdated dependency tracking, binary size analysis, Dependabot/Renovate setup, conflict resolution, and go.work workspaces. Use when adding, removing, or upgrading Go dependencies, auditing vulnerabilities, resolving version conflicts, or setting up automated dependency updates.
10 files — installable on its own
Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, streaming, and more. Apply when explicitly choosing between architectural patterns, implementing functional options, designing constructor APIs, setting up graceful shutdown, applying resilience patterns, or asking which idiomatic Go pattern fits a specific problem.
10 files — installable on its own
Comprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example tests, API docs, and llms.txt. Use when writing or reviewing doc comments, documentation, adding code examples, setting up doc sites, or discussing documentation best practices. Triggers for both libraries and applications/CLIs.
14 files — installable on its own
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See `samber/cc-skills-golang@golang-samber-oops`...
7 files — installable on its own
Compile-time dependency injection in Golang using google/wire — wire.NewSet, wire.Build, wire.Bind (interface→concrete), wire.Struct, wire.Value, wire.InterfaceValue, wire.FieldsOf, cleanup functions, //go:build wireinject injector files, and generated wire_gen.go. Apply when using or adopting google/wire, when the codebase imports `github.com/google/wire`, or when wiring an application graph at compile time via `wire.Build`. For runtime DI with reflection, see...
7 files — installable on its own
Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports `github.com/99designs/gqlgen` or `github.com/graph-gophers/graphql-go`.
7 files — installable on its own
Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices. Use when implementing, reviewing, or debugging gRPC servers/clients, writing proto files, setting up interceptors, handling gRPC errors with status codes, configuring TLS/mTLS, testing with bufconn, or working with streaming RPCs.
6 files — installable on its own
Golang skills orchestrator — always active on any Golang coding, review, debug, or setup task. Reads the task context and loads the most relevant skills from samber/cc-skills-golang, often multiple at once: writing a gRPC service loads golang-grpc + golang-testing + golang-error-handling; debugging a panic loads golang-troubleshooting + golang-safety; auditing security loads golang-security + golang-lint + golang-safety. Also: disambiguates competing clusters when two skills seem to overlap...
5 files — installable on its own
Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code quality tooling, or choosing linters. Also use when the user mentions golangci-lint, go vet, staticcheck, or revive.
8 files — installable on its own
Modernize Golang code to use recent language features, standard library improvements, and idiomatic patterns. Trigger proactively when writing or reviewing Go code and old-style patterns are detected, or when encountering a deprecation warning. Also use when the user explicitly asks for modernization, a Go version upgrade, or a CI/tooling refresh.
6 files — installable on its own
Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters/setters, functional options, acronyms, test functions, and subtest names. Use this skill when writing new Go code, reviewing or refactoring, choosing between naming alternatives (New vs NewTypeName, isConnected vs connected, ErrNotFound vs NotFoundError, StatusReady vs StatusUnknown at iota 0), debating Go package names (utils/helpers anti-patterns), or...
9 files — installable on its own
Golang everyday observability — the always-on signals in production. Covers structured logging with slog, Prometheus metrics, OpenTelemetry distributed tracing, continuous profiling with pprof/Pyroscope, server-side RUM event tracking, alerting, and Grafana dashboards. Apply when instrumenting Go services for production monitoring, setting up metrics or alerting, adding OpenTelemetry tracing, correlating logs with traces, migrating legacy loggers (zap/logrus/zerolog) to slog, adding...
11 files — installable on its own
Golang performance optimization patterns and methodology - if X bottleneck, then apply Y. Covers allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, and hot-path optimization. Use when profiling or benchmarks have identified a bottleneck and you need the right optimization pattern to fix it. Also use when performing performance code review to suggest improvements or benchmarks that could help identify quick performance gains. Not for measurement methodology (→...
12 files — installable on its own
Recommends production-ready Golang libraries and frameworks. Apply when the user explicitly asks for library suggestions, wants to compare alternatives, needs to choose a library for a specific task, or when a new dependency is being added to the project.
7 files — installable on its own
Provides a guide for setting up Golang project layouts and workspaces. Use when starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, deciding between cmd/internal/pkg directory conventions, or discussing package restructuring, package splits, or module splits.
11 files — installable on its own
Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use when encountering nil panics, append aliasing, map concurrent access, float comparison pitfalls, or zero-value design questions. Also use when reviewing code for nil-safety, numeric conversion overflow, resource lifecycle issues (defer in loops), or defensive copying of slices and maps.
6 files — installable on its own
Dependency injection in Golang using samber/do — service containers, lifecycle management, scopes, health checks, graceful shutdown, and module organization. Apply when using or adopting samber/do, when the codebase imports github.com/samber/do or github.com/samber/do/v2, or when refactoring manual constructor injection into a DI container.
6 files — installable on its own
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports github.com/samber/hot, or when the project repeatedly loads the same medium-to-low cardinality resources at high frequency and needs to reduce latency or backend pressure.
7 files — installable on its own
Functional programming helpers for Golang using samber/lo — 500+ type-safe generic functions for slices, maps, channels, strings, math, tuples, and concurrency (Map, Filter, Reduce, GroupBy, Chunk, Flatten, Find, Uniq, etc.). Core immutable package (lo), concurrent variants (lo/parallel aka lop), in-place mutations (lo/mutable aka lom), lazy iterators (lo/it aka loi for Go 1.23+), and experimental SIMD (lo/exp/simd). Apply when using or adopting samber/lo, when the codebase imports...
7 files — installable on its own
Monadic types for Golang using samber/mo — Option, Result, Either, Future, IO, Task, and State types for type-safe nullable values, error handling, and functional composition with pipeline sub-packages. Apply when using or adopting samber/mo, when the codebase imports `github.com/samber/mo`, or when considering functional programming patterns as a safety design for Golang.
10 files — installable on its own
Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports github.com/samber/oops.
5 files — installable on its own
Reactive streams and event-driven programming in Golang using samber/ro — ReactiveX implementation with 150+ type-safe operators, cold/hot observables, 5 subject types (Publish, Behavior, Replay, Async, Unicast), declarative pipelines via Pipe, 40+ plugins (HTTP, cron, fsnotify, JSON, logging), automatic backpressure, error propagation, and Go context integration. Apply when using or adopting samber/ro, when the codebase imports github.com/samber/ro, or when building asynchronous...
8 files — installable on its own
Structured logging extensions for Golang using samber/slog-**** packages — multi-handler pipelines (slog-multi), log sampling (slog-sampling), attribute formatting (slog-formatter), HTTP middleware (slog-fiber, slog-gin, slog-chi, slog-echo), and backend routing (slog-datadog, slog-sentry, slog-loki, slog-syslog, slog-logstash, slog-graylog...). Apply when using or adopting slog, or when the codebase already imports any github.com/samber/slog-* package.
8 files — installable on its own
Security best practices and vulnerability prevention for Golang. Covers injection (SQL, command, XSS), cryptography, filesystem safety, network security, cookies, secrets management, memory safety, and logging. Apply when writing, reviewing, or auditing Go code for security, or when working on any risky code involving crypto, I/O, secrets management, user input handling, or authentication. Includes configuration of security tools.
16 files — installable on its own
Golang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage/help template customization, man-page and markdown doc generation, and testing with SetArgs/SetOut/SetErr. Apply when using or adopting spf13/cobra, or when the codebase imports `github.com/spf13/cobra`. For...
9 files — installable on its own
Golang configuration library using spf13/viper — layered precedence (flag > env > file > KV > default), BindPFlag/BindPFlags, SetEnvPrefix + SetEnvKeyReplacer + AutomaticEnv, ReadInConfig + ConfigFileNotFoundError, Unmarshal + mapstructure struct tags, Sub for sub-trees, WatchConfig + OnConfigChange for hot reload, viper.New() for test isolation, and remote KV integration. Apply when using or adopting spf13/viper, or when the codebase imports `github.com/spf13/viper`. For CLI command...
9 files — installable on its own
Provides resources to stay updated with Golang news, communities and people to follow. Use when seeking Go learning resources, discovering new libraries, finding community channels, or keeping up with Go language changes and releases.
3 files — installable on its own
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com/stretchr/testify.
5 files — installable on its own
Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON/YAML/DB serialization, or choosing between pointer and value receivers. Also use when the user...
3 files — installable on its own
Golang OpenAPI/Swagger documentation with swaggo/swag — annotation comments (@Summary, @Param, @Success, @Router, @Security), swag init code generation, framework integrations (gin, echo, fiber, chi, net/http), security definitions (Bearer/JWT, OAuth2, API key), and struct tags (swaggertype, enums, example, swaggerignore). Apply when adding or maintaining Swagger/OpenAPI docs in a Go project, or when the codebase imports github.com/swaggo/swag, github.com/swaggo/gin-swagger,...
5 files — installable on its own
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see...
8 files — installable on its own
Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber/cc-skills-golang@golang-benchmark` skill) or applying...
14 files — installable on its own
Implements dependency injection in Golang using uber-go/dig — reflection-based container, Provide/Invoke, dig.In/dig.Out parameter and result objects, named values, value groups, optional dependencies, scopes, and Decorate. Apply when using or adopting uber-go/dig, when the codebase imports `go.uber.org/dig`, or when wiring an application graph at startup. For higher-level lifecycle and modules, see `samber/cc-skills-golang@golang-uber-fx` skill.
7 files — installable on its own
Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports `go.uber.org/fx`, or when wiring services with fx.New. For raw DI without lifecycle, see `samber/cc-skills-golang@golang-uber-dig` skill.
7 files — installable on its own
Agent Skills for production-ready Golang projects
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.
<img width="1414" height="491" alt="image" src="https://github.com/user-attachments/assets/620b5835-c1ba-4ea9-bf47-2293b58b879e" />[!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.
🚀 How to use
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-performance/plugin marketplace add samber/cc
/plugin install cc-skills-golang@samberCopy 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 extensions install https://github.com/samber/cc-skills-golangUpdate with gemini extensions update cc-skills-golang.
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/.
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/.
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/.
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.
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.
🧩 Skills
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
- 🤖 Ultracode 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:
<!-- markdownlint-disable table-column-style -->| 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,497 | 6,216 |
| ⭐️ | ✅ golang-database | ⚡ ⚙️ | -38% | 97 | 2,725 | 7,248 |
| ⭐️ | ✅ golang-design-patterns | ⚡ ⚙️ | -37% | 66 | 2,610 | 9,316 |
| ⭐️ | ✅ golang-documentation | ⚡ 🤖 ⚙️ | -53% | 73 | 3,017 | 11,116 |
| ⭐️ | ✅ golang-error-handling | ⚡ 🤖 ⚙️ | -26% | 139 | 1,520 | 4,394 |
| ⭐️ | ✅ golang-how-to | ⚡ | — | 165 | 2,254 | 10,372 |
| ⭐️ | ✅ golang-modernize | ⚡ 🤖 | -61% | 68 | 2,780 | 9,093 |
| ⭐️ | ✅ 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% | 85 | 3,160 | 21,596 |
✅ golang-benchmark | ⚡ 🧠 | -50% | 102 | 2,814 | 29,996 | |
✅ 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 | 2,361 | 5,499 | |
✅ 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% | 130 | 2,190 | 18,190 | |
✅ golang-pkg-go-dev | ⚡ | — | 185 | 2,693 | 4,302 | |
✅ golang-popular-libraries | ⚡ | -30% | 61 | 893 | 4,287 | |
✅ golang-project-layout | ⚡ | -38% | 69 | 1,510 | 5,718 | |
✅ golang-stay-updated | ⚡ | -56% | 43 | 1,801 | 1,801 |
Tools:
| Skill | Flags | Error rate gap | Description (tok) | SKILL.md (tok) | Directory (tok) |
|---|---|---|---|---|---|
✅ golang-google-wire | ⚡ | -16% | 122 | 2,577 | 7,307 |
✅ golang-graphql | -16% | 76 | 2,977 | 7,848 | |
✅ golang-grpc | ⚡ | -41% | 69 | 2,249 | 5,065 |
✅ golang-spf13-cobra | ⚡ | — | 176 | 2,488 | 7,259 |
✅ golang-spf13-viper | ⚡ | — | 170 | 2,459 | 7,006 |
✅ golang-swagger | ⚡ | — | 144 | 2,250 | 3,255 |
✅ golang-uber-dig | ⚡ | -10% | 107 | 2,493 | 6,165 |
✅ golang-uber-fx | ⚡ | -5% | 118 | 2,733 | 6,968 |
✅ golang-samber-do | ⚡ | -81% | 71 | 1,794 | 3,309 |
✅ golang-samber-hot | ⚡ | -54% | 118 | 1,894 | 7,324 |
✅ golang-samber-lo | ⚡ | -40% | 165 | 2,518 | 10,154 |
✅ golang-samber-mo | ⚡ 🧠 | -48% | 81 | 2,860 | 11,275 |
✅ golang-samber-oops | ⚡ | -59% | 69 | 2,452 | 2,764 |
✅ golang-samber-ro | ⚡ 🧠 | -50% | 152 | 2,869 | 11,085 |
✅ golang-samber-slog | ⚡ | -19% | 118 | 3,028 | 9,750 |
❌ golang-temporal | — | 0 | 0 | 0 | |
✅ golang-stretchr-testify | ⚡ | -47% | 90 | 1,766 | 2,585 |
🧪 Skill evaluations
| With Skill | Without Skill | Delta | |
|---|---|---|---|
| Overall | 3315/3395 (98%) | 1915/3395 (56%) | +41pp |
See EVALUATIONS.md for the full per-skill breakdown.
📖 Skills description
Code Quality
golang-code-style
Go code formatting and conventions. gofmt, goimports, linting rules, comment conventions, and project-level style consistency. Overridable by company skills.
golang-documentation
Go documentation standards. Package docs, godoc conventions, code comments, example functions, README structure, and API reference generation. Overridable.
golang-error-handling
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.
golang-lint
Go linting best practices and golangci-lint configuration. Presets, custom rules, CI integration, inline suppression, and output interpretation.
golang-naming
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.
golang-safety
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.
golang-security
Go security best practices. Injection prevention (SQL, command, XSS), cryptography, filesystem/network safety, secrets management, cookie security, and tool configuration. Audit and review modes.
golang-structs-interfaces
Go struct and interface design. Composition, embedding, type assertions, interface segregation, struct tags (JSON/YAML/DB), pointer vs value receivers. Overridable.
Architecture & Design
golang-concurrency
Go concurrency patterns. Goroutines, channels, sync primitives, context cancellation, worker pools, fan-out/fan-in, pipelines. Overridable.
golang-context
Idiomatic context.Context usage. Creation, cancellation, timeouts, values, propagation patterns, and common anti-patterns. Overridable.
golang-data-structures
Go data structures internals and usage. Slices (capacity growth, append aliasing), maps, channels, sync primitives, and when to use each.
golang-database
Go database access patterns. Parameter binding, connection pooling, transactions, migrations, sqlboiler/sqlc code generation, query builders. Overridable.
golang-dependency-injection
Dependency injection patterns in Go. Constructor injection, interface-based DI, wire/dig/fx comparison, and when DI is worth the complexity. Overridable.
golang-design-patterns
Idiomatic Go design patterns. Functional options, constructors, builder pattern, middleware chains, circuit breaker, and architecture guides with file trees and code. Overridable.
golang-modernize
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.
QA & Performance
golang-benchmark
Go benchmarking, profiling, and performance measurement. pprof, trace, CPU/memory/block profiles, flame graphs, benchmark comparison (benchstat), continuous profiling.
golang-observability
Go production observability. Structured logging (slog), Prometheus metrics, OpenTelemetry tracing, pprof profiling, RUM tracking, alerting, Grafana dashboards. Overridable.
golang-performance
Go performance optimization. Allocation reduction, CPU efficiency, memory layout, GC tuning, pooling, caching, hot-path optimization. Review and hot-path modes.
golang-testing
Production-ready Go tests. Table-driven tests, fuzzing, fixtures, goroutine leak detection (goleak), snapshot testing, code coverage, integration tests, parallel tests. Overridable.
golang-troubleshooting
Systematic Go debugging methodology. Common pitfalls, test-driven debugging, pprof capture, Delve debugger, race detection, GODEBUG tracing, production debugging.
Project Setup
golang-cli
Go CLI application development. Project layout, exit codes, signal handling, I/O patterns, argument parsing, and terminal UX.
golang-continuous-integration
CI/CD pipeline configuration for Go projects using GitHub Actions. Build, test, lint, and release workflows.
golang-dependency-management
Go module dependency strategies. go.mod conventions, versioning, replace directives, tool dependencies, and multi-module workspaces.
golang-pkg-go-dev
Go package and module exploration via godig, a pkg.go.dev API client (CLI + MCP server). Package docs, API references, symbols, code examples, versions, importers, licenses, and known vulnerabilities. Prefer over Context7 for Go packages.
golang-popular-libraries
Curated recommendations for production-ready Go libraries and frameworks. When the stdlib is enough vs when to reach for a package.
golang-project-layout
Go project structure and workspace setup. cmd/internal/pkg conventions, monorepo layout, CLI project structure, and when to keep things flat.
golang-stay-updated
Resources to stay current with Go. Official channels, community hubs, key people to follow, and learning resources.
APIs
golang-graphql
GraphQL API development in Go using gqlgen/graphql-go. Schema definition, resolvers, subscriptions, dataloader, and federation.
golang-grpc
gRPC in Go. Protobuf organization, service definitions, streaming, interceptors, error codes, and code generation workflow.
golang-swagger
OpenAPI/Swagger docs with swaggo/swag. Annotation comments, code generation, framework integrations (gin, echo, fiber, chi), security definitions.
Dependency Injection
golang-google-wire
Compile-time dependency injection with google/wire. Provider sets, injector generation, wire.Build, and structured DI patterns.
golang-uber-dig
Reflection-based DI with uber-go/dig. Provide/Invoke, dig.In/dig.Out, named values, value groups, optional dependencies, and Decorate.
golang-uber-fx
Application framework with uber-go/fx. fx.New, fx.Provide/Invoke, fx.Module, lifecycle hooks, fx.Annotate, fx.Decorate, signal-aware Run.
Frameworks
golang-spf13-cobra
CLI command trees with spf13/cobra. Command hierarchy, RunE hooks, flag management, shell completion, usage templates, and testing with SetArgs.
golang-spf13-viper
Layered configuration with spf13/viper. Flag > env > file > KV > default precedence, BindPFlag, hot reload, test isolation, and remote KV integration.
samber/*
golang-samber-do
Dependency injection with samber/do. Type-safe service containers, lifecycle management, scopes, health checks, and graceful shutdown.
golang-samber-hot
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.
golang-samber-lo
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.
golang-samber-mo
Monadic types with samber/mo. Option, Result, Either, Future, IO, Task, State for type-safe nullable values, error handling, and functional composition.
golang-samber-oops
Structured error handling with samber/oops. Error builders, stack traces, error codes, context attributes, public vs developer messages, panic recovery, and APM integration.
golang-samber-ro
Reactive streams with samber/ro. 150+ type-safe operators, cold/hot observables, 5 subject types, 40+ plugins, automatic backpressure, and Go context integration.
golang-samber-slog
Structured logging pipeline with samber/slog-**** packages. Multi-handler routing (slog-multi), sampling, formatting, HTTP middleware, and 20+ backend sinks.
Testing
golang-stretchr-testify
Testing with stretchr/testify. assert, require, mock, and suite packages. Assertions, mock expectations, argument matchers, suite lifecycle, and custom matchers.
🕵 Use in CI for AI-driven reviews
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).
🎯 Tuning Skill Triggers
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/.
🔄 Overlap
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.
✍️ Contribute
- 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.
💫 Fuel the Revolution
- ⭐️ 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
📝 License
Copyright © 2026 Samuel Berthe.
This project is under MIT license.
Install the whole package (43 skills):
npx skills add https://github.com/samber/cc-skills-golangOr install a single skill:
npx skills add https://github.com/samber/cc-skills-golang --skill <name>Pick the skill name from the Skills tab — each entry there installs independently.