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.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
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.
description_zh
按 Go 语言与运行时规范审查代码:并发、context、错误处理、资源管理、API 稳定性、类型语义、可测性。
tags
["code-review","language"]
version
1.0.0
license
MIT
recommended_scope
project
metadata
{"author":"ai-cortex"}
triggers
["review go"]
input_schema
{"type":"code-scope","description":"Source files or directories to review"}
output_schema
{"type":"findings-list","description":"Zero or more findings with location, category, severity, and suggestion"}
技能(Skill):审查 Go(Review Go)
目的 (Purpose)
仅查看 Go 中的代码以了解 语言和运行时约定。不要定义范围(差异与代码库)或执行安全/架构分析;这些是通过范围和cognitive技能来处理的。以标准格式发出结果列表以进行聚合。重点关注并发和 goroutine 生命周期、上下文使用、错误处理、资源管理、API 稳定性、类型和零值语义以及可测试性。
核心目标(Core Objective)
首要目标:生成一个 Go 语言/运行时结果列表,涵盖给定代码范围的并发性、上下文使用、错误处理、资源管理、API 稳定性、类型语义和可测试性。
成功标准(必须满足所有要求):
✅ Go-only 范围:仅审查 Go 语言和运行时约定;未执行范围选择、安全性或架构分析
✅ 涵盖所有七个 Go 维度:在相关的情况下评估并发/goroutine 生命周期、上下文使用、错误处理、资源管理、API 稳定性、类型/零值语义和可测试性
✅ 符合调查结果格式:每个调查结果包括位置、类别(语言-go)、严重性、标题、描述和可选建议
✅ 文件:行引用:所有发现都引用带有行号的特定文件位置
✅ 排除非 Go 代码:除非明确在范围内,否则不会分析非 Go 文件的 Go 特定规则
验收测试:输出是否包含以 Go 为中心的结果列表,其中包含 file:line 引用,涵盖所有相关语言/运行时维度,而无需执行安全性、架构或范围分析?