CO-LOCATED GO TESTS WITH SCOPED COVERAGE AND REAL-BUG FIXING!
A Claude Code skill generating co-located Go black-box tests for exported APIs, running and fixing them to green, applying minimal source fixes for confirmed bugs, and reporting scoped coverage
git clone https://github.com/pardnio/skill-go-test-generate ~/.claude/skills/go-test-generate· Documentation
- Folder-Scoped Black-Box Tests — Generates external
<pkg>_testtests co-located with source for exported funcs of a required target folder. - Git-Clean Candidates Only — Skips files with staged, unstaged, or untracked changes so generated tests target stable APIs.
- FRESH / AUGMENT / SKIP Modes — New file for untested sources, append-and-dedupe into an existing external test file, or skip internal white-box test files.
- Run-and-Fix with Source-Bug Triage — Up to 3 repair attempts; fixes the test for test-side errors, applies a minimal source fix for confirmed crashes or contract violations flagged
SOURCE MODIFIED. - Scoped Coverage Report — Profiles the folder via
mktempwithout touching the working tree and reports total + per-func coverage.
graph TB
A[User runs /go-test-generate <dir>] --> B[SKILL.md contract]
B --> C[Phase 0-5 pipeline]
C --> D[<dir>/<file>_test.go]
C --> E[scoped coverage report]
This project is licensed under the MIT LICENSE.