go-blackboxlisted
Install: claude install-skill sgaunet/claude-plugins
# Go Black Box Test Enforcement
Detect Go test files using white box testing (same package name) and propose conversion to black box testing (`package foo_test`). Creates `export_test.go` bridge files when internal symbols need external test access.
## When to Use
- Creating new test files (enforce black box from the start)
- Reviewing existing test files in a Go project
- User asks to audit or improve test quality
- The golang-pro agent encounters `*_test.go` files during implementation
- The golang-pro agent encounters goroutine-spawning code while writing or reviewing tests
## Prerequisites
1. **go.mod exists**: Abort if missing.
2. **Go source files exist**: At least one `.go` file and one `*_test.go` file to analyze.
## Workflow: Detect White Box Tests
### Step 1: Scan Test Files
Use Glob to find all test files:
```
**/*_test.go
```
Exclude `vendor/` and `export_test.go` files from analysis.
### Step 2: Classify Each Test File
For each `*_test.go` file, read the `package` declaration (first non-comment, non-blank line starting with `package`).
**Classification rules:**
| Package declaration | Source package | Classification |
|---|---|---|
| `package foo_test` | `foo` | Black box (correct) |
| `package foo` | `foo` | White box (needs conversion) |
| `package foo_test` | N/A (no source) | Black box (standalone) |
To determine the source package: look for non-test `.go` files in the same directory and read their `package` declaration.
### Step 3: Check for