golang-idiomatic-go
Skill15 starsChanged 9 months agoMITView on GitHub
Idiomatic Go style and best practices review. Use when checking interface design, pointer usage, or Go-specific idioms. Ensures code follows standard Go conventions and readability principles.
In this repository9 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Use this skill when:
- Distinctive: line 91
Check method receivers (pointer vs value)
- Distinctive: line 92
Verify interface sizes and locations
- Distinctive: line 94
Check "accept interfaces, return structs" pattern
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Golang Idiomatic Patterns
Expert-level review for idiomatic Go patterns. Ensures code follows Go conventions, proper interface design, and appropriate pointer usage.
When to Apply
Use this skill when:
- Ensuring code follows Go idioms
- Reviewing interface design patterns
- Checking pointer vs value usage
- Verifying "Accept interfaces, return structs" pattern
- Auditing usecase complexity
- Ensuring small, focused interfaces
Rule Categories by Priority
| Priority | Count | Focus |
| High | 1 | Method receivers |
| Medium | 5 | Go idioms and patterns |
Rules Covered (6 total)
High-Impact Patterns (1)
high-pointer-receiver- Use pointer receivers for mutations
Medium Improvements (5)
medium-interface-pollution- Keep interfaces small (<5 methods)medium-accept-interface-return-struct- API flexibility patternmedium-pointer-overuse- Don't overuse pointers for small typesmedium-usecase-complexity- Move business logic to domain entitiesmedium-interface-in-implementation- Define interfaces where used
Common Idiomatic Patterns
Accept Interfaces, Return Structs
// ✅ GOOD: Accept interface, return struct
func Process(r io.Reader) (*Result, error) {
// ...
return &Result{}, nil
}Small Interfaces
// ✅ GOOD: Small, focused interface
type Reader interface {
Read(p []byte) (n int, err error)
}Pointer Receivers for Mutations
// ✅ GOOD: Pointer receiver modifies state
func (u *User) UpdateEmail(email string) {
u.Email = email
}Trigger Phrases
This skill activates when you say:
- "Is this idiomatic Go?"
- "Review Go style"
- "Check interface design"
- "Verify pointer usage"
- "Review Go conventions"
- "Check for Go anti-patterns"
How to Use
For Idiomatic Review
- Check method receivers (pointer vs value)
- Verify interface sizes and locations
- Review pointer usage appropriateness
- Check "accept interfaces, return structs" pattern
Output Format
## Idiomatic Go Improvements: X
### [Rule Name] (Line Y)
**Pattern**: Interface Design / Pointer Usage / Method Receiver
**Issue**: Violates Go idiom
**Fix**: Suggested correction
**Example**:
```go
// Idiomatic Go codeRelated Skills
- golang-clean-architecture - For interface segregation
- golang-design-patterns - For usecase complexity
Philosophy
Based on "Learning Go" and Effective Go:
- Simplicity over cleverness - Boring code is good code
- Interfaces are satisfied implicitly - Define where used
- Composition over inheritance - Embed types, don't extend
- Clear is better than clever - Readability wins
Notes
- Focus on Go-specific patterns
- Not general programming practices
- Emphasizes Go conventions and idioms
- Based on Effective Go and community standards
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.

