go-validation
Skill1 starsChanged 10 days agoApache-2.0View on GitHub
Validate Go formatting, linting, tests, and vulnerabilities for maintainable and secure code delivery. Use when committing Go changes, running CI validation, or debugging failing checks in repositories.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .apm/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- .cursor/rules/agent-skills.mdcCursor rule
- .cursor/rules/bats.mdcCursor rule
- .cursor/rules/github-actions-workflow.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/go-test.mdcCursor rule
- .cursor/rules/instructions.mdcCursor rule
- .cursor/rules/markdown.mdcCursor rule
- .cursor/rules/shell-script.mdcCursor rule
- .cursor/rules/terraform.mdcCursor rule
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
- agent-skills-reviewSkill
- changelogSkill
- ci-sweeperSkill
- docs-creatorSkill
- docs-updaterSkill
- github-actions-reviewSkill
- github-actions-validationSkill
- github-issue-autofixSkill
- github-issue-triageSkill
- github-pr-bodySkill
- github-pr-reviewSkill
- github-pr-reviseSkill
- go-reviewSkill
- go-validationSkill
- instructions-reviewSkill
- loop-verifierSkill
- markdown-validationSkill
- refactorSkill
- shell-script-reviewSkill
- shell-script-validationSkill
- tech-debtSkill
- test-gapSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
run deterministic Go validation before commit or merge
- Distinctive: line 39
check blocking validation status and the (non-blocking) coverage threshold warning
- Very specific: line 60
Use --verbose to collect tool-level diagnostics.
- Very specific: line 61
Use --fix only for formatting, go mod tidy, and linter auto-fixes, then review diffs.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Input
- Go path or directory (required)
- Validation script (required):
scripts/validate.sh(run from the go-validation skill directory) --fix(optional): appliesgo mod tidyand golangci-lint auto-fixes in place--verbose(optional): tool-level diagnostics and benchmark tests--skip-tests(optional): skip go test, race, and coverage checks--dry-run(optional): print planned commands without running them
Output Specification
Return structured Markdown in accordance with references/common-output-format.md. That file is the source of truth for the output contract.
Structured validation results in fixed tool order.
Execution Scope
- Always use
scripts/validate.shfor comprehensive validation. Do not run individual commands. - Individual commands are for debugging only (see references/common-individual-commands.md).
- The script runs every step even after a failure (no fail-fast); see references/common-checklist.md for order and skip conditions.
- Do not modify source files except through
--fix. - Do not create or delete files.
USE FOR:
- run deterministic Go validation before commit or merge
- reproduce CI failures for Go format/lint/test/vulnerability checks
- check blocking validation status and the (non-blocking) coverage threshold warning
DO NOT USE FOR:
- perform architecture or design reviews
- generate new source code as a primary task
- validate non-Go projects
Reference Files Guide
- common-checklist.md (always read)
- common-output-format.md (always read)
- common-troubleshooting.md (read on failure)
- common-individual-commands.md (read on debugging)
- category-security.md (read on failure)
- category-testing.md (read on failure)
Workflow
- Run
bash scripts/validate.sh. - For fast iteration, run
bash scripts/validate.sh <path>where<path>is a Go package or directory. - Use
--verboseto collect tool-level diagnostics. - Use
--fixonly for formatting,go mod tidy, and linter auto-fixes, then review diffs. - Retry at most 2 times after fixes; if checks still fail, return blocking failures and stop.
Error Handling
| Condition | Severity | Action |
scripts/validate.sh missing | Fatal | Stop; report missing script |
| No Go files under target path | Info | Script exits non-zero before any check (No Go files found); report no reviewable Go code and stop |
go or golangci-lint missing | Fatal | Stop; report the missing binary; set Status: ❌ FAIL |
govulncheck missing | Recoverable | Script logs govulncheck not installed and skips it, but its final Result block still prints ✅ for govulncheck; trust the warning and report govulncheck as ⊘ Skipped (not installed) |
| Single tool fails, others succeed | Recoverable | Report every tool; mark the failed tool ❌ Fail with exit status |
| All tools fail | Fatal | Set Status: ❌ FAIL with per-tool stderr summaries in ## Error Details |
common-checklist.md unavailable | Fatal | Stop; report missing dependency |
common-output-format.md unavailable | Recoverable | Note missing file; emit ## Summary, ## Tool Results, and ## Error Details only |
Examples
- Prompt:
Validate Go formatting, lint, tests, and vulnerabilities - Command:
bash scripts/validate.sh --verbose - Result: Structured report per references/common-output-format.md (per-tool pass/fail).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

