go-development
Skill1 starsChanged 11 months agoISCView on GitHub
Guidelines for writing idiomatic, efficient, and concurrent Go code. Use when working with .go files, building Go services, APIs, or CLI tools.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- ibarryyan/skills-runtimetheir own version, first seen Oct 3, 2026
- netresearch/go-development-skilltheir own version, first seen Sep 30, 2026
- codetesla51/skillstheir own version, first seen Sep 25, 2026
- dallay/agents-skillstheir own version, first seen Aug 13, 2026
- ProjAnvil/MindForgetheir own version, first seen Mar 5, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- netresearch/go-development-skill★ 12same name
- ProjAnvil/MindForge★ 3same name
- dallay/agents-skills★ 2same name
- codetesla51/skills★ 1same name
- ibarryyan/skills-runtime★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- ai-development-assistantSkill
- angular-developmentSkill
- bun-package-managerSkill
- css-developmentSkill
- html-developmentSkill
- javascript-developmentSkill
- npm-package-managerSkill
- pnpm-package-managerSkill
- python-developmentSkill
- react-developmentSkill
- rust-developmentSkill
- typescript-developmentSkill
- vue-developmentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
61 rules. 0 are common, 60 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
60
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when:
- Distinctive: line 21
Composition Over Inheritance: Use struct embedding and interfaces, not class hierarchies.
- Distinctive: line 23
Standard Library First: Use standard library before adding dependencies.
- Distinctive: line 24
Effective Go: Follow patterns and practices from Effective Go documentation.
- Distinctive: line 29
Package Names: Use short, lowercase, single-word package names.
- Distinctive: line 30
Internal Packages: Use internal/ directory for private packages.
- Very specific: line 31
Main Package: Keep main.go minimal. Move logic to packages.
- Distinctive: line 32
Flat Structure: Avoid deep nesting. Prefer flat package hierarchies.
- Distinctive: line 33
Go Modules: Use go.mod for dependency management (Go 1.11+).
- Distinctive: line 38
CamelCase: Use MixedCaps or mixedCaps, not underscores.
- Distinctive: line 39
Short Names: Use short variable names in small scopes (i, err, ctx).
- Distinctive: line 40
Descriptive Names: Use descriptive names for package-level declarations.
- Distinctive: line 41
Getters: Don't use Get prefix for getters (use Value() not GetValue()).
- Distinctive: line 46
Function Length: Keep functions focused and concise.
- Distinctive: line 47
Multiple Return Values: Use multiple returns for value and error.
- Distinctive: line 48
Named Return Values: Use named returns for documentation, not for early return tricks.
- Distinctive: line 49
Receiver Names: Use short, consistent receiver names (1-2 letters).
- Distinctive: line 50
Pointer vs Value Receivers: Use pointer receivers for mutation or large structs.
- Distinctive: line 51
Function Options: Use functional options pattern for configuration.
- Distinctive: line 55
Check All Errors: Never ignore errors. Always check returned error values.
- Distinctive: line 56
Error Messages: Don't capitalize error messages or end with punctuation.
- Distinctive: line 57
Error Wrapping: Use fmt.Errorf with %w verb to wrap errors (Go 1.13+).
- Distinctive: line 58
Custom Errors: Create custom error types for domain-specific errors.
- Distinctive: line 59
Sentinel Errors: Use errors.Is and errors.As for error comparison.
- Distinctive: line 60
Error Context: Add context to errors as they propagate up the call stack.
- Distinctive: line 64
Small Interfaces: Keep interfaces small and focused (1-3 methods ideal).
- Distinctive: line 66
Empty Interface: Use interface{} (or any in Go 1.18+) sparingly.
- Distinctive: line 67
Type Assertions: Check type assertions with comma-ok idiom.
- Distinctive: line 68
Struct Tags: Use struct tags for encoding/decoding (json, xml, yaml).
- Distinctive: line 74
Channels: Use channels to communicate between goroutines, not shared memory.
- Distinctive: line 75
Select Statement: Use select for multiplexing channel operations.
- Distinctive: line 76
Context Package: Use context.Context for cancellation and deadlines.
- Distinctive: line 77
WaitGroups: Use sync.WaitGroup to wait for goroutines to complete.
- Distinctive: line 78
Mutexes: Use sync.Mutex when shared memory is unavoidable.
- Distinctive: line 79
Buffered Channels: Use buffered channels carefully to avoid deadlocks.
- Distinctive: line 85
String Builder: Use strings.Builder for efficient string concatenation.
- Distinctive: line 86
Defer: Use defer for cleanup, but be aware of performance in loops.
- Distinctive: line 92
Table-Driven Tests: Use table-driven tests for multiple test cases.
- Distinctive: line 93
Subtests: Use t.Run() for subtests and parallel execution.
- Distinctive: line 94
Test Helpers: Create test helper functions with t.Helper().
- Distinctive: line 95
Benchmarks: Write benchmarks for performance-critical code.
- Distinctive: line 96
Coverage: Use go test -cover to measure test coverage.
- Distinctive: line 97
Mocking: Use interfaces for dependency injection and testing.
- Distinctive: line 127
Not closing channels (unless infinite)
- Distinctive: line 133
HTTP: Use net/http for HTTP servers and clients.
- Distinctive: line 134
JSON: Use encoding/json for JSON marshaling.
- Distinctive: line 135
Time: Use time.Time, never store time as strings or integers.
- Distinctive: line 136
Context: Use context.Context in all I/O operations.
- Distinctive: line 137
Formatting: Use fmt.Sprintf for string formatting, not string concatenation.
- Distinctive: line 138
Logging: Use log or slog (Go 1.21+) for structured logging.
- Distinctive: line 142
Go Modules: Use go mod init, go mod tidy for module management.
- Distinctive: line 143
Semantic Versioning: Follow semver for module versions.
- Distinctive: line 144
Minimal Dependencies: Add dependencies judiciously.
- Distinctive: line 145
Replace Directive: Use replace in go.mod for local development only.
- Distinctive: line 146
Vendor Directory: Use go mod vendor for reproducible builds.
- Distinctive: line 150
Profiling: Use pprof for CPU and memory profiling.
- Distinctive: line 151
Benchmarking: Write benchmarks before optimizing.
- Distinctive: line 152
String Operations: Use strings.Builder or bytes.Buffer for concatenation.
- Distinctive: line 153
Reflection: Avoid reflection in hot paths.
- Distinctive: line 155
sync.Pool: Use sync.Pool for object reuse in high-throughput scenarios.
- Distinctive: line 159
Before submitting Go code, verify:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go Development Skills
When to Use This Skill
Use this skill when:
- Writing or refactoring Go code (.go files)
- Building microservices, APIs, or backend systems
- Creating CLI tools or system utilities
- Working with concurrent programming and goroutines
- Developing cloud-native applications
I. Go Philosophy & Principles
- Simplicity First: Embrace Go's philosophy of simplicity and clarity over cleverness.
- Composition Over Inheritance: Use struct embedding and interfaces, not class hierarchies.
- Explicit Error Handling: Handle errors explicitly. Don't ignore returned errors.
- Standard Library First: Use standard library before adding dependencies.
- Effective Go: Follow patterns and practices from Effective Go documentation.
II. Code Organization & Structure
- Package Organization: Organize by functionality, not by type (models, controllers, etc.).
- Package Names: Use short, lowercase, single-word package names.
- Internal Packages: Use internal/ directory for private packages.
- Main Package: Keep main.go minimal. Move logic to packages.
- Flat Structure: Avoid deep nesting. Prefer flat package hierarchies.
- Go Modules: Use go.mod for dependency management (Go 1.11+).
III. Naming Conventions
- Exported Names: Capitalize first letter for exported identifiers.
- CamelCase: Use MixedCaps or mixedCaps, not underscores.
- Short Names: Use short variable names in small scopes (i, err, ctx).
- Descriptive Names: Use descriptive names for package-level declarations.
- Getters: Don't use Get prefix for getters (use Value() not GetValue()).
- Interfaces: Name interfaces with -er suffix (Reader, Writer, Closer).
IV. Functions & Methods
- Function Length: Keep functions focused and concise.
- Multiple Return Values: Use multiple returns for value and error.
- Named Return Values: Use named returns for documentation, not for early return tricks.
- Receiver Names: Use short, consistent receiver names (1-2 letters).
- Pointer vs Value Receivers: Use pointer receivers for mutation or large structs.
- Function Options: Use functional options pattern for configuration.
V. Error Handling
- Check All Errors: Never ignore errors. Always check returned error values.
- Error Messages: Don't capitalize error messages or end with punctuation.
- Error Wrapping: Use fmt.Errorf with %w verb to wrap errors (Go 1.13+).
- Custom Errors: Create custom error types for domain-specific errors.
- Sentinel Errors: Use errors.Is and errors.As for error comparison.
- Error Context: Add context to errors as they propagate up the call stack.
VI. Interfaces & Types
- Small Interfaces: Keep interfaces small and focused (1-3 methods ideal).
- Accept Interfaces: Accept interfaces as parameters, return concrete types.
- Empty Interface: Use interface{} (or any in Go 1.18+) sparingly.
- Type Assertions: Check type assertions with comma-ok idiom.
- Struct Tags: Use struct tags for encoding/decoding (json, xml, yaml).
- Zero Values: Design types so their zero value is useful.
VII. Concurrency
- Goroutines: Launch goroutines for concurrent tasks, but manage their lifecycle.
- Channels: Use channels to communicate between goroutines, not shared memory.
- Select Statement: Use select for multiplexing channel operations.
- Context Package: Use context.Context for cancellation and deadlines.
- WaitGroups: Use sync.WaitGroup to wait for goroutines to complete.
- Mutexes: Use sync.Mutex when shared memory is unavoidable.
- Buffered Channels: Use buffered channels carefully to avoid deadlocks.
VIII. Memory Management
- Pointers vs Values: Pass large structs by pointer. Pass small values by value.
- Slice Capacity: Pre-allocate slices with make() when size is known.
- String Builder: Use strings.Builder for efficient string concatenation.
- Defer: Use defer for cleanup, but be aware of performance in loops.
- Memory Leaks: Close channels and cancel contexts to prevent goroutine leaks.
IX. Testing
- Test Files: Name test files *_test.go in the same package.
- Table-Driven Tests: Use table-driven tests for multiple test cases.
- Subtests: Use t.Run() for subtests and parallel execution.
- Test Helpers: Create test helper functions with t.Helper().
- Benchmarks: Write benchmarks for performance-critical code.
- Coverage: Use go test -cover to measure test coverage.
- Mocking: Use interfaces for dependency injection and testing.
X. Project Structure
Standard Go Project Layout:
project/
├── cmd/ # Main applications
├── internal/ # Private application code
├── pkg/ # Public library code
├── api/ # API definitions (proto, OpenAPI)
├── configs/ # Configuration files
├── scripts/ # Build and automation scripts
├── test/ # Integration tests
├── go.mod # Module definition
└── README.mdXI. Common Patterns
Good Patterns:
- Functional options for configuration
- Singleton with sync.Once
- Worker pools with goroutines and channels
- Pipeline pattern with channels
- Context for cancellation propagation
Anti-Patterns to Avoid:
- Ignoring errors with _ = err
- Using panic for normal error handling
- Not closing channels (unless infinite)
- Goroutine leaks (no cleanup mechanism)
- Premature optimization
XII. Standard Library Usage
- HTTP: Use net/http for HTTP servers and clients.
- JSON: Use encoding/json for JSON marshaling.
- Time: Use time.Time, never store time as strings or integers.
- Context: Use context.Context in all I/O operations.
- Formatting: Use fmt.Sprintf for string formatting, not string concatenation.
- Logging: Use log or slog (Go 1.21+) for structured logging.
XIII. Dependencies & Modules
- Go Modules: Use go mod init, go mod tidy for module management.
- Semantic Versioning: Follow semver for module versions.
- Minimal Dependencies: Add dependencies judiciously. Prefer standard library.
- Replace Directive: Use replace in go.mod for local development only.
- Vendor Directory: Use go mod vendor for reproducible builds.
XIV. Performance & Optimization
- Profiling: Use pprof for CPU and memory profiling.
- Benchmarking: Write benchmarks before optimizing.
- String Operations: Use strings.Builder or bytes.Buffer for concatenation.
- Reflection: Avoid reflection in hot paths. It's slow.
- Allocations: Minimize heap allocations in performance-critical code.
- sync.Pool: Use sync.Pool for object reuse in high-throughput scenarios.
XV. Best Practices Checklist
Before submitting Go code, verify:
- All errors are checked and handled
- Code formatted with gofmt or goimports
- No goroutine leaks (proper cleanup)
- Interfaces are small and focused
- Tests written and passing
- Error messages are lowercase, unwrapped
- Context used for cancellation
- No global mutable state
- Receiver names are consistent
- go mod tidy run before commit
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

