Agent Skillsinstructa/agent-skills › go-local-health

go-local-health

GitHub

为包含 go.mod 的 Go 仓库提供本地健康检查工作流,包括快速快照、交互式测试循环和覆盖率探索。支持使用 lazygotest、gocovsh 和 golangci-lint 等工具执行测试、覆盖率和静态分析。

skills/go/go-local-health/SKILL.md instructa/agent-skills

Trigger Scenarios

用户要求运行本地 Go 测试、覆盖率或 lint 检查 用户希望获取 Go 项目的快速健康状态报告

Install

npx skills add instructa/agent-skills --skill go-local-health -g -y
More Options

Non-standard path

npx skills add https://github.com/instructa/agent-skills/tree/main/skills/go/go-local-health -g -y

Use without installing

npx skills use instructa/agent-skills@go-local-health

指定 Agent (Claude Code)

npx skills add instructa/agent-skills --skill go-local-health -a claude-code -g -y

安装 repo 全部 skill

npx skills add instructa/agent-skills --all -g -y

预览 repo 内 skill

npx skills add instructa/agent-skills --list

SKILL.md

Frontmatter
{
    "name": "go-local-health",
    "description": "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."
}

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 go.mod exists in the repo root before running anything. If missing, stop and ask.
  • 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., tools.go or go.mod tool directives). If tools are missing and no pins exist, ask before installing or adding pins.
  • Required tools vary by mode:
    • Quick Snapshot: go, tparse, golangci-lint
    • Interactive Test Loop: lazygotest
    • Coverage Explorer: gocovsh If any required tool is missing, ask to install rather than using substitutes.
  • 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:

  1. Run tests with coverage and a one-screen summary:
go test -cover -json ./... | tparse
  1. 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 cover.out is required or preferred, generate it first:
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.

Version History

  • 11dfe69 Current 2026-08-20 11:31

Same Skill Collection

skills/delegation/delegate-fable/SKILL.md
skills/delegation/delegate-grok/SKILL.md
skills/delegation/delegate-sol/SKILL.md
skills/design/redesign-my-landingpage/SKILL.md
skills/electron/electron-live-test/SKILL.md
skills/engineering/architecture-ownership/SKILL.md
skills/engineering/clarify/SKILL.md
skills/engineering/consolidate-test-suites/SKILL.md
skills/engineering/find-duplicate-ownership/SKILL.md
skills/engineering/hard-cut/SKILL.md
skills/engineering/root-cause-finder/SKILL.md
skills/engineering/search-context/SKILL.md
skills/git/gitwhat/SKILL.md
skills/release/homebrew-publish/SKILL.md
skills/security/package-security-check/SKILL.md
skills/security/secleak-check/SKILL.md
skills/shell/shellck/SKILL.md
skills/specs/app-spec-packager/SKILL.md

Metadata

Files
0
Version
11dfe69
Hash
635f3967
Indexed
2026-08-20 11:31

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 12:01
浙ICP备14020137号-1 $방문자$