Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use this skill when building Go services/CLIs and you want practical patterns for package layout, error handling, concurrency, and testing that keep code readable and reliable.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -22% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 21% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 3% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -19% | 0% |
Use this skill when building Go services/CLIs and you want practical patterns for package layout, error handling, concurrency, and testing that keep code readable and reliable.
Use %w to wrap:
goreturn fmt.Errorf("load config: %w", err)
Prefer returning errors over panics for expected failure modes.
For servers and clients:
context.Context as the first parameterPrefer:
Avoid:
Common structure:
cmd/<app>/main.gointernal/... for private app packagespkg/... only for truly reusable libs (optional)Prefer:
errgroup (or equivalent) for fan-out with cancellationAvoid:
Patterns:
cmd/ and critical packages under internal/ with grep/glob.go test ./....go test -run <name> -count=1 or run the binary with flags.Other measured skills in the registry, with their headline benchmark lift.