golang-development
Skill0 starsChanged 4 months agoMITView on GitHub
Guide Go development and code review. Apply when writing, maintaining, or reviewing Go code to ensure consistency with project tooling, module conventions, and common patterns.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Rhiadc/skillstheir own version, first seen Aug 8, 2026
- brpaz/agent-skillstheir own version, first seen May 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- brpaz/agent-skills★ 1same name
- Rhiadc/skills★ 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.
- buildkiteSkill
- englogSkill
- githubSkill
- jiraSkill
- optimize-workspace-contextSkill
- plan-with-reviewSkill
- pull-requestSkill
- python-developmentSkill
- review-claude-configSkill
- review-claude-settingsSkill
- review-pull-requestSkill
- session-learningsSkill
- triage-dependency-prsSkill
The file
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 37
Use templates from tooling.md as starting point
- Very specific: line 42
Read existing Makefile, golangci-lint config, and go.mod before writing anything
- Distinctive: line 44
Check CLAUDE.md / AGENTS.md for repo-specific guidance first
- Distinctive: line 54
Never swallow errors — always check and propagate or wrap
- Distinctive: line 97
For version bump PRs: always check GOTOOLCHAIN behavior — see tooling.md.
- Distinctive: line 99
When a blocker is found, grep for the same pattern across the codebase and include all instances in the review comment.
- Distinctive: line 110
Check against CI toolchain before bumping — see tooling.md
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Go Development
Apply this skill when writing, maintaining, or reviewing Go code.
Supporting Files
- tooling.md — Makefile targets, golangci-lint v2 config, CI toolchain conventions, GOTOOLCHAIN behavior
- patterns.md — Error handling, struct layout, and common patterns
Mode Detection
| Signal | Mode |
| "write", "create", "add", "scaffold", "implement", "new" | WRITE |
| "fix", "refactor", "update", "change", "migrate", "improve" | MAINTAIN |
| "review", "check", "audit", "look at", "what do you think" | REVIEW |
WRITE Mode
Step 1: Greenfield or brownfield?
Greenfield (new repo or new package):
- Use templates from tooling.md as starting point
- Standard layout:
cmd/for entry points,internal/for private packages,pkg/for public packages - Apply all rules below from the start
Brownfield (existing repository):
- Read existing
Makefile,golangci-lintconfig, andgo.modbefore writing anything - Match existing patterns — don't retrofit conventions the repo hasn't adopted
- Check
CLAUDE.md/AGENTS.mdfor repo-specific guidance first
Step 2: Apply when writing any code
Linter compliance — read the repository's golangci-lint configuration before changing code. Common rules that surprise people:
noinlineerr: splitif err := x(); err != nilinto two lines — see patterns.mdwsl_v5: add a blank line beforeifwhen multiple statements precede itrevive: mark unused parameters with_
Error handling:
- Never swallow errors — always check and propagate or wrap
- Wrap with context:
fmt.Errorf("doing X: %w", err) - See patterns.md for the noinlineerr split pattern
Module hygiene:
go.modgodirective = minimum Go version required to build — see tooling.md before bumping it
MAINTAIN Mode
- Read before writing — check existing patterns with Read/Grep
- Run checks after editing —
make lintandmake test; see tooling.md for standard targets - Match existing patterns — preserve style even if it differs from greenfield defaults
- Don't change tooling unless the user explicitly asks
REVIEW Mode
Go through the diff and report findings. See patterns.md for detailed pattern checks.
Blockers (Critical — must fix before merge)
- Swallowed errors:
errreturned but not checked, or_ = someFunc()on error-returning function || return 0/|| truein shell scripts in the repo — silently converts failures to success; see review-pull-request skillgo.modgodirective bumped above the CI toolchain version whenGOTOOLCHAIN=local— will fail all pipelines; see tooling.md- Secrets or credentials hardcoded
- Race conditions: shared state accessed without synchronization
Suggestions
- Missing error wrapping context (
fmt.Errorf("...: %w", err)preferred over bareerr) - Inline error assignment not split for
noinlineerrlint rule (will fail CI) - Missing blank line before
ifblock when multiple statements precede it (wsl_v5) - Unused parameter not named
_(revive)
NITs
- Abbreviated variable name where the full word is short and unambiguous (
bid→buildID,pkgs→packages,pfor a package struct →pkg) — see patterns.md - Exported identifier missing godoc comment
- Magic constant that should be a named
const - Test helper not calling
t.Helper() - Error string contains
\n— Go style requires single-line errors; see patterns.md - Package named
validate,util,helper,common— too generic; prefer a name that describes what the package actually does (e.g.layout,checksum,dralayout)
For version bump PRs: always check GOTOOLCHAIN behavior — see tooling.md.
When a blocker is found, grep for the same pattern across the codebase and include all instances in the review comment.
Brownfield Decision Tree
golangci-lint config present?
- Yes → run
make lintwith existing config; don't add or remove linters - No → add
.golangci.ymlonly if the user asks
Go version in go.mod?
- Check against CI toolchain before bumping — see tooling.md
Makefile present?
- Yes → check for
test,lint,fmt,buildtargets; use them - No → run
go test ./...andgolangci-lint rundirectly
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.

