Go Package Validator skill for Claude and Codex
A pass-or-fail validation gate for a Go package before it merges: build, vet, lint, formatting, module tidiness, and test coverage against your threshold…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a Go package needs a pre-merge quality gate: build, vet, lint, coverage threshold, and the CI script that enforces them in order. Do not use for diagnosing a specific build failure, or writing the tests themselves. Related topics: coding, package.
What it will ask you for
- Package import path (free text, e.g. "github.com/acme/app/pkg/auth")
- Target Go version (choose one: 1.21, 1.22, 1.23, 1.24)
- Verify test coverage (choose one: Yes, No)
- Minimum coverage percentage (number from 0 to 100)
- Lint tools (choose any: staticcheck, golangci-lint, go vet, gofmt, ineffassign, govulncheck)
- Where it runs (choose one: Local pre-commit, GitHub Actions, GitLab CI, Other CI)
- Output format (choose one: Markdown, Plain Text)
How it works
- Order the checks from cheapest to most expensive (format and tidy, build, vet, lint, test with race, coverage) so a failure stops the run early.
- Write the exact command, pass condition, and usual failure reason for every selected check.
- Add the coverage command that compares the total to the threshold and exits non-zero below it, when coverage is on.
- List the structural checks tooling misses: package naming, doc comments on exports, init side effects, and correct use of internal.
- Assemble the gate as a shell script or the CI configuration for the chosen runner and mark each check blocking or advisory.
What you get
A document in the chosen format with sections Checklist (ordered table of command, pass condition, failure reason), Script (shell or CI YAML), and Notes (blocking versus advisory).
What it watches out for
- Running the expensive test suite before gofmt and go vet, which wastes minutes of CI on a change that a two-second check would reject.
- Checking coverage per file rather than the package total the threshold was set against, which fails on trivial files.
- Leaving linter versions unpinned, so the gate breaks when a new staticcheck release adds rules.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.