review-go

Analyze Go code for concurrency, context, error, and resource issues.

7|3|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/nesnilnehc/ai-cortex --skill review-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-go
Source: https://github.com/nesnilnehc/ai-cortex/tree/main/skills/review-go
Command: npx skills add https://github.com/nesnilnehc/ai-cortex --skill review-go

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Review Go code for language and runtime conventions to surface issues in concurrency, context handling, error propagation, and resource management.

Core Features & Use Cases

  • Goroutine lifecycle and synchronization: identify leaks, improper cancellation, and data races.
  • Context usage and cancellation: ensure contexts are passed and not stored in long-lived structs.
  • Error handling and propagation: verify wrapping with %w and proper use of errors.Is/As.
  • Resource management: ensure proper closing of resources and cleanup.
  • API stability and testing: check exported types and testability.
  • Use cases include Go project audits, pre-PR checks, and continuous quality improvement.

Quick Start

Provide the Go code scope you want reviewed and the skill will return a findings list focused on concurrency, context usage, errors, and resource management.

Frequently Asked Questions about review-go

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check for goroutine leaks and data races in Go code?

To check for goroutine leaks and data races in Go code, analyze goroutine lifecycle and synchronization to identify leaks, improper cancellation, and data races. The review surfaces concurrency issues with specific locations and suggestions.

How do I ensure proper context usage and cancellation in Go?

Ensuring proper context usage in Go involves verifying that contexts are passed correctly and not stored in long-lived structs. The review checks context handling to prevent leaks and ensure proper cancellation propagation.

What is the best way to review Go error handling and propagation?

Reviewing Go error handling involves verifying proper error wrapping with %w and the correct use of errors.Is and errors.As. The analysis checks error propagation to ensure errors are surfaced and handled correctly.

Can I run a pre-PR check on a specific file scope in Go?

Yes, you can run a pre-PR check on specific Go file scopes. The review accepts files, directories, or diffs as input and outputs a findings list with location, category, severity, and suggestions for each issue.

How do I verify proper resource management and cleanup in Go?

Verifying resource management in Go requires checking that resources like files and connections are properly closed and cleaned up. The review ensures proper closing of resources to prevent leaks.

What are common concurrency issues when auditing Go projects?

Common concurrency issues when auditing Go projects include goroutine leaks, improper cancellation, data races, and incorrect context handling. The review identifies these issues by assessing goroutine lifecycle and synchronization.