一键导入
gen-test
Generate table-driven Go tests for a package with httptest, context helpers, and config parsing patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate table-driven Go tests for a package with httptest, context helpers, and config parsing patterns
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run govulncheck locally and check for outdated Go dependencies
Run gosec on a specific package and cross-reference findings against suppression list and TODO tracker
Validate a config.yaml file against the Config schema and constraint rules from config/config.go
Build and smoke-test the Docker image locally to validate Dockerfile and binary startup
Draft conventional commit messages from staged changes for release-please
| name | gen-test |
| description | Generate table-driven Go tests for a package with httptest, context helpers, and config parsing patterns |
| user_invocable | true |
Generate comprehensive _test.go files for the specified package.
/gen-test <package> — e.g., /gen-test config, /gen-test proxy, /gen-test oauth
.go files in the target package (skip any existing _test.go)t.Run with descriptive subtests[]struct{ name string; ... }t.Parallel() at test and subtest level where safet.Helper() on all test helpersnet/http/httptest for handler testshttptest.NewRequesthttptest.NewRecorderconfig.ServerMetadataProxyEnabled + DynamicClientRegistration constraintlogr.Discard() for test loggerslog.IntoContext(ctx, logger)if got != want { t.Errorf(...) }<package>/<filename>_test.gogo test ./<package>/... to verify compilationgo vet ./<package>/... for correctness