golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust applications.
- Covers core principles including simplicity over cleverness, useful zero values, and accepting interfaces while returning concrete types
- Includes error handling patterns with wrapping, custom error types, and proper error checking using
errors.Isanderrors.As - Provides concurrency patterns for worker pools, context-based cancellation, graceful shutdown, and goroutine leak prevention
- Addresses interface design, package organization, struct composition with functional options, and memory optimization techniques
- Features anti-patterns to avoid, Go tooling integration, and a quick reference of Go idioms
Go Development Patterns
Idiomatic Go patterns and best practices for building robust, efficient, and maintainable applications.
When to Activate
- Writing new Go code
- Reviewing Go code
- Refactoring existing Go code
- Designing Go packages/modules
Core Principles
1. Simplicity and Clarity
Go favors simplicity over cleverness. Code should be obvious and easy to read.
// Good: Clear and direct
More from affaan-m/everything-claude-code
security-review
Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provides comprehensive security checklist and patterns.
7.9Kcoding-standards
Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.
6.7Kfrontend-patterns
Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
6.6Kbackend-patterns
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
6.6Kgolang-testing
Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.
6.1Kspringboot-patterns
Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work.
5.6K