go-validation

Run Go validation workflow with lint, tests, and security checks.

1|Updated Dec 8, 2025
One-click install
npx skills add https://github.com/y-miyazaki/arc --skill go-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-validation
Source: https://github.com/y-miyazaki/arc/tree/main/.github/skills/go-validation
Command: npx skills add https://github.com/y-miyazaki/arc --skill go-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, go, golangci-lint, govulncheck, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the validation and testing of Go code to ensure code quality before commits, reducing integration risk and speeding up the review process.

Core Features & Use Cases

  • Comprehensive validation pipeline: tidy, fmt, vet, golangci-lint, and tests with race detection and coverage, plus security checks via govulncheck.
  • Pre-commit quality gate: Enforces style, dependency hygiene, and test coverage for Go projects before merging.
  • Use Case: When preparing a PR in a Go project, run the script to automatically verify formatting, dependencies, and test coverage, catching issues early.

Quick Start

Run the validation script to perform the full Go validation workflow: bash go-validation/scripts/validate.sh

Frequently Asked Questions about go-validation

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

FAQPage Schema
How do I automate Go code validation and testing before a commit?

Automate Go code validation by running a script that executes go mod tidy, go fmt, go vet, golangci-lint, go test with race and cover, and govulncheck. This pipeline enforces code quality and security before merging changes.

What does the golangci-lint and govulncheck workflow check in a Go project?

The golangci-lint check enforces formatting and static analysis rules, while govulncheck scans dependencies for known security vulnerabilities. Together they ensure dependency hygiene and security within the Go validation workflow.

Do I need the Go toolchain installed to run go-validation scripts?

Yes, you need the Go toolchain installed. The validation script requires the bash shell and the Go environment to execute commands like go fmt, go vet, go test, and to run the golangci-lint and govulncheck binaries.

How do I enforce a minimum test coverage threshold for Golang projects?

Enforce minimum test coverage by running the validation script which executes go test with the cover flag. The pipeline fails if the project's test coverage drops below the configured threshold before a commit is accepted.

Can I run race detection and coverage checks together in Go testing?

Yes, the validation pipeline runs go test with both race and cover flags simultaneously. This detects data races while measuring code coverage, ensuring thread safety and adequate test completeness.

Why does my Go CI pipeline fail due to dependency issues or formatting errors?

Go CI pipelines fail on dependency or formatting errors when go mod tidy or go fmt detect unformatted code or unused modules. Running the validation script locally catches these issues before committing.