go-test-coverage

go-test-coverage is a skill for Claude Code, Codex from gopherguides/gopher-ai. It costs 62 tokens per session (1,375 once invoked), scanned A, original, MIT.

A tool for checking which parts of a Go project are covered by automated tests and where tests are missing. It looks for untested exported functions, error paths, and edge cases, then recommends test cases and can create test-file stubs.

In plain words
What is it for?
Improving test coverage in Go projects, identifying missing tests, suggesting table-driven test cases, and generating starting points for new test files.
Why use it?
It shows gaps that a basic test run may not make obvious. Coverage means the proportion of code exercised by tests; higher coverage alone does not guarantee correctness, but gaps indicate areas needing attention.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .github/skills/scripts/coverage-report.sh [minimum-coverage-percent].

Good fit Improving test coverage in Go projects, identifying missing tests, suggesting table-driven test cases, and generating starting points for new test files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gopherguides/gopher-ai
agentmods
npx agentmods add skills/gopherguides/gopher-ai/go-test-coverage

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/gopherguides/gopher-ai/go-test-coverage/github.svg)](https://agentmods.dev/skills/gopherguides/gopher-ai/go-test-coverage)
Your own site
<a href="https://agentmods.dev/skills/gopherguides/gopher-ai/go-test-coverage"><img src="https://agentmods.dev/badge/skills/gopherguides/gopher-ai/go-test-coverage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-test-coverage

Your own site · 80×15
<a href="https://agentmods.dev/skills/gopherguides/gopher-ai/go-test-coverage"><img src="https://agentmods.dev/badge/skills/gopherguides/gopher-ai/go-test-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,375 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.01375
Opus 5.5 $0.00025 $0.00550
Sonnet 5.5 $0.00012 $0.00275
Haiku 4.5 $0.00006 $0.00137

Measured 3mo ago against content hash f0c281796c94, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

go-test-coverage scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s -H "Authorization: Bearer $GOPHER_GUIDES_API_KEY" \
agent-skills/skills/go-test-coverage/SKILL.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Test Coverage

Test coverage gap analysis and recommendations for Go projects. Identifies missing or insufficient test coverage and generates actionable recommendations.

What It Does

  1. Coverage Analysis — Runs go test -cover and parses results
  2. Gap Identification — Finds untested exported functions, error paths, and edge cases
  3. Recommendation Engine — Suggests specific test cases using table-driven patterns
  4. Stub Generation — Creates ready-to-use test file stubs

Steps

API Integration (Optional)

If GOPHER_GUIDES_API_KEY is set, verify it:

curl -s -H "Authorization: Bearer $GOPHER_GUIDES_API_KEY" \
  https://gopherguides.com/api/gopher-ai/me

If not set, local analysis tools (go vet, staticcheck, golangci-lint) still provide comprehensive analysis. Set the key for enhanced API-powered insights. Get your key at gopherguides.com.

1. Measure Current Coverage

# Generate coverage profile
go test -coverprofile=coverage.out ./...

# View per-function coverage
go tool cover -func=coverage.out

# Generate HTML report (optional)
go tool cover -html=coverage.out -o coverage.html

2. Identify Gaps

Parse coverage output to find:

  • Untested exported functions — Any func with 0% coverage
  • Partially covered functions — Functions with branches not hit
  • Untested error paths — if err != nil blocks never executed
  • Missing edge cases — Boundary conditions not exercised
# Find functions with 0% coverage
go tool cover -func=coverage.out | grep "0.0%"

# Find exported functions without test files
for f in $(find . -name "*.go" ! -name "*_test.go" -path "*/pkg/*" -o -name "*.go" ! -name "*_test.go" -path "*/internal/*"); do
  dir=$(dirname "$f")
  base=$(basename "$f" .go)
  if [ ! -f "${dir}/${base}_test.go" ]; then
    echo "Missing test file: ${dir}/${base}_test.go"
  fi
done

3. Generate Recommendations

For each untested function, recommend:

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 197 lines · 62 tokens per session scan A f0c281796c94

Subscribe to this mod's changes

go-test-coverage is a skill published in the GitHub repository gopherguides/gopher-ai (21 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 1,375 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

go-test-coverage compared with skills from other repositories

go-test-coverage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-test-coveragegopherguides/gopher-aiSkill213d agoMITA62Claude Code, Codex
test-masterJeffallan/claude-skillsSkill13ktodayMITA104Claude Code
migrate-xunit-to-xunit-v3dotnet/skillsSkill6.4ktodayMITA149Claude Code
go-testingGentleman-Programming/gentle-aiSkill9.7kyesterdayMITA26Claude Code, Codex
dart-testdartsim/dartSkill1.2kyesterdayBSD-2-ClauseA18Claude Code, Codex
test-generatorrshankras/claude-code-apple-skillsSkill91822d agoMITA33Claude Code
restore-internals-seams-in-finally-blocks-after-each-testZaxbyHub/opencode-swarmSkill549todayMITA26OpenCode