Claude-skill-registry go-local-health
Run local Go health checks (tests, coverage, lint) in Go repositories that contain go.mod/go.sum. Use when the user asks to run or interpret local Go test/coverage/lint workflows using tools like lazygotest, gocovsh, tparse, and golangci-lint. Do not use for Rust or non-Go projects.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/go-local-health" ~/.claude/skills/majiayu000-claude-skill-registry-go-local-health && rm -rf "$T"
manifest:
skills/data/go-local-health/SKILL.mdsource content
Go Local Health
Overview
Provide a consistent, repeatable local workflow for Go test, coverage, and lint checks. Use this to run fast snapshots, interactive test loops, and coverage inspection without re-deriving commands.
Guardrails (language + tooling)
- Confirm
exists in the repo root before running anything. If missing, stop and ask.go.mod - Run commands from the repo root so module settings and tooling config are discovered.
- Respect the repo’s Go toolchain configuration (
+go.mod
).toolchain - Prefer repo-pinned tool versions (e.g.,
ortools.go
tool directives). If tools are missing and no pins exist, ask before installing or adding pins.go.mod - Required tools vary by mode:
- Quick Snapshot:
,go
,tparsegolangci-lint - Interactive Test Loop:
lazygotest - Coverage Explorer:
If any required tool is missing, ask to install rather than using substitutes.gocovsh
- Quick Snapshot:
- All automated runs must be non-interactive. Only launch TUIs when the user explicitly requests them.
Workflow Decision Tree
- Use Quick Snapshot when you want a fast read on tests + coverage + lint.
- Use Interactive Test Loop when you are actively iterating on tests.
- Use Coverage Explorer when you need to inspect coverage hotspots in detail.
- If the repo is large, ask whether to scope to a package path before running full
../...
Quick Snapshot (tests + coverage + lint)
Preferred (scripted, deterministic):
~/.codex/skills/go-local-health/scripts/go-local-health --scope ./...
Manual fallback:
- Run tests with coverage and a one-screen summary:
go test -cover -json ./... | tparse
- Run lint with the repo’s configuration:
golangci-lint run ./...
If a narrower scope is requested, replace
./... with the specific package path.
Interactive Test Loop (lazygotest)
- Launch from the repo root:
lazygotest
- Use the UI to filter packages and re-run tests while editing code.
Coverage Explorer (gocovsh)
- Launch from the repo root:
gocovsh
- If a
is required or preferred, generate it first:cover.out
go test -coverprofile=cover.out ./...
Reporting Back to the User
- Summarize failing packages, error types, and coverage gaps.
- If lint fails, report the top categories (not every line) and ask whether to fix now.
- If coverage is low, identify the worst packages and suggest next steps only if asked.
Non-Goals
- Do not run in non-Go repos.
- Do not swap in other tools or skip required checks.
- Do not change CI configuration or code unless the user asks.