Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/codelably/harmony-claude-codenpx agentmods add commands/codelably/harmony-claude-code/go-testWrote 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.
[](https://agentmods.dev/commands/codelably/harmony-claude-code/go-test)<a href="https://agentmods.dev/commands/codelably/harmony-claude-code/go-test"><img src="https://agentmods.dev/badge/commands/codelably/harmony-claude-code/go-test/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/codelably/harmony-claude-code/go-test"><img src="https://agentmods.dev/badge/commands/codelably/harmony-claude-code/go-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.01720 |
| Opus 5.5 | $0.00020 | $0.00688 |
| Sonnet 5.5 | $0.00010 | $0.00344 |
| Haiku 4.5 | $0.00005 | $0.00172 |
Grade A, and why
go-test scanned grade A with 0 findings 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 269 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go TDD 命令
此命令使用地道的 Go 测试模式为 Go 代码强制执行测试驱动开发(Test-Driven Development,TDD)方法论。
此命令的作用
- 定义类型/接口:首先搭建函数签名的支架
- 编写表驱动测试(Table-Driven Tests):创建全面的测试用例(RED/红灯)
- 运行测试:验证测试因预期的原因失败
- 实现代码:编写通过测试所需的最少代码(GREEN/绿灯)
- 重构(Refactor):在保持测试通过的同时优化代码
- 检查覆盖率:确保 80% 以上的覆盖率
何时使用
在以下场景使用 /go-test:
- 实现新的 Go 函数
- 为现有代码增加测试覆盖率
- 修复 Bug(先编写失败的测试)
- 构建核心业务逻辑
- 在 Go 中学习 TDD 工作流(Workflow)
TDD 周期
RED(红灯) → 编写失败的表驱动测试
GREEN(绿灯) → 实现通过测试所需的最少代码
REFACTOR(重构) → 优化代码,保持测试通过
REPEAT(循环) → 下一个测试用例
会话示例
User: /go-test 我需要一个验证电子邮件地址的函数
Agent:
# TDD 会话:电子邮件验证器
## 第 1 步:定义接口
```go
// validator/email.go
package validator
// ValidateEmail 检查给定的字符串是否为有效的电子邮件地址。
// 如果有效返回 nil,否则返回描述问题的错误。
func ValidateEmail(email string) error {
panic("not implemented")
}
第 2 步:编写表驱动测试 (RED)
// validator/email_test.go
package validator
import (
"testing"
)
func TestValidateEmail(t *testing.T) {
tests := []struct {
name string
email string
wantErr bool
}{
// 有效邮箱
{"simple email", "[email protected]", false},
{"with subdomain", "[email protected]", false},
{"with plus", "[email protected]", false},
{"with dots", "[email protected]", false},
// 无效邮箱
{"empty string", "", true},
{"no at sign", "userexample.com", true},
{"no domain", "user@", true},
{"no local part", "@example.com", true},
{"double at", "user@@example.com", true},
{"spaces", "user @example.com", true},
{"no tld", "user@example", true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := ValidateEmail(tt.email)
if tt.wantErr && err == nil {
t.Errorf("ValidateEmail(%q) = nil; want error", tt.email)
}
if !tt.wantErr && err != nil {
t.Errorf("ValidateEmail(%q) = %v; want nil", tt.email, err)
}
})
}
}
第 3 步:运行测试 - 验证失败
$ go test ./validator/...
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.
- 1mo ago First seen · 269 lines · 50 tokens per session scan A 82b25f783f97
go-test is a command published in the GitHub repository codelably/harmony-claude-code (43 stars, last pushed 7mo ago), licensed MIT. It adds 50 tokens to every session and 1,720 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
go-test
Go TDD workflow with table-driven tests.
go-test
Enforce TDD workflow for Go. Write table-driven tests first, then implement. Verify 80%+ coverage with go test -cover.
go-test
Go TDD workflow with table-driven tests.
go-test
Go TDD workflow with table-driven tests.
go-test
Go TDD workflow with table-driven tests.
gopher-feat
Full-cycle Go 1.24+ development: analysis → design → TDD implementation → quality gates → review. Scale-adaptive with 2 stop points.