Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →

samber/cc-skills-golang

44 skills1M installs121k starsGitHub

Install

npx skills add https://github.com/samber/cc-skills-golang

Skills in this repo

1Golang Code StyleGo code style skill covering clarity and readability beyond what linters enforce. Teaches semantic line breaking, variable declaration patterns, control flow design, function organization, and naming conventions. Emphasizes 'Clear is better than clever' with idiomatic patterns for large codebases.36kinstalls2Golang Error HandlingGo error handling skill covering idiomatic error creation, wrapping with context, inspection patterns, and production logging. Teaches the single handling rule (log or return, not both), sentinel errors, custom error types, panic/recover design, and structured logging with slog.35.5kinstalls3Golang TestingGo testing skill covering production-ready test patterns including table-driven tests, parallel execution, fuzzing, integration testing with build tags, and goroutine leak detection with goleak. Teaches test structure, naming conventions, and CI best practices.35.2kinstalls4Golang PerformanceGo performance optimization skill for identifying and fixing bottlenecks using profiling-first methodology. Covers allocation reduction, CPU optimization, memory layout, GC tuning, connection pooling, caching strategies, and benchmarking with tools like pprof and benchstat.35.1kinstalls5Golang Design Patternsgolang-design-patterns is an agent skill that makes coding agents output idiomatic, production-grade Go constructor patterns and architecture decisions. It codifies functional options over builders, avoiding init(), early error returns, per-call timeouts, bounded resources, graceful shutdown, and dependency injection, with reference guides on clean, hexagonal, and DDD architectures. A developer uses it in design mode when creating new Go APIs or in review mode when auditing existing Go code for design issues.35.1kinstalls6Golang SecurityThe golang-security skill from samber cc-skills-golang v1.1.8 applies senior Go security engineering across review, audit, and coding modes. Review mode traces changed files and data flows from PR diffs. Audit mode launches up to five parallel sub-agents for injection, cryptography, web security, authentication, and concurrency domains, then aggregates DREAD-scored findings. Coding mode follows sequential guidance while optionally grepping new code for vulnerability patterns. It teaches defense in depth with trust-boundary questions, STRIDE threat modeling, and severity tables aligned to DREAD scores from critical RCE down to low info disclosure. Quick reference maps SQL injection to database/sql placeholders, command injection to exec.Command args, XSS to html/template, and path traversal to os.Root or filepath checks. Detailed reference files cover cryptography, injection, filesystem, network, cookies, secrets, logging, and architecture anti-patterns. Tooling sections document gosec, govulncheck, go test -race, and fuzz testing plus golangci-lint security rules.34.8kinstalls7Golang ConcurrencyThe golang-concurrency skill v1.1.4 from samber cc-skills-golang teaches structured concurrency where every goroutine has a clear owner, exit path, and error propagation. Write mode implements goroutines, channels, sync primitives, worker pools, and pipelines. Review mode inspects PR diffs for leaks, missing context propagation, ownership violations, and unprotected shared state. Audit mode parallelizes up to five sub-agents to find spawns without shutdown, unsynchronized globals, channel misuse, hot-loop time.After calls, and mutex problems. Core principles require sender-only channel closes, unbuffered channels by default, ctx.Done in select, and goleak in tests. Tables compare channels versus mutexes versus atomics and WaitGroup versus errgroup with SetLimit for bounded workers. Reference docs cover channels and select, sync primitives, and fan-out fan-in pipelines. Common mistakes include fire-and-forget goroutines, receiver-side channel closes, wg.Add inside goroutines, and mutexes held across I/O.34.4kinstalls8Golang NamingThe golang-naming skill v1.1.1 from samber cc-skills-golang codifies Go identifier conventions where capitalization controls export and MixedCaps replaces underscores. It triggers when writing or reviewing Go code, choosing between New versus NewTypeName constructors, ErrNotFound versus NotFoundError, boolean isConnected versus connected fields, or debating utils package anti-patterns. Quick reference tables cover packages, files, interfaces with er suffixes, Err-prefixed error variables, Error-suffixed types, With-prefixed option funcs, and iota enums with unknown zero values. MixedCaps rules forbid MAX_PACKET_SIZE, snake_case, and Hungarian notation because Go tooling assumes capitalization-based exports. Avoid stuttering guidance explains why http.HTTPClient wastes reader time. Sections dive into package naming, constructors, receivers, getters without Get prefixes on exported methods, acronym casing like URL and HTTPServer, and test table got versus expected fields. Community company skills that explicitly supersede this entry take precedence.34.3kinstalls9Golang DocumentationThe golang-documentation skill v1.1.4 treats documentation as a first-class deliverable for humans and AI agents across libraries and CLI applications. Write mode fills missing doc comments, README, CONTRIBUTING, CHANGELOG, and llms.txt sequentially or in parallel sub-agents. Review mode audits up to five documentation layers in parallel. Step one detects library versus application projects to branch guidance toward godoc and Example functions or installation and CLI help text. Writing principles demand concision, intent over paraphrase, no invented marketing claims, and preserved modality for must versus should obligations. Anti-patterns include pure-paraphrase godoc, signature restatement, hollow transitions, and template padding. Checklist tables mark required items like package comments, LICENSE, getting started examples, and library-specific playground or pkg.go.dev rendering. Cross-references link golang-naming, golang-testing, and golang-project-layout skills for comment style and file placement in repos.34.2kinstalls10Golang Data StructuresThe golang-data-structures skill v1.1.3 helps Go engineers pick structures by memory layout, allocation cost, and access patterns rather than familiarity alone. Eight summary rules recommend preallocating slices and maps with known capacity, preferring arrays only for fixed compile-time sizes, using container/heap for priority queues, the strings package for string assembly, bytes.Buffer for bidirectional I/O, tightest generic constraints, and weak.Pointer caches in Go 1.24+. Slice internals explain three-word headers, capacity growth doubling below 256 elements then roughly twenty-five percent, and slices.Grow pre-expansion. Map sections cover hash buckets, make with size hints, and Go 1.21+ maps package helpers like Clone and Equal. Container packages, generic collections, pointer semantics, and copy-versus-reference guidance link to golang-safety and golang-concurrency for aliasing and channel topics. Reference files provide slice and map deep dives plus container selection tables for everyday service code.34.2kinstalls11Golang ContextThe golang-context skill v1.2.1 teaches idiomatic context.Context usage as the request session tying together handler, service, database, and external API work. Eleven best-practice rules require ctx as the first parameter, prohibit storing context in structs, mandate cancel on all WithCancel paths, restrict context.Background to top-level entry points, and limit values to request-scoped metadata with unexported key types. Creating contexts table maps Background, TODO, r.Context, WithCancel, and WithTimeout to appropriate situations. Propagation examples contrast breaking the chain with context.Background inside services versus passing caller ctx to db.ExecContext. Deep-dive references cover cancellation and WithoutCancel for audit logs that outlive requests, safe value keys for tracing, and HTTP client plus QueryContext database patterns. Cross-references link to golang-concurrency, golang-database, golang-observability, and golang-design-patterns skills. Linters like govet and staticcheck catch many context pitfalls automatically during review.34.2kinstalls12Golang DatabaseThe golang-database skill v1.2.1 guides explicit SQL-first Go data access using database/sql with sqlx or pgx, never ORMs. Fifteen best-practice rules require parameterized placeholders, context on all QueryContext and ExecContext calls, explicit sql.ErrNoRows handling, defer rows.Close, transactions for multi-statement writes, SELECT FOR UPDATE when modifying read data, custom isolation levels for financial cases, pointer or sql.Null types for nullable columns, tuned connection pools, external migration tools, and batch sizing discipline. It forbids AI-generated schema design and hidden SQL features like triggers or stored procedures in application code. Library comparison favors pgx for PostgreSQL performance, sqlx for multi-database struct scanning, and warns against GORM magic and N+1 queries. Write mode follows sequential instructions with background greps for existing query patterns. Review mode parallel-scans for missing rows.Close, string-concat SQL, and absent context propagation. Cross-references link golang-context, golang-security, and golang-continuous-integration skills.34.1kinstalls13Golang ModernizeUpgrade Go code to use recent language features and standard library improvements. Covers range-over-int, min/max builtins, iterators, and new stdlib packages (slices, maps, cmp, slog) plus modern testing patterns - essential for keeping Go codebases current.34.1kinstalls14Golang SafetyDefensive Go coding practices that prevent panics, silent data corruption, and runtime bugs. Covers nil safety, append aliasing, concurrent map access, float comparison, zero-value design, and numeric overflow - critical for production-grade Go services.34.1kinstalls15Golang Project LayoutGo project structure and workspace setup conventions. Covers cmd/internal/pkg directory layout, monorepo patterns, CLI project organization, and decisions about flat vs hierarchical structure - foundational for scalable Go projects.34kinstalls16Golang Troubleshootinggolang-troubleshooting is an agent skill that forces coding agents into a disciplined, test-first process when debugging Go code. It routes a symptom (compile failure, wrong output, panic, race, hang, high CPU, memory growth, latency) through a decision tree and Golden Rules that require reproducing before fixing and finding the root cause. It escalates tooling incrementally from fmt.Println and test isolation to pprof, Delve, and GODEBUG. A developer uses it when a Go service crashes, deadlocks, or misbehaves and needs systematic diagnosis instead of guessed fixes.33.9kinstalls17Golang LintGo linting best practices and golangci-lint configuration for code quality. Covers linter presets, custom rule configuration, CI integration, inline suppression, and output interpretation - essential for maintaining consistent code standards.33.9kinstalls18Golang Popular LibrariesCurated recommendations for production-ready Go libraries and frameworks with guidance on when to use third-party packages versus the standard library. Helps developers make informed choices about dependencies and their trade-offs.33.8kinstalls19Golang ObservabilityGo production observability including structured logging (slog), Prometheus metrics, OpenTelemetry tracing, pprof profiling, and alerting. Essential for production Go services needing real-time insights into system behavior and performance.33.8kinstalls20Golang Structs InterfacesGo struct and interface design principles including composition, embedding, type assertions, and interface segregation. Covers struct tags (JSON/YAML/DB), receiver selection, and idiomatic patterns - fundamental to clean Go architecture.33.8kinstalls21Golang Dependency ManagementGo module dependency strategies including go.mod conventions, semantic versioning, replace directives, tool dependencies, and multi-module workspace setup. Ensures reproducible builds and proper dependency management at scale.33.8kinstalls22Golang Dependency InjectionDependency injection patterns in Go including constructor injection, interface-based DI, and comparison of wire/dig/fx frameworks. Guidance on when DI complexity is justified versus simpler patterns - critical for testable, maintainable services.33.7kinstalls23Golang BenchmarkGo benchmarking skill covering Go 1.24+ patterns including b.Loop() usage, dead code elimination awareness, statistical significance with -count flags, and benchstat interpretation. Teaches developers to write reliable performance tests and correctly analyze benchmark results.33.7kinstalls24Golang CliGo CLI application development covering project layout, exit codes, signal handling, I/O patterns, argument parsing, and terminal UX. Essential for building production-ready command-line tools and applications.33.6kinstalls25Golang GrpcGo gRPC skill covering error handling with status.Errorf, proto message design patterns, directory organization, and graceful server shutdown. Teaches developers to implement properly typed gRPC handlers, use wrapper messages for backward compatibility, and manage service lifecycle correctly.33.6kinstalls26Golang Continuous IntegrationGo continuous integration skill covering GitHub Actions workflows for AI code review using Claude. Provides patterns for automated code review on pull requests, test integration, and CI/CD pipeline setup.33.5kinstalls27Golang Stretchr TestifyGo testing skill focused on stretchr/testify library usage. Covers assert vs require patterns for test structure, precondition handling, and verification strategies. Helps developers write maintainable and clear test code.33.5kinstalls28Golang Stay UpdatedGo developer productivity skill focused on staying current with Go language updates and best practices. Recommends Go newsletters, resources, and methods for keeping pace with language evolution and ecosystem changes.33.3kinstalls29Golang Samber LoGo utility library skill covering samber/lo patterns for functional programming, collection operations, and utility functions. Teaches idiomatic Go use of functional paradigms without generics bloat.33.2kinstalls30Golang Samber DoGo dependency injection skill using samber/do library patterns. Covers dependency injection setup, v2 import usage, and service container patterns for managing application dependencies.33.2kinstalls31Golang Samber Slogsamber/slog-**** is a collection of 20+ composable slog.Handler packages for Go 1.21+ implementing a canonical logging pipeline. Developers use it to build production logging architectures where records flow through sampling (to reduce noise), formatters (to strip PII), and routers (to send errors to Sentry while info goes to Loki). It matters because sampling before formatting saves CPU, and routing separates concerns without duplicating handlers.33.1kinstalls32Golang Samber Oopssamber/oops is a drop-in replacement for Go's standard error handling that adds structured context, stack traces, error codes, and user-facing messages. Developers use it at every architectural layer to ensure on-call engineers can diagnose production errors without asking developers for more information. It matters because variable data goes in attributes (not messages), allowing APM tools to group errors properly by code and reduce noise.33.1kinstalls33Golang Samber Mosamber/mo is a Go library providing type-safe monadic types (Option, Result, Either, Future, IO, Task, State) with zero dependencies. Developers use it to replace nil checks with type constraints and transform error handling from imperative (if err != nil) to composable pipelines. It matters because impossible states become unrepresentable at the type level - Some(value) or None, Ok(value) or Err, Left(value) or Right(value) - reducing runtime crashes.33.1kinstalls34Golang Samber Hotsamber/hot is a generic, type-safe in-memory caching library for Go 1.22+ with 9 eviction algorithms. Developers use it to reduce latency and backend pressure when repeatedly loading the same medium-to-low cardinality resources at high frequency. It matters because the wrong algorithm (LRU when frequency dominates) tanks hit rate; W-TinyLFU is a safe default for mixed workloads.33.1kinstalls35Golang Samber Rosamber/ro is a Go implementation of ReactiveX providing 150+ type-safe operators for composable asynchronous streams. Developers use it for infinite event streams (WebSocket, tickers, file watchers) where manual goroutine/channel logic becomes unwieldy. It matters because reactive streams handle backpressure, error propagation, and operator composition automatically - complex async patterns become declarative.33.1kinstalls36Golang SwaggerSkill for generating OpenAPI/Swagger documentation in Go using swaggo/swag. Uses annotation comments on handler functions (@Summary, @Param, @Success, @Router, @Security) and generates interactive Swagger UI. Supports framework-specific integrations (Gin, Echo, Fiber, Chi, net/http) and comprehensive security definitions.31.8kinstalls37Golang GraphqlSkill for building GraphQL APIs in Go using gqlgen or graphql-go. Emphasizes schema-first design, N+1 prevention with DataLoaders, error handling, authentication, subscriptions with context cleanup, and production safety limits. Covers library comparison (gqlgen for large schemas, graphql-go for simple ones) and detailed resolver patterns.31.7kinstalls38Golang Spf13 CobraSkill for building command-line applications in Go using spf13/cobra. Covers command tree structure, flag parsing via pflag, argument validation, shell completions, testing patterns, and documentation generation. Emphasizes proper hook usage (PersistentPreRunE for initialization) and testing with SetArgs/SetOut/SetErr.31.7kinstalls39Golang Spf13 Viperspf13/viper is a Go configuration library that resolves values from multiple sources in a fixed precedence order. It binds flags, environment variables, config files, and defaults into a single API without requiring explicit code paths for each source. Developers use it when building CLIs and services that need flexible configuration from multiple sources.31.6kinstalls40Golang Uber Fxuber-go/fx is a Go application framework that combines dependency injection with lifecycle management and signal handling. It uses reflection-based wiring like dig but adds OnStart/OnStop hooks, module composition, and a blocking run loop for services. Developers use it when building long-running services like HTTP servers and workers that need coordinated startup and shutdown.31.6kinstalls41Golang Google Wiregoogle/wire is a code-generation based dependency injection toolkit for Go. It resolves the dependency graph at compile time and emits plain Go constructor calls, eliminating runtime reflection overhead. Use it when you want compile-time safety and predictability, with generated wire_gen.go files as committed source.31.6kinstalls42Golang Uber Diguber-go/dig is a Go dependency injection container using reflection to resolve and wire application object graphs. It provides Provide/Invoke primitives, named values, value groups, and optional dependencies without lifecycle management. Developers use it when they need pure DI for wiring without the framework overhead of fx.31.5kinstalls43Golang How ToA Go skills orchestrator that automatically loads the primary skill plus all applicable secondary skills for any coding, review, debug, or setup task. Eliminates the need to manually track which Go skills to use by identifying all relevant skills and loading them together.30.5kinstalls44Golang Pkg Go Devgolang-pkg-go-dev is a skill that fetches and reads Go package documentation from pkg.go.dev, giving a coding agent accurate signatures, exported symbols, and usage examples for the standard library and third-party modules. A solo builder reaches for it while writing Go so the agent picks real APIs from the current docs instead of guessing.2.4kinstalls

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.