code-validation-standards

Automate Go code validation across pre-commit and pre-push hooks.

1|Updated Jul 16, 2025
One-click install
npx skills add https://github.com/linskybing/platform-go --skill code-validation-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-validation-standards
Source: https://github.com/linskybing/platform-go/tree/main/.github/skills/code-validation-standards
Command: npx skills add https://github.com/linskybing/platform-go --skill code-validation-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill enforces code quality by providing automated validation checks that run before commits and pushes, helping teams catch issues early.

Core Features & Use Cases

  • Pre-commit validation to enforce formatting, vet checks, and quick compile verifications.
  • Pre-push validation to run a broader set of checks including tests and linting.
  • Quick integration with CI to maintain consistent quality across the development workflow.

Quick Start

Use the pre-commit validation script before committing: bash .github/skills/code-validation-standards/scripts/pre-commit-validate.sh. For a full pre-push validation, run: bash scripts/validate-before-push.sh.

Frequently Asked Questions about code-validation-standards

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

FAQPage Schema
How do I automate Go code validation before git commits and pushes?

You can automate Go code validation by running shell scripts that enforce formatting, vet checks, and tests across pre-commit and pre-push hooks. This skill provides scripts to catch issues early before code changes are committed or pushed.

What checks should I run in a pre-push hook for a Go project?

A pre-push hook for Go should run broader checks including tests, race detection, linting, and SQL-injection checks. This skill automates these validations alongside standard Go tooling like go test and optional golangci-lint to ensure code quality before pushing.

Does this pre-commit validation script require golangci-lint to work?

No, golangci-lint is optional. The pre-commit validation script relies on standard Go tooling such as gofmt, go vet, and go build to enforce formatting and quick compile verifications without requiring external linting dependencies.

Can I integrate these code validation gates into my existing CI workflow?

Yes, you can integrate these validation scripts into your CI workflow to maintain consistent quality. The skill provides quick integration with CI by running the same automated validation checks used in pre-commit and pre-push hooks.

How do I run gofmt and go vet checks automatically before committing code?

You can run gofmt and go vet automatically by executing the pre-commit validation script before committing. This script enforces formatting and vet checks to ensure your Go code meets quality standards before changes are committed.

What is the best way to catch race conditions and SQL injection in Go before pushing code?

The best way is to run a pre-push validation script that includes race detection and SQL-injection checks. This skill automates these specific security and concurrency validations alongside standard tests before your code is pushed to the repository.