golang-patterns
This skill provides a reference guide for idiomatic Go programming, covering best practices for error handling, concurrency, interface design, project structure, and performance optimization.
Is golang-patterns safe to install?
Safe to install: our audit of golang-patterns's source files found 12 shell commands, 0 external URLs, no file writes (none risk). Every command and URL listed appears verbatim in the skill's source. The skill provides documentation and code examples. It does not perform file system operations or network requests itself, though it lists shell commands for the user to execute.
How we audit skills: our security review methodology.
Who is this skill for?
Go developers seeking to write maintainable, efficient, and idiomatic code.
What can you do with it?
- Refactoring existing Go codebases for better readability
- Designing new Go packages and modules
- Reviewing Go code for idiomatic patterns
- Implementing standard project layouts and tooling configurations
How good is this skill?
Quality score: 5/10. The skill is a comprehensive, well-structured reference for Go development. It clearly distinguishes between idiomatic and non-idiomatic code with specific examples.
What does the skill file contain?
# 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.
```go
// Good: Clear and direct
func GetUser(id string) (*User, error) {
user, err := db.FindUser(id)
if err != nil {
return nil, fmt.Errorf("get user %s: %w", id, err)
}
return user, ni...Frequently asked questions
Does this skill automatically refactor my code?
No. The skill provides patterns and examples for the user to apply manually.
What project structure does this skill recommend?
It recommends a standard layout including cmd/, internal/, pkg/, api/, and testdata/ directories.
Does this skill provide a linter configuration?
Yes, it includes a sample .golangci.yml configuration file with recommended linters like errcheck, gosimple, and staticcheck.
Related skills
golang-code-style
33.3KGo developers and AI coding agents performing code reviews or writing new Go code
This skill provides a comprehensive set of Go code style conventions focused on clarity, maintainability, and idiomatic patterns. It covers variable declarations, control flow, function design, file organization, and string handling, serving as a guide for human-judgment-based code reviews that complement automated linters.
vue-best-practices
24.1KVue
This skill provides a structured workflow for Vue.js development, mandating the use of the Composition API, TypeScript, and specific architectural patterns. It requires developers to plan component boundaries, follow strict SFC structure, and apply core reactivity and data flow principles before implementing features.
flutter-apply-architecture-best-practices
21.6KFlutter developers building new projects or refactoring existing codebases for scalability
This skill provides a structured architectural framework for Flutter applications, enforcing a layered approach consisting of UI, Logic, and Data layers.
karpathy-guidelines
17.2KDevelopers and AI agents performing coding, code review, or refactoring tasks
The karpathy-guidelines skill provides a set of behavioral instructions for LLMs to minimize coding errors. It emphasizes simplicity, surgical code changes, explicit assumption surfacing, and goal-driven execution.