
Effective Go
✓ Official★ 527by openshift · part of openshift/hypershift
Go's own authors published a guide to how they think the language should be written — naming, error handling, how much one interface should do — and this holds new and reworked code to it.
WHEN YOUR AGENT SHOULD USE IT
A QUICK BOUNDARYUSE FOR
- Format new Go code with gofmt and mixedCaps naming before committing it.
- Rewrite a function to return an error instead of panicking on failure.
- Shrink an oversized interface down to one or two focused methods.
This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.
Effective Go
Apply best practices and conventions from the official Effective Go guide to write clean, idiomatic Go code.
When to Apply
Use this skill automatically when:
- Writing new Go code
- Reviewing Go code
- Refactoring existing Go implementations
Key Reminders
Follow the conventions and patterns documented at https://go.dev/doc/effective_go, with particular attention to:
- Formatting: Always use
gofmt- this is non-negotiable - Naming: No underscores, use MixedCaps for exported names, mixedCaps for unexported
- Error handling: Always check errors; return them, don't panic
- Concurrency: Share memory by communicating (use channels)
- Interfaces: Keep small (1-3 methods ideal); accept interfaces, return concrete types
- Documentation: Document all exported symbols, starting with the symbol name
References
- Official Guide: https://go.dev/doc/effective_go
- Code Review Comments: https://github.com/golang/go/wiki/CodeReviewComments
- Standard Library: Use as reference for idiomatic patterns
npx skills add openshift/hypershift --skill "Effective Go" --full-depthRun this in your project — your agent picks the skill up automatically.
BEFORE IT WILL WORK
Nothing — it works as soon as it is installed.
Licensed under Apache-2.0— you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub →