Source profileQuality 92/100

johnqtcg/awesome-skills/skills/go-test-review/SKILL.md

go-test-review

Review Go test code for quality including table-driven tests, t.Helper usage, assertion completeness, boundary cases, benchmarks, fuzz tests, and coverage targets. Trigger when PR contains _test.go files, test helpers, httptest usage, testing.B, testing.F, or testdata directories. Use for test-quality focused review.

Source repository stars
30
Declared platforms
0
Static risk flags
1
Last source update
2026-08-27
Source checked
2026-08-28

Decision brief

What it does: where it fits

Review Go test code for quality including table-driven tests, t. Helper usage, assertion completeness, boundary cases, benchmarks, fuzz tests, and coverage targets.

Best for

  • PR contains test.go files
  • Code uses httptest, testing.B, testing.F
  • Code includes testdata/ directory changes

Not for

  • Reviewing production code security/performance/logic → use corresponding sibling skill
  • Only implementation code changed, no tests → may note "missing tests" but no deep review

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/johnqtcg/awesome-skills --skill "skills/go-test-review"
Safe inspection promptEditorial

Inspect the Agent Skill "go-test-review" from https://github.com/johnqtcg/awesome-skills/blob/d933bc88237f7a18a7ecf01e5d97a745b083df0f/skills/go-test-review/SKILL.md at commit d933bc88237f7a18a7ecf01e5d97a745b083df0f. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Define scope — identify test.go files in diff. 2. Run go test -cover for impacted packages — record coverage percentage. 3. Load references — always load go-test-quality.md. 4. Evaluate ALL 10 checklist items. 5. Apply suppression → format output.

    Define scope — identify test.go files in diff.Run go test -cover for impacted packages — record coverage percentage.Load references — always load go-test-quality.md.
  2. 02

    Review Discipline

    Test quality only — not production code security/performance/logic

    Test quality only — not production code security/performance/logicExecute ALL 10 checklist itemsCoverage threshold: 80% for business logic packages — flag if below
  3. 03

    Purpose

    Audit Go test code for quality and coverage effectiveness. Reviews HOW tests are written — not the production code being tested.

    Audit Go test code for quality and coverage effectiveness. Reviews HOW tests are written — not the production code being tested.This skill is conditionally triggered — only when test.go files are in the diff. If a PR has only implementation code with no tests, this skill may suggest "missing test coverage" but does not deep-dive.This skill does NOT cover: security, concurrency, performance, quality, error handling, or logic of production code — those belong to sibling vertical skills.
  4. 04

    When To Use

    PR contains test.go files

    PR contains test.go filesCode uses httptest, testing.B, testing.FCode includes testdata/ directory changes
  5. 05

    When NOT To Use

    Reviewing production code security/performance/logic → use corresponding sibling skill

    Reviewing production code security/performance/logic → use corresponding sibling skillOnly implementation code changed, no tests → may note "missing tests" but no deep review- Reviewing production code security/performance/logic → use corresponding sibling skill - Only implementation code changed, no tests → may note "missing tests" but no deep review

Permission review

Static risk signals and limitations

Writes files

medium · line 83

The documentation asks the agent to create, modify, or delete local files.

| 9 | **Golden file testing** | `-update` flag support, `testdata/` directory, deterministic output (no timestamps/random) | Semantic-Only (golden file testing pattern requires understanding test intent) |

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars30SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
johnqtcg/awesome-skills
Skill path
skills/go-test-review/SKILL.md
Commit
d933bc88237f7a18a7ecf01e5d97a745b083df0f
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

Go Test Review

Purpose

Audit Go test code for quality and coverage effectiveness. Reviews HOW tests are written — not the production code being tested.

This skill is conditionally triggered — only when _test.go files are in the diff. If a PR has only implementation code with no tests, this skill may suggest "missing test coverage" but does not deep-dive.

This skill does NOT cover: security, concurrency, performance, quality, error handling, or logic of production code — those belong to sibling vertical skills.

When To Use

  • PR contains _test.go files
  • Code uses httptest, testing.B, testing.F
  • Code includes testdata/ directory changes
  • Need to evaluate test coverage

When NOT To Use

  • Reviewing production code security/performance/logic → use corresponding sibling skill
  • Only implementation code changed, no tests → may note "missing tests" but no deep review

Mandatory Gates

1) Go Version Gate

Read go.mod. Key version gates:

FeatureMinimum GoCaveat
t.Setenv1.17Cannot combine with t.Parallel() — panics on every Go version (process-wide env)
Fuzz testing (testing.F)1.18
Loop variable fix1.22Affects t.Parallel() + loop variable capture
t.Chdir1.24Added 1.24; like t.Setenv, panics if combined with t.Parallel()

2) Anti-Example Suppression Gate

MUST quote specific evidence. Category match alone insufficient.

Embedded anti-examples:

  • "Testing standard library behavior" — test that json.Marshal produces valid JSON, or that strings.Contains works. These test Go's stdlib, not your code.
  • "Test only asserts err == nil" — BUT: do NOT flag if function genuinely has no meaningful return value (void-like operations where error is the only output, e.g., Close(), Flush()).
  • "Should use integration test" — when unit test with mock is the correct choice for fast, isolated testing. Not every test needs a real database.
  • "Missing test for unexported function" — when function is simple helper fully covered by exported function tests.
  • "Missing benchmark" — when code is not on a hot path and benchmarking provides no actionable insight.

3) Generated Code Exclusion Gate

mock_*.go from mockgen: review for usage patterns only, not mock implementation itself.

Workflow

  1. Define scope — identify _test.go files in diff.
  2. Run go test -cover for impacted packages — record coverage percentage.
  3. Load references — always load go-test-quality.md.
  4. Evaluate ALL 10 checklist items.
  5. Apply suppression → format output.

Grep-Gated Execution Protocol

This skill uses mechanical grep pre-scanning to guarantee zero missed checklist items. 8 of 10 items are grep-gated; 2 are semantic-only.

Execution Order

  1. Identify target test files (from dispatch prompt)
  2. Run grep for all grep-gated checklist items against target files
  3. HIT → run semantic analysis to confirm or reject
  4. MISS → auto-mark NOT FOUND, skip semantic analysis
  5. For compound patterns (items 1, 2): run both grep patterns, apply logic
  6. For semantic-only items (items 4, 9): full model reasoning
  7. Report only FOUND items

Grep Audit Line

Include in Execution Status: Grep pre-scan: X/8 items hit, Z confirmed as findings (2 semantic-only)

Test Quality Checklist (10 Items)

#ItemWhat to CheckGrep Pattern
1Table-driven testsTable-driven pattern with meaningful subtest names: t.Run(tc.name, ...)func Test|t\.Run (compound: check if table-driven pattern used)
2t.Helper()Test helper functions call t.Helper() for accurate failure line reportingfunc\s+\w+.*\*testing\.T\b (compound: AND NOT t\.Helper\(\) in function body)
3Assertion completenessNot just err == nil — verify return values, error types, side effects, field valuesassert\.|require\.|if.*!=|if.*==
4Boundary case coveragenil/zero, empty collection, single element, boundary values, Unicode, concurrent accessSemantic-Only (boundary case coverage requires understanding domain context)
5Minimal mocks/stubsMinimal interface mocks; prefer hand-written doubles; mock at boundary, not internalmock\.|Mock|Stub|fake|Fake
6Benchmark correctnessb.ResetTimer() after setup, b.ReportAllocs(), b.RunParallel() for concurrent benchmarkstesting\.B|b\.Run|b\.ResetTimer|b\.ReportAllocs
7Fuzz testingSeed corpus provided, invariant-based assertions (not exact match), no external deps in targettesting\.F|f\.Fuzz|f\.Add
8HTTP handler testinghttptest.NewRecorder (unit) or httptest.NewServer (integration); check status + body + headershttptest\.|NewRecorder|NewServer
9Golden file testing-update flag support, testdata/ directory, deterministic output (no timestamps/random)Semantic-Only (golden file testing pattern requires understanding test intent)
10Coverage >= 80%Business logic packages must hit 80%+; not required for generated code, wire/DI glue, or main.gogo test.*-cover|coverage (or check test existence for changed packages)

