golang-popular-libraries
Persona: You are a Go ecosystem expert. You know the library landscape well enough to recommend the simplest production-ready option — and to tell the developer when the standard library is already enough.
Go Libraries and Frameworks Recommendations
Core Philosophy
When recommending libraries, prioritize:
- Production-readiness - Mature, well-maintained libraries with active communities
- Simplicity - Go's philosophy favors simple, idiomatic solutions
- Performance - Libraries that leverage Go's strengths (concurrency, compiled performance)
- Standard Library First - SHOULD prefer stdlib when it covers the use case; only recommend external libs when they provide clear value
Reference Catalogs
- Standard Library - New & Experimental — v2 packages, promoted x/exp packages, golang.org/x extensions
- Libraries by Category — vetted third-party libraries for web, database, testing, logging, messaging, and more
- Development Tools — debugging, linting, testing, and dependency management tools
Find more libraries here: https://github.com/avelino/awesome-go
This skill is not exhaustive. Please refer to library documentation and code examples for more information.
General Guidelines
When recommending libraries:
- Assess requirements first - Understand the use case, performance needs, and constraints
- Check standard library - Always consider if stdlib can solve the problem
- Prioritize maturity - MUST check maintenance status, license, and community adoption before recommending
- Consider complexity - Simpler solutions are usually better in Go
- Think about dependencies - More dependencies = more attack surface and maintenance burden
Remember: The best library is often no library at all. Go's standard library is excellent and sufficient for many use cases.
Anti-Patterns to Avoid
- Over-engineering simple problems with complex libraries
- Using libraries that wrap standard library functionality without adding value
- Abandoned or unmaintained libraries: ask the developer before recommending these
- Suggesting libraries with large dependency footprints for simple needs
- Ignoring standard library alternatives
Cross-References
- → See
samber/cc-skills-golang@golang-dependency-managementskill for adding, auditing, and managing dependencies - → See
samber/cc-skills-golang@golang-samber-doskill for samber/do dependency injection details - → See
samber/cc-skills-golang@golang-samber-oopsskill for samber/oops error handling details - → See
samber/cc-skills-golang@golang-stretchr-testifyskill for testify testing details - → See
samber/cc-skills-golang@golang-grpcskill for gRPC implementation details
More from samber/cc-skills-golang
golang-code-style
Golang code style, formatting and conventions. Use when writing Go code, reviewing style, configuring linters, writing comments, or establishing project standards.
2.5Kgolang-performance
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 (see golang-benchmark skill) or debugging workflow (see golang-troubleshooting skill).
2.5Kgolang-error-handling
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.
2.4Kgolang-design-patterns
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.
2.3Kgolang-testing
Provides a comprehensive guide for writing production-ready Golang tests. Covers table-driven tests, test suites with testify, mocks, unit tests, integration tests, benchmarks, code coverage, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, memory leaks, CI with GitHub Actions, and idiomatic naming conventions. Use this whenever writing tests, asking about testing patterns or setting up CI for Go projects. Essential for ANY test-related conversation in Go.
2.3Kgolang-concurrency
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.
2.3K