check-linters-before-commit

Run linting, vet, tests, and build checks before committing Go code.

122|13|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/dimetron/pi-go --skill check-linters-before-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-linters-before-commit
Source: https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/check-linters-before-commit
Command: npx skills add https://github.com/dimetron/pi-go --skill check-linters-before-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the enforcement of code quality before commits by executing linters, vet, tests, and a final build check.

Core Features & Use Cases

  • Pre-commit quality gate runs linting, vet, tests, and build verification to catch issues early.
  • Fallback and resilience uses golangci-lint when available, with go vet as a fallback.
  • Workflow alignment integrates with Git workflows to prevent problematic commits.

Quick Start

Run this skill before committing changes to verify linting, vet, tests, and build viability.

Frequently Asked Questions about check-linters-before-commit

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

FAQPage Schema
How do I automate pre-commit checks to run Go linters, vet, and tests?

Automate pre-commit checks by executing linting, vet, tests, and build verification together. This validates code changes before committing by requiring tests to pass and the target binary to build successfully.

Does the pre-commit quality gate work if golangci-lint is not installed?

Yes, the pre-commit quality gate includes a fallback mechanism. It uses go vet for linting if the primary golangci-lint tool is unavailable in your environment.

What is a pre-commit quality gate for Go projects?

A pre-commit quality gate for Go projects is an automated validation step that runs linting, vet, tests, and build verification to catch code issues early before changes are committed.

How do I verify my Go build and tests before committing changes?

Verify your Go build and tests by running an automated pre-commit process that executes linting, vet, and test suites, requiring a successful build of the target binary before committing.

What happens if my Go tests fail during the pre-commit validation?

If Go tests fail during pre-commit validation, the quality gate stops the commit. The process requires tests passing and a successful build of the target binary to prevent problematic changes.