Go Testing Code Review for Openclaw

A professional code review skill for Go developers that enforces best practices for table-driven tests, subtests, and concurrency-safe testing.

anderskev
v2.3.1
Apr 22, 2026
0
948
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install go-testing-code-review

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install go-testing-code-review using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Go Testing Code Review?

The Go Testing Code Review skill is a specialized tool within the Openclaw Skills ecosystem designed to automate the rigorous inspection of Go test files. It ensures that developers adhere to idiomatic Go patterns, such as version-gated fuzzing (Go 1.18+) and modern loop-variable capture (Go 1.22+). By strictly following a multi-pass workflow, this skill provides actionable feedback on test structure, naming conventions, and resource cleanup.

This skill goes beyond simple linting by analyzing the surrounding context of changes in *_test.go files. It enforces the use of table-driven structures, proper error reporting with got/want comparisons, and safe parallel execution. Whether you are managing complex mocks or high-performance benchmarks, this skill acts as an automated senior reviewer to maintain a high bar for repository test quality.

Go Testing Code Review Use Cases

  • Reviewing pull requests containing new or modified Go test files to ensure idiomatic patterns.
  • Modernizing legacy Go test suites to utilize table-driven structures and t.Cleanup.
  • Validating that parallel tests are properly isolated and do not share mutable state.
  • Enforcing consistent error message formatting and descriptive subtest naming.
  • Checking for proper implementation of Fuzz tests and Benchmarks in performance-critical code.

How Go Testing Code Review Works

  1. The skill identifies the Go version by reading the go.mod file to provide version-appropriate advice.
  2. It reads the full context of test functions (Test, Benchmark, or Fuzz) associated with the code changes.
  3. A specific checklist is scoped based on the code features, such as HTTP handlers or golden files.
  4. The skill references specialized documentation for complex topics like mocking or file structures.
  5. A pre-report verification protocol is executed to ensure findings distinguish between errors and style preferences.
  6. Final findings are reported with severity levels and clear descriptions of why each issue matters.

Go Testing Code Review Setup

To integrate this capability into your workflow, ensure the following directory structure is present in your Openclaw Skills configuration:

# Navigate to your skill directory
cd skills/go-testing-code-review

# Ensure reference docs are available
mkdir -p references
touch references/structure.md references/mocking.md

Ensure the review-verification-protocol is also accessible in the parent directory for strict gate-keeping during the review process.

Go Testing Code Review Data Schema & Taxonomy

The skill utilizes a structured output format for findings and relies on specific reference files for deep-dive analysis.

Data Type Format Description
Findings Text [FILE:LINE] ISSUE_TITLE with Severity and Description.
References Markdown Uses references/structure.md and references/mocking.md.
Versioning SemVer Extracts go X.YY from go.mod for feature gating.
Checklists Boolean Tracks completion of table-driven, parallel, and cleanup checks.

Go Testing Code Review Advanced Features

  • Version-Aware Analysis: Automatically adjusts advice based on the Go version detected in the module.
  • Golden File Support: Detects and reviews the -update flag pattern for regression testing with testdata.
  • Fuzzing & Benchmarking: Provides specialized validation for Fuzz tests (1.18+) and benchmark memory usage.
  • Deep Context Reading: Unlike standard diff tools, it reads entire functions to understand test logic before reporting issues.
  • Severity Grading: Categorizes issues from Informational to Critical to help developers prioritize fixes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*