golang
Apply evidence-backed Go rules for bounds, APIs, errors, concurrency, Temporal, tests, rollout, and controllers. Use when changing Go services, handlers, workflows, or tests.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- golang
- paths
- [ "**/*.go", "**/go.mod" ]
- description
- Apply evidence-backed Go rules for bounds, APIs, errors, concurrency, Temporal, tests, rollout, and controllers. Use when changing Go services, handlers, workflows, or tests.
02 资源文件 10
- 参考文档CONCURRENCY.md3.4 KB
- 参考文档CONTROLLERS.md1.7 KB
- 参考文档ERRORS.md2.6 KB
- 参考文档GO-1.27.md5.5 KB
- 参考文档PROTO-API.md3.7 KB
- 参考文档ROLLOUT.md3.2 KB
- 参考文档SECURITY.md3.0 KB
- 参考文档STRUCTURE.md2.0 KB
- 参考文档TEMPORAL.md1.8 KB
- 参考文档TESTING.md2.7 KB
03 SKILL.md 正文
This core routes to domain guidance; /golang-review owns the aggregate rule catalog. /aip owns resource design; this skill owns Go implementation.
Non-negotiables
- Bound tenant-controlled memory, cardinality, fan-out, concurrency, and response size.
- Traverse protos with generated getters:
a.GetB().GetC(). - Proto annotations own field contracts; do not duplicate handler validation.
- Use
optionalonly for semantic presence; update intent belongs in masks. - Collections are paginated, filterable
List;Getreturns one resource. - At API boundaries, log internal causes and return structured Connect/gRPC errors with stable reasons and public paths. Preserve upstream per-item granularity.
- Security fails closed; secrets are references, never plaintext input, storage, output, or logs.
- Bound retry/backoff inside the owning timeout.
- Reuse semantic config types, not strings or bool sets.
- Feature-flag risky mixed-version rollout and remove flags after convergence.
- Bootstrap files wire; packages own behavior.
- Integration tests cross real boundaries; tests assert stable behavior, not paths or incidental text.
Contextual tensions
- Prefer positive config booleans, except negative
disabledwhen the zero value must fail closed. - Exhaustive enum switches reject unknowns; intentional subsets document ignored values.
- gRPC keepalive depends on every intermediary.
- New AIP surfaces use bounded filter strings; preserve established typed filters for compatibility.
- Fakes suit unit tests, never claims of protocol, role, provider, or container compatibility.
Load by task
| Work | Read |
|---|---|
| Protos, handlers, Connect/gRPC, public errors | PROTO-API.md |
| Goroutines, caches, shutdown, shared state | CONCURRENCY.md |
| Errors, logging, metrics | ERRORS.md |
| Tests and CI | TESTING.md |
| Temporal | TEMPORAL.md |
| Tenant input, egress, authz, secrets, destructive ops | SECURITY.md |
| Flags, deprecation, schema removal | ROLLOUT.md |
| Packages, storage, interfaces | STRUCTURE.md |
| Operators and reconcilers | CONTROLLERS.md |
| Go 1.27 APIs and leak profiles | GO-1.27.md |
Hooks warn on unreserved shipped proto removals and floating test images. Review diffs with /golang-review.
04 同仓库更多 Skills
hill-climb
Optimize a defined outcome through bounded evaluation loops. Use for hill-climb requests or repeated improvement against an executable eval, benchmark, or visual comparison; not a one-pass review.
gestures
Build or fix web drag, swipe, sheet, reorder, and hold interactions: direct tracking, rubber banding, release velocity, momentum, snap points, and interruption. Not native React Native or Swift.
hill-climb
Optimize a defined outcome through bounded evaluation loops. Use for hill-climb requests or repeated improvement against an executable eval, benchmark, or visual comparison; not a one-pass review.
gestures
Build or fix web drag, swipe, sheet, reorder, and hold interactions: direct tracking, rubber banding, release velocity, momentum, snap points, and interruption. Not native React Native or Swift.
improve-animations
Audit existing web UI motion and prioritize concrete improvements or self-contained implementation plans. Use for a motion roadmap; animate owns implementation and diff review.
effect-ts
Use when setting up a repository that uses the Effect TypeScript library.