ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 5/5

go-code-review

Reviews Go code for idiomatic patterns, error handling, concurrency safety, and common mistakes. Use when reviewing .go files, checking error handling, goroutine usage, or interface design. Covers generics (Go 1.18+), errors.Join and slog (Go 1.21+), and Go 1.22 loop variable semantics.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/anderskev/go-code-review
Or

What This Skill Does

The go-code-review skill provides an automated, expert-level static analysis framework for the Go programming language. It is designed to act as an on-demand senior engineer, evaluating Go code against industry best practices. Unlike simple linters, this skill focuses on architectural integrity, concurrency safety, and the nuances of the Go runtime across different version releases. It ensures that error handling, resource lifecycle management, and interface design align with idiomatic Go standards.

Installation

To integrate this skill into your environment, execute the following command in your terminal: clawhub install openclaw/skills/skills/anderskev/go-code-review Once installed, the agent will have the ability to inspect files within your project workspace and provide feedback based on the established review workflow.

Use Cases

  • Pre-PR Analysis: Run the skill on a feature branch before opening a Pull Request to catch concurrency bugs or missing error checks.
  • Legacy Refactoring: Identify opportunities to upgrade code to modern Go standards, such as replacing old loggers with slog or simplifying logic with errors.Join.
  • Dependency Audit: Analyze how your service consumes external interfaces to ensure they are defined by the consumer, keeping your packages loosely coupled.
  • Resource Lifecycle Review: Specifically useful for checking that file handles, database connections, and HTTP response bodies are correctly managed with defer.

Example Prompts

  1. "Review the internal/processor package for concurrency safety and ensure all goroutines are properly cleaned up."
  2. "Check the current error handling in main.go. I'm running Go 1.21, so please suggest where I can improve using errors.Join."
  3. "Is this interface design idiomatic for Go? I have a large Manager interface that I think needs breaking down into smaller, consumer-driven components."

Tips & Limitations

The skill relies heavily on your go.mod file to determine the Go version. Always ensure your workspace is up to date, as the reviewer will skip version-specific optimizations (like loop variable capture fixes) if it detects an older version. The skill is optimized for logic and pattern analysis; while it excels at catching subtle race conditions and resource leaks, it is not a replacement for unit tests or full-scale dynamic race detectors. Always verify critical changes with the suggested verification protocol before applying them to production codebases.

Metadata

Author@anderskev
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-anderskev-go-code-review": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#golang#code-review#backend#static-analysis
Safety Score: 5/5

Flags: file-read