skills/review-go/SKILL.md
Review Go code for language and runtime conventions: concurrency, context usage, error handling, resource management, API stability, type semantics, and testability. Language-only atomic skill; output is a findings list.
npx skillsauth add nesnilnehc/ai-cortex review-goInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
仅查看 Go 中的代码以了解 语言和运行时约定。不要定义范围(差异与代码库)或执行安全/架构分析;这些是通过范围和cognitive技能来处理的。以标准格式发出结果列表以进行聚合。重点关注并发和 goroutine 生命周期、上下文使用、错误处理、资源管理、API 稳定性、类型和零值语义以及可测试性。
首要目标:生成一个 Go 语言/运行时结果列表,涵盖给定代码范围的并发性、上下文使用、错误处理、资源管理、API 稳定性、类型语义和可测试性。
成功标准(必须满足所有要求):
语言-go)、严重性、标题、描述和可选建议验收测试:输出是否包含以 Go 为中心的结果列表,其中包含 file:line 引用,涵盖所有相关语言/运行时维度,而无需执行安全性、架构或范围分析?
本技能负责:
%w、errors.Is/As 包装,避免因预期错误而出现恐慌)本技能不负责:
review-sql转交点:当所有 Go 发现结果发布后,将其移交给 orchestrate-code-review 进行聚合。对于 SQL 或安全问题,请记下它们并建议适当的cognitive技能。
何时使用:当正在审查的代码是Go并且任务包括语言/运行时质量时。范围(差异与路径)由调用者或用户确定。
%w 包裹;使用 errors.Is/As;避免因预期错误而恐慌;避免错误阴影。defer Close() 用于 io.Closer,resp.Body.Close() 用于 HTTP 响应,Stop() 用于计时器/Ticker,cancel() 用于上下文。不要做这些(其他技能可以处理它们):
review-sql何时停止并交接:
语言-go)、严重性、标题、描述和可选建议输出是否包含以 Go 为中心的结果列表,其中包含涵盖所有相关语言/运行时维度的 file:line 引用,而无需执行安全性、架构或范围分析?
fmt.Errorf("failed: %v", err) 并且调用者将错误与 == 进行比较。%w 包装并使用 errors.Is/As;参考错误构造和比较。类别=语言-go。(*MyStruct)(nil)作为error接口;调用者检查“if err != nil”。development
Generate an LLM agent test suite (golden cases, mock-LLM unit tests, evaluator harness) from an agent implementation and its agent-test contract. Use when an agent has no tests, or a contract exists but the test code is missing.
development
After code changes, auto-detect the project's build system and local deployment method for a given directory, then build the project and restart its locally-deployed environment (Docker Compose / systemd / process manager). Never assumes — asks only when detection is ambiguous. Caches detected commands per project in .cortex/redeploy-local.yaml; re-invocations on the same project skip re-scanning until signal files change, the cache expires (30 days), or the skill version bumps.
tools
Publish a NATS message conforming to a cross-team contract, using NATS MCP tools. Authors the contract on first use if missing. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting basics across sessions.
tools
Drain pending NATS messages from a producer contract via NATS MCP tools (default batch / drain-style). Applies Tolerant Reader semantics and per-message ack/nak/term, returning aggregated stats. Reads project-level cache (.cortex/nats.yaml) to avoid re-prompting.