Borrowing it
Nothing to install: this file belongs to mit-network/everything-claude-code. 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/mit-network/everything-claude-code/main/.kiro/skills/golang-patterns/SKILL.mdgit clone --depth 1 https://github.com/mit-network/everything-claude-codeWrote 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/mit-network/everything-claude-code/golang-patterns)<a href="https://agentmods.dev/skills/mit-network/everything-claude-code/golang-patterns"><img src="https://agentmods.dev/badge/skills/mit-network/everything-claude-code/golang-patterns/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/mit-network/everything-claude-code/golang-patterns"><img src="https://agentmods.dev/badge/skills/mit-network/everything-claude-code/golang-patterns.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.00045 | $0.01111 |
| Opus 5.5 | $0.00018 | $0.00444 |
| Sonnet 5.5 | $0.00009 | $0.00222 |
| Haiku 4.5 | $0.00005 | $0.00111 |
Grade A, and why
golang-patterns 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 3mo 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.
This is a copy
100% identical to golang-patterns — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Patterns
This skill provides comprehensive Go patterns extending common design principles with Go-specific idioms.
Functional Options
Use the functional options pattern for flexible constructor configuration:
type Option func(*Server)
func WithPort(port int) Option {
return func(s *Server) { s.port = port }
}
func NewServer(opts ...Option) *Server {
s := &Server{port: 8080}
for _, opt := range opts {
opt(s)
}
return s
}
Benefits:
- Backward compatible API evolution
- Optional parameters with defaults
- Self-documenting configuration
Small Interfaces
Define interfaces where they are used, not where they are implemented.
Principle: Accept interfaces, return structs
// Good: Small, focused interface defined at point of use
type UserStore interface {
GetUser(id string) (*User, error)
}
func ProcessUser(store UserStore, id string) error {
user, err := store.GetUser(id)
// ...
}
Benefits:
- Easier testing and mocking
- Loose coupling
- Clear dependencies
Dependency Injection
Use constructor functions to inject dependencies:
func NewUserService(repo UserRepository, logger Logger) *UserService {
return &UserService{
repo: repo,
logger: logger,
}
}
Pattern:
- Constructor functions (New* prefix)
- Explicit dependencies as parameters
- Return concrete types
- Validate dependencies in constructor
Concurrency Patterns
Worker Pool
func workerPool(jobs <-chan Job, results chan<- Result, workers int) {
var wg sync.WaitGroup
for i := 0; i < workers; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for job := range jobs {
results <- processJob(job)
}
}()
}
wg.Wait()
close(results)
}
Context Propagation
Always pass context as first parameter:
func FetchUser(ctx context.Context, id string) (*User, error) {
// Check context cancellation
select {
case <-ctx.Done():
return nil, ctx.Err()
default:
}
// ... fetch logic
}
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.
- 3mo ago First seen · 228 lines · 45 tokens per session scan A 835e7727ad68
golang-patterns is a skill published in the GitHub repository mit-network/everything-claude-code (92 stars, last pushed 8mo ago), licensed MIT. It adds 45 tokens to every session and 1,111 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to golang-patterns, differing in 0 lines, and is treated as a copy.
golang-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| golang-patternsmit-network/everything-claude-code | Skill | 92 | 8mo ago | MIT | A | 45 | Claude Code, Kiro |
| golang-testingaffaan-m/ECC | Skill | 315k | today | MIT | A | 37 | Claude Code, Kiro |
| golang-patternsaffaan-m/ECC | Skill | 315k | today | MIT | A | 45 | Claude Code, Kiro |
| golang-testingsamber/cc-skills-golang | Skill | 4.0k | yesterday | MIT | A | 115 | Claude Code |
| golang-uber-fxsamber/cc-skills-golang | Skill | 4.0k | yesterday | MIT | A | 122 | Claude Code |
| golang-samber-oopssamber/cc-skills-golang | Skill | 4.0k | yesterday | MIT | A | 74 | Claude Code |
| ax-go-agent-optimizeax-llm/ax | Skill | 3.0k | today | Apache-2.0 | A | 51 | Claude Code, Codex |