Garyson26/Trident-SecOps-Skills / skills/go-programming
go-programming
UnverifiedGo software engineering skill for designing, implementing, debugging, testing, reviewing, and refactoring Go applications, CLIs, APIs, services, concurrency code, modules, and tooling. Use for .go files, go.mod/go.sum, goroutines/channels, interfaces, error handling, performance profiling, race fixes, and idiomatic Go architecture.
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.
Go Standards
- Use
context.Contextas the first parameter for request-scoped work. - Wrap errors with
%wwhen callers can act on the cause; avoid string matching. - Keep goroutine lifecycle explicit with cancellation, bounded queues, and ownership of channel close.
- Avoid package globals unless they are immutable constants or intentionally shared.
- Use benchmarks and profiles before performance rewrites.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |