Build GraphQL APIs in Go with gqlgen or graphql-go. Covers schemas, resolvers that fetch field data, authentication, and live subscriptions, plus request-level data batching and query limits to address excessive database calls and resource use.
- Build a GraphQL API in Go
- Add GraphQL to an existing HTTP service
- Reduce repeated database queries in resolvers
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Design how Go requests carry cancellation signals, time limits, and request metadata through application layers. Helps investigate work that continues after cancellation, choose suitable context types, and separate background tasks from the request lifecycle.
- Reviewing context propagation from HTTP handlers to database calls
- Investigating missing cancellation and lingering timers
- Keeping background work running after a request ends
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Restructure existing Go code while preserving its behavior. Uses gopls, Go's code analysis tool, to map affected code and apply changes, with targeted tests and small pull requests for renaming, extracting functions, and moving code between packages.
- Split oversized functions or types
- Rename identifiers across a Go codebase
- Move code between packages or resolve import cycles
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Write, review, audit, and debug Go tests that check observable behavior. Covers named test cases, integration test isolation, concurrent execution, race and goroutine leak detection, and finding causes of intermittent failures or gaps in test coverage.
- Adding tests for edge cases and error paths
- Reviewing test changes in a pull request
- Auditing unit and integration test isolation
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
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
Add production monitoring to Go services using structured logs, metrics, request traces, continuous performance profiles, and user events. Connect these signals with alerts and dashboards to understand service behavior and investigate operational problems.
- Adding monitoring to a new Go service or feature
- Connecting logs with request traces
- Setting up latency metrics, alerts, and dashboards
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Choose Go libraries and frameworks for web, database, testing, logging, and messaging tasks. Compare candidates with standard library options, checking maintenance, licenses, adoption, and dependency complexity before deciding what to add to a project.
- Choose a library for a Go project
- Compare libraries for the same task
- Check whether the standard library is enough
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
Build and extend Go command-line tools with spf13/cobra. Organizes commands and options, validates arguments, adds shell completion suggestions, customizes help, and tests command behavior with captured output and isolated command instances.
- Building a Go CLI with subcommands
- Adding options and argument validation
- Improving shell completions and help text
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Navigate and refactor Go code with gopls, the official service for understanding Go source. Find definitions, references, and package APIs, then rename or restructure code and check diagnostics against the locally resolved project and dependencies.
- Finding definitions and call sites in unfamiliar Go code
- Checking references before renaming a function or type
- Discovering package APIs and file dependencies
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
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
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
Write, review, and debug Go database access code with guidance on parameterized queries, transactions, connection pools, and tests. Covers database/sql, sqlx, and pgx, while leaving schema creation and migration SQL outside its scope.
- Implement database queries and updates in Go
- Review SQL injection risks and connection leaks
- Review transaction boundaries and locking
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
Write and review Go error handling so failures carry useful context and are handled once. Covers error creation, wrapping, inspection, panic usage, and structured logging, where named fields help organize and search production logs.
- Adding context to returned errors
- Finding ignored errors and duplicate logging
- Reviewing custom error types and error matching
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Review older Go code and plan updates to language features, standard libraries, tests, and CI. The skill checks the project's Go version, prioritizes safety and correctness, and guides changes with linting and tests.
- Planning a Go version upgrade
- Replacing deprecated APIs
- Updating test patterns and CI tools
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
Organize Go projects with directory layouts, naming rules, and configuration files suited to their size and purpose. Supports command-line tools, libraries, services, and workspaces for developing several related modules together.
- Starting a Go project with an appropriate directory layout
- Separating internal code from reusable packages
- Developing related modules in a shared workspace
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Review Go code for accidental crashes and silent data corruption. This skill guides safer handling of nil values, shared slice storage, numeric conversions, resource cleanup, and types that work safely without explicit initialization.
- Reviewing nil handling before a code change
- Checking numeric conversions and floating-point comparisons
- Preventing unintended changes through shared slices and maps
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Implement Go collection transformations with samber/lo, including filtering, grouping, aggregation, and deduplication. Choose between standard library functions and helpers, and assess parallel processing, input mutation, or lazy evaluation when data size and measured performance justify them.
- Rewrite collection loops with Map, Filter, and Reduce
- Group records and remove duplicates
- Choose between standard library functions and lo helpers
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Build Go pipelines with samber/ro for events that arrive over time. Choose how consumers share data, combine multiple sources, and handle retries, timeouts, errors, and cancellation while managing the resources used by ongoing streams.
- Process ongoing WebSocket events
- Combine data from multiple asynchronous sources
- Share one event source across multiple consumers
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026
Implement layered configuration in Go with spf13/viper, combining command flags, environment variables, and configuration files under a fixed priority order. Covers mapping values into structs, reloading changed files, and keeping configuration state separate across tests.
- Combining configuration files, environment variables, and command flags
- Mapping nested settings into Go structs
- Reloading configuration after file changes
samber/cc-skills-golang☆ 3.6KUpdated Oct 1, 2026