一键导入
go-expert
Go gotchas and decision criteria. Covers error handling patterns, concurrency pitfalls, and interface design.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Go gotchas and decision criteria. Covers error handling patterns, concurrency pitfalls, and interface design.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
CRITICAL: MUST run for EVERY message. Detects agent, complexity, AND model automatically. Without this, tasks route to wrong agents and use wrong models, degrading quality and wasting tokens.
5 techniques for different problem types. Use when stuck or facing complex challenges.
Structured thinking process for complex analysis. Supports revision, branching, and dynamic adjustment.
Angular 17+ gotchas and decision criteria. Covers signals vs observables, standalone patterns, and common pitfalls Claude gets wrong.
Designs RESTful APIs with endpoint naming, versioning strategies (URL path, header-based), pagination (offset and cursor), error response schemas, and OpenAPI conventions. Use when the user asks about REST API design, creating endpoints, URL structure, API versioning, status codes, Swagger, or OpenAPI specs.
Fast bug fixes with root cause investigation + TDD. Enforces 'no fix without root cause' discipline and verification protocol. Without this skill, fixes are applied at symptoms instead of sources, and bugs return.
| name | go-expert |
| description | Go gotchas and decision criteria. Covers error handling patterns, concurrency pitfalls, and interface design. |
| autoInvoke | false |
| priority | high |
| triggers | ["golang","go","gin","echo","fiber"] |
| paths | ["**/*.go","go.mod","go.sum"] |
| allowed-tools | Read, Grep, Glob, Edit, Write |
| user-invocable | false |
AI-consumed reference. Optimized for Claude to read during execution. Human-readable explanation: see docs/architecture/HIERARCHICAL_PLANNING.md or docs/getting-started/ depending on topic.
Use Context7 for Go framework docs.
decisions[4]{choice,use_when}:
Gin vs Echo vs Fiber,"Gin: most popular/stable. Echo: cleaner API. Fiber: highest perf (Express-like)"
Interface location,"Define in CONSUMER package not provider. Accept interfaces return structs"
Channel vs Mutex,"Channel for communication between goroutines. Mutex for protecting shared memory"
Table-driven vs subtests,"Table-driven for input variations. Subtests (t.Run) for distinct scenarios"
err != nil check EVERY error return — never ignore with _%w for wrapping errors (unwrappable), %v for formatting only (not unwrappable)defer evaluates args immediately but executes LIFO — defer f.Close() captures current ffor _, v := range items { go func() { use(v) }() } captures same v. Fixed in Go 1.22+nil slice vs empty slice: var s []int (nil, marshals to null) vs s := []int{} (empty, marshals to [])context.Background() for top-level, context.TODO() as placeholder. Always pass context as first param-race flag in tests. go test -race ./...sync.WaitGroup: Add() before goroutine launch, not inside it