go-programming
Installation
SKILL.md
Go Programming
Operating Rules
- Inspect
go.mod, package layout, tests, and existing style before changing code. - Prefer small interfaces at consumer boundaries, explicit errors, table-driven tests, and simple composition over abstraction.
- Preserve exported API compatibility unless the user asks for a breaking change.
- Run targeted
go testfirst, then wider tests when feasible. Usego test -racefor concurrency changes when practical.
Workflow
- Build context with
rg --files,go list ./..., and targeted reads of affected packages. - Identify package boundaries, public types, side effects, and concurrency ownership.
- Implement the smallest cohesive change with clear errors and context-aware cancellation.
- Add or update tests for success paths, failure paths, edge cases, and races.
- Verify with formatting, tests, vet/static analysis if available, and a concise summary of risks.