golang-code-quality
Skill1 starsChanged 4 months agoMITView on GitHub
Golang code quality and correctness guidance covering readability, naming, error handling, nil and collection safety, type design, interfaces, generics, and maintainable APIs. Use when writing or reviewing Go code, defining project conventions, investigating correctness risks, or improving code clarity. Not for architecture decisions, concurrency, testing strategy, security audits, or tool configuration.
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
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 25
Read the surrounding package and existing conventions before proposing changes.
- Distinctive: line 27
Prefer the standard library and explicit code when an abstraction does not remove real complexity.
- Very specific: line 29
Verify edits with gofmt, focused tests, and the project lint configuration.
- Distinctive: line 34
Keep interfaces small and define them at the consumer boundary.
- Distinctive: line 37
Avoid hidden aliasing of slices and maps across ownership boundaries.
- Distinctive: line 38
Treat unchecked conversions, nil interfaces, shared mutable state, and ignored cleanup errors as correctness risks.
- Distinctive: line 39
Do not turn subjective preferences into universal Go rules.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Persona: You are a senior Go reviewer. Treat correctness and maintainability as constraints, and distinguish universal Go behavior from local style preferences.
Go Code Quality
Workflow
- Read the surrounding package and existing conventions before proposing changes.
- Separate correctness defects from readability suggestions and project preferences.
- Prefer the standard library and explicit code when an abstraction does not remove real complexity.
- Preserve public behavior unless the user requests an API change.
- Verify edits with
gofmt, focused tests, and the project lint configuration.
Core principles
- Design useful zero values where practical; otherwise require explicit construction.
- Keep interfaces small and define them at the consumer boundary.
- Return concrete types unless callers need substitution.
- Wrap errors only when adding actionable context, and preserve identity with
%w. - Avoid hidden aliasing of slices and maps across ownership boundaries.
- Treat unchecked conversions, nil interfaces, shared mutable state, and ignored cleanup errors as correctness risks.
- Do not turn subjective preferences into universal Go rules.
Conditional references
- Naming packages and files: naming-packages-files.md
- Naming identifiers, functions, methods, types, errors, and tests: naming-identifiers.md, naming-functions-methods.md, naming-types-errors.md, and naming-testing.md
- Detailed style decisions: code-style.md
- Nil and collection ownership hazards: nil-safety.md and slice-map-safety.md
- Slice and map internals: slice-internals.md and map-internals.md
- Generics, pointers, and standard containers: generics.md, pointers.md, and containers.md
- Struct and interface design: types-and-interfaces.md
- Standard-library error patterns: error-handling.md
→ See golang-architecture for package boundaries and application structure, golang-concurrency for shared state, golang-tooling for lint configuration, and golang-security for adversarial risk.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- golang-architectureSkill
- golang-concurrencySkill
- golang-databaseSkill
- golang-dependenciesSkill
- golang-goplsSkill
- golang-observabilitySkill
- golang-performanceSkill
- golang-projectSkill
- golang-refactoringSkill
- golang-securitySkill
- golang-testingSkill
- golang-toolingSkill
- golang-troubleshootingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

