Borrowing it
Nothing to install: this file belongs to 2SSK/dot-files. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/2SSK/dot-files/main/.claude/skills/go-best-practices/SKILL.mdgit clone --depth 1 https://github.com/2SSK/dot-filesWrote 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/skills/2ssk/dot-files/go-best-practices)<a href="https://agentmods.dev/skills/2ssk/dot-files/go-best-practices"><img src="https://agentmods.dev/badge/skills/2ssk/dot-files/go-best-practices/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/skills/2ssk/dot-files/go-best-practices"><img src="https://agentmods.dev/badge/skills/2ssk/dot-files/go-best-practices.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.00029 | $0.00483 |
| Opus 5.5 | $0.00012 | $0.00193 |
| Sonnet 5.5 | $0.00006 | $0.00097 |
| Haiku 4.5 | $0.00003 | $0.00048 |
Grade A, and why
go-best-practices 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.
What it actually says
Go Best Practices
Follow Go proverbs and community standards for all Go code.
Core Principles
- Simplicity: Go is simple. Avoid over-engineering.
- Idiomatic: Follow effective Go guidelines
- Performance: Profile before optimizing
- Testing: Test-driven development
Error Handling
// Always wrap errors with context
if err != nil {
return fmt.Errorf("failed to do operation: %w", err)
}
// Custom error types for known conditions
var NotFoundError struct{ Name string }
func (e NotFoundError) Error() string {
return fmt.Sprintf("not found: %s", e.Name)
}
Concurrency
// Use channels for coordination, mutexes for state
// Worker pool pattern
jobs := make(chan Job, workerCount)
results := make(chan Result, workerCount)
// Start workers
for i := 0; i < workerCount; i++ {
go worker(jobs, results)
}
Context
// All API calls must accept context
func DoSomething(ctx context.Context, arg Arg) (Result, error) {
req, err := http.NewRequestWithContext(ctx, ...)
// ...
}
Testing
// Table-driven tests
tests := []struct {
name string
input Arg
expected Result
}{
{"case 1", Arg{...}, Expected{...}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := DoSomething(tt.input)
assert.Equal(t, tt.expected, result)
})
}
Build Commands
go fmt ./...
go vet ./...
golangci-lint run
go test -race -coverprofile=coverage.out ./...
go build -o binary ./cmd/...
Quality Gates
- gofmt passes
- golangci-lint passes
- go test -race passes
- Coverage ≥ 80%
- No goroutine leaks
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 · 93 lines · 29 tokens per session scan A 361cbd4ef985
go-best-practices is a skill published in the GitHub repository 2SSK/dot-files (258 stars, last pushed 9d ago), licensed MIT. It adds 29 tokens to every session and 483 once invoked, about $0.0001 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-10-02.
go-best-practices compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-best-practices2SSK/dot-files | Skill | 258 | 9d ago | MIT | A | 29 | Claude Code |
| ax-go-agent-optimizeax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 51 | Claude Code, Codex |
| golang-testingsamber/cc-skills-golang | Skill | 4.0k | 22d ago | MIT | A | 115 | Claude Code |
| golang-samber-oopssamber/cc-skills-golang | Skill | 4.0k | 22d ago | MIT | A | 74 | Claude Code |
| golang-uber-fxsamber/cc-skills-golang | Skill | 4.0k | 22d ago | MIT | A | 122 | Claude Code |
| cobra-viperspf13/go-skills | Skill | 723 | 16d ago | MIT | A | 97 | Claude Code |
| tree-sitter-language-pack-extracting-code-structurexberg-io/tree-sitter-language-pack | Skill | 489 | yesterday | MIT | A | 52 | Claude Code |