Measure Go performance by writing benchmarks, examining CPU and memory profiles, and comparing repeated runs with benchstat. Use the results to assess code changes, detect slowdowns in CI, and investigate production performance.
- Compare performance before and after a code change
- Investigate CPU usage and memory allocations
- Detect performance regressions in CI
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Set up or improve GitHub Actions pipelines for Go projects. Configure automated tests, code checks, vulnerability scans, dependency update bots, releases, and Docker publishing, with workflow templates and repository settings that control permissions and merge requirements.
- Set up automated tests and code checks for Go
- Add vulnerability scanning to a pipeline
- Configure dependency update bots
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Helps choose and review names in Go code, covering packages, functions, types, constants, errors, and tests. Provides conventions and examples for capitalization, acronyms, constructors, and repeated wording to make naming decisions consistent.
- Choose names for new Go packages and functions
- Review capitalization and acronym spelling
- Align error and test naming conventions
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Build Go logging pipelines with samber/slog-* packages to control log volume, mask personal information, and route records to different destinations. It also guides HTTP request logging and shutdown handling for destinations that buffer records.
- Route error logs and informational logs to different destinations
- Mask personal information before sending logs
- Reduce high-volume logs with sampling
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Organize Go application dependencies with samber/do v2, a library that supplies services to the code that needs them. Guides service registration, lifecycle management, module organization, and migration from manually wired constructors.
- Adopting samber/do v2 in a Go application
- Replacing manually wired constructors with a service container
- Organizing service registration by module
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Use samber/mo in Go to represent missing values, failures, and alternative value types explicitly. Learn to choose Option, Result, or Either and combine processing steps, including pipelines where each step changes the value's type.
- Representing optional JSON and database fields
- Combining operations that may fail
- Choosing types for valid alternatives
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Build, extend, or review Go command-line tools with clear commands, flags, and configuration priorities. It guides output formats, exit codes, shell completion, cancellation, and tests so tools behave predictably in scripts and terminals.
- Build a Go command-line tool with subcommands
- Combine flags, environment variables, and configuration files
- Review output and exit codes for use in scripts
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Design and review Go structs and interfaces with clear responsibilities. Get guidance on small interfaces, embedding, dependency injection—passing in components a type needs—field tags, safe type checks, and pointer or value receivers.
- Designing small, composable interfaces
- Making dependencies replaceable in tests
- Choosing embedding and receiver types
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Design and review concurrent Go code with clear goroutine ownership, shutdown paths, and error handling. Choose channels, locks, or atomic operations to protect shared data, and structure worker pools with controlled concurrency and cancellation.
- Design goroutine shutdown and cancellation
- Choose channels or mutexes for concurrent code
- Protect shared maps and counters
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Review and strengthen Go code against injection attacks, unsafe file access, authentication flaws, and secret exposure. Traces how untrusted data reaches sensitive operations, ranks findings by severity, and guides fixes, static analysis, and security testing.
- Reviewing a Go pull request for security issues
- Auditing a codebase and prioritizing vulnerabilities
- Checking user input, file access, and network requests
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Build Go services with uber-go/fx by connecting components and managing startup and shutdown. This skill covers dependency injection, which supplies components with what they need, plus reusable modules, signal handling, logging, and tests with substitute dependencies.
- Connect components in a Go service with fx
- Manage server startup and graceful shutdown
- Organize application features into reusable modules
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Look up published Go packages with godig, a client for pkg.go.dev. Retrieve function signatures, documentation, examples, available versions, licenses, known vulnerabilities, and importing packages through read-only queries that require no authentication.
- Check a Go function's signature and usage examples
- List published module versions
- Review licenses and known vulnerabilities
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Build in-memory caches in Go with samber/hot to reduce repeated backend reads. Choose eviction rules, set expiration and capacity, load missing entries, and monitor cache behavior while accounting for memory limits and loading failures.
- Caching frequently requested database records
- Choosing eviction rules for access patterns
- Planning capacity and expiration within a memory budget
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Write and review Go tests using stretchr/testify. Choose assertions that continue or stop on failure, create mocks that verify expected calls, and organize related tests with shared setup and cleanup routines.
- Choosing between assert and require
- Creating mocks and verifying expected calls
- Sharing setup and cleanup across related tests
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Set up golangci-lint to check Go code for potential problems. Helps select checks, configure project rules, understand warnings, apply available automatic fixes, and document justified exceptions when a warning needs to be suppressed.
- Setting up code checks for a Go project
- Understanding and fixing lint warnings
- Adding checks gradually to an existing codebase
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Design Go services with dependency injection: passing required components in from outside. Compare manual wiring with DI libraries, generate setup code, and plan changes to tightly coupled services so their dependencies and lifecycle are explicit.
- Choosing manual wiring or a DI library
- Refactoring services that rely on global variables
- Replacing database dependencies with mocks in tests
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Make Go code easier to read by reviewing line breaks, variable declarations, branching, function parameters, and file organization. Provides concrete style guidance for implementation, code reviews, and project standards where formatting tools alone cannot judge clarity.
- Reviewing Go code for readability
- Simplifying nested branches and complex conditions
- Improving long function signatures and calls
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Improve Go code after profiling identifies a bottleneck. This skill guides memory allocation, CPU, caching, and garbage collection changes, with benchmark comparisons to check results. It also supports performance reviews of functions, packages, and services.
- Reduce memory allocations in Go code
- Optimize a function identified as slow
- Review a service for performance issues
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Helps implement structured error handling in Go with samber/oops. Add diagnostic attributes, stack traces showing the call path, and error codes, while keeping user-facing messages separate from technical details and integrating errors with logging.
- Add diagnostic context to database errors
- Separate user messages from technical error details
- Convert panics into structured errors
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Manage dependencies in Go projects, from evaluating a new package to updating versions and resolving conflicts. It covers module files, known vulnerability checks, dependency size audits, and workspaces for developing multiple modules together.
- Evaluate whether a Go project needs a new dependency
- Update existing dependencies and check the results
- Investigate and resolve dependency version conflicts
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Helps wire Go applications with uber-go/dig using dependency injection, which supplies the components each function needs. Covers constructor registration, named values, groups, and validation so startup dependencies can be organized and checked in tests.
- Wire dependencies at application startup
- Distinguish primary and read-only database connections
- Collect HTTP handlers into a group
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Build Go application initialization with google/wire, which generates constructor calls from declared dependencies. Covers reusable provider groups, interface bindings, cleanup functions, and keeping generated code synchronized so missing dependencies surface during generation.
- Introduce google/wire for application initialization
- Connect interfaces to concrete implementations
- Manage resource cleanup during initialization
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026