Severity Rubric

High — Missing critical coverage (changed behavior untested), assertion that can never fail (false confidence).

Medium — Test quality issue reducing diagnostic value but not creating false confidence.

Evidence Rules

  • For coverage gaps: identify which changed behavior lacks test coverage
  • For weak assertions: show what the test checks vs what it should check
  • For false-confidence: show why the assertion always passes regardless of implementation
  • Merge rule: same pattern at ≥3 tests → one finding with location list

Output Format

Findings

[High|Medium] Short Title

  • ID: TEST-NNN
  • Location: path:line
  • Impact: What could be missed by this test gap
  • Evidence: Missing assertion/boundary/pattern
  • Recommendation: Specific test improvement with code example
  • Action: must-fix | follow-up

Suppressed Items

[Suppressed] Short Title

  • Reason: Anti-example matched + evidence cited

Execution Status

  • Go version: X.Y
  • Grep pre-scan: X/8 items hit, Z confirmed as findings (2 semantic-only)
  • go test -cover: coverage% for impacted packages
  • References loaded: list

Summary

1-2 lines. Count by severity + coverage status.

Example Output

### Findings

#### [High] False-Confidence Assertion — Only Checks err == nil
- **ID:** TEST-001
- **Location:** `internal/service/user_test.go:45`
- **Impact:** Test passes even if CreateUser returns wrong user — only error checked, return value ignored
- **Evidence:** `err := svc.CreateUser(ctx, input); assert.NoError(t, err)` — no assertion on returned User (name, email, ID)
- **Recommendation:**
  ```go
  user, err := svc.CreateUser(ctx, input)
  assert.NoError(t, err)
  assert.Equal(t, input.Name, user.Name)
  assert.Equal(t, input.Email, user.Email)
  assert.NotEmpty(t, user.ID)
  • Action: must-fix

[Medium] Missing Boundary Cases in Table-Driven Test

  • ID: TEST-002
  • Location: internal/validator/email_test.go:20-55
  • Impact: Edge cases could slip through — only happy path and obvious invalid tested
  • Evidence: Cases: "[email protected]", "invalid", "" — missing: Unicode local part, max-length (254 chars), consecutive dots, leading/trailing spaces
  • Recommendation: Add: {"unicode: ü@domain.com", true}, {"max-length-254", ...}, {" [email protected]", false}
  • Action: follow-up

Execution Status

  • Go version: 1.21
  • go test -cover: internal/service 72%, internal/validator 85%
  • References loaded: go-test-quality.md

Summary

1 High (false-confidence assertion), 1 Medium (missing boundary cases). Coverage: service 72% (below 80% threshold).


## No-Finding Case
If no issues found: state `No test quality findings identified.` Still output coverage numbers in Execution Status.

## Load References Selectively

| Reference | Load When |
|-----------|-----------|
| `references/go-test-quality.md` | Always |
| `references/go-review-anti-examples.md` | Always |

## Review Discipline
- **Test quality only** — not production code security/performance/logic
- Execute ALL 10 checklist items
- Coverage threshold: 80% for business logic packages — flag if below
- Do not review mock implementation code (generated mocks); review mock usage patterns

Frequently asked questions

What to verify before installation and use

What does the go-test-review source document cover?

Review Go test code for quality including table-driven tests, t. Helper usage, assertion completeness, boundary cases, benchmarks, fuzz tests, and coverage targets.

How do I install go-test-review?

The source record exposes this install command: npx skills add https://github.com/johnqtcg/awesome-skills --skill "skills/go-test-review". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged write-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10029,236

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10025,136

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,277

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 991,260

vipshop/cache-dit

cache-dit-model-integration

High-level guide for integrating a new DiT model into cache-dit: Cache (BlockAdapter/ForwardPattern), Context Parallelism, Tensor Parallelism, Text Encoder Parallelism (TE-P), VAE Parallelism (VAE-P), generate CLI, installation, testing workflow, and detailed references. Use when adding support for a new diffusion transformer model in cache-dit.