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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

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

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00062 $0.01375
Opus 5 $0.00031 $0.00687
Sonnet 5 $0.00012 $0.00275
Haiku 4.5 $0.00006 $0.00137

Measured 5d ago against content hash f0c281796c94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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 pathsif 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. 5d 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 yesterday), licensed MIT. It adds 62 tokens to every session and 1,375 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

run-helix-tests

Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.

dotnet/maui · 45 tokens

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

dotnet/skills · 149 tokens

nunit-testing

Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.

nunit/nunit · 51 tokens

detect-flaky-tests

Detects flaky Go tests by analyzing GitHub Actions workflow runs across the last 7 days and all PRs — covering both the run-tests job (unit/integration) and the e2e-test job (gVisor and microVM lanes). For each newly-detected flaky test or infra issue, opens a GitHub issue with full evidence and a draft fix PR. Does…

agent-substrate/substrate · 102 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

add-go-test

Write or extend Go unit tests in this repo. Use when the user asks to add or update Go tests.

authgear/authgear-server · 26 tokens