golang-pro
Skill1 starsChanged 9 months agoApache-2.0View on GitHub
Go 1.26+ development with modern patterns, concurrency, HTTP routing, error handling, testing, and performance profiling. Code-first examples for every pattern. Use PROACTIVELY for Go development, architecture design, or performance optimization.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- devantler-tech/ksailtheir own version, first seen Oct 3, 2026
- Michael-Obele/tomoshibitheir own version, first seen Sep 27, 2026
- TheoBrigitte/claude-configtheir own version, first seen Sep 17, 2026
- gccli/skillstheir own version, first seen Jul 27, 2026
- Leo-Atienza/atlas-claudetheir own version, first seen Jul 24, 2026
- jshsakura/awesome-opencode-skillstheir own version, first seen Jul 8, 2026
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- Jeffallan/claude-skills★ 12ksame name
- devantler-tech/ksail★ 166same name
- 0xtbug/telbot★ 79same name
- DeevsDeevs/agent-system★ 41same name
- jshsakura/awesome-opencode-skills★ 29same name
- codeApe-7/ai-agent-workflowGroup★ 17same name
- belokonm/claude-supercode-skills★ 11same name
- xfstudio/skills★ 9same name
- Leo-Atienza/atlas-claude★ 4same name
- marttp/my_agent_skills_I_use★ 4same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- accessibility-wcagSkill
- api-designSkill
- api-testingSkill
- asset-optimizationSkill
- audio-systemsSkill
- aws-essentialsSkill
- ci-cd-pipelinesSkill
- codebase-analysisSkill
- code-reviewerSkill
- container-securitySkill
- cost-optimizationSkill
- database-designSkill
- data-visualizationSkill
- doc-generationSkill
- docker-kubernetesSkill
- docxSkill
- email-notificationsSkill
- env-configSkill
- flutter-mobileSkill
- framer-motionSkill
- frontend-code-reviewSkill
- frontend-designSkill
- fullstack-developerSkill
- game-enginesSkill
- gameplay-designSkill
- game-programming-languagesSkill
- game-serversSkill
- git-workflowSkill
- godot-4Skill
- go-linter-configurationSkill
- graphics-renderingSkill
- i18n-localizationSkill
- incident-responseSkill
- level-designSkill
- llm-integrationSkill
- local-securitySkill
- memory-managementSkill
- monetization-systemsSkill
- monitoring-observabilitySkill
- multiplayer-netcodeSkill
- nextjs-16Skill
- notebooklm-researchSkill
- npm-packageSkill
- oauth-authSkill
- particle-systemsSkill
- performance-optimizationSkill
- playwright-testingSkill
- postgres-advancedSkill
- programming-architectureSkill
- project-migrationSkill
- publishing-platformsSkill
- python-best-practicesSkill
- react-nativeSkill
- redis-patternsSkill
- refactoring-patternsSkill
- remotion-best-practicesSkill
- rust-best-practicesSkill
- scraping-automationSkill
- security-reviewSkill
- seo-metaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 37
Custom error types: when callers need metadata:
- Very specific: line 62
Never use panic for recoverable errors.
- Distinctive: line 66
No frameworks needed. stdlib ServeMux supports methods and path params:
- Distinctive: line 144
Prefer zerolog (per project standard) or slog (stdlib):
- Very specific: line 156
Never use fmt.Println or log.Println in production code.
- Distinctive: line 241
Profile before optimizing: Always measure.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are a Go expert. Write idiomatic Go 1.26+ code. Prefer stdlib over dependencies. Handle every error. Use structured logging (slog or zerolog). Test with table-driven tests.
When to use
- Building Go services, CLIs, or libraries
- Designing concurrency, error handling, or HTTP routing
- Performance profiling or optimization
- Code review of Go projects
Error Handling
Three patterns. Choose based on context.
Sentinel errors for expected conditions:
var ErrNotFound = errors.New("not found")
func GetUser(id int) (*User, error) {
u, err := db.Find(id)
if err != nil {
return nil, fmt.Errorf("get user %d: %w", id, ErrNotFound)
}
return u, nil
}
// Caller checks with errors.Is
if errors.Is(err, ErrNotFound) {
http.Error(w, "not found", 404)
}Custom error types when callers need metadata:
type ValidationError struct {
Field string
Message string
}
func (e *ValidationError) Error() string {
return fmt.Sprintf("invalid %s: %s", e.Field, e.Message)
}
// Caller extracts with errors.As
var ve *ValidationError
if errors.As(err, &ve) {
log.Error().Str("field", ve.Field).Msg(ve.Message)
}Wrapped errors for context chain:
if err != nil {
return fmt.Errorf("parse config %s: %w", path, err)
}Never use panic for recoverable errors. Never ignore errors with _.
HTTP Routing (Go 1.22+ stdlib)
No frameworks needed. stdlib ServeMux supports methods and path params:
mux := http.NewServeMux()
mux.HandleFunc("GET /users/{id}", getUser)
mux.HandleFunc("POST /users", createUser)
mux.HandleFunc("GET /files/{path...}", serveFile) // wildcard
mux.HandleFunc("GET /health/{$}", healthCheck) // exact match
func getUser(w http.ResponseWriter, r *http.Request) {
id := r.PathValue("id")
// ...
}Middleware pattern:
func logging(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
start := time.Now()
next.ServeHTTP(w, r)
slog.Info("request", "method", r.Method, "path", r.URL.Path,
"duration", time.Since(start))
})
}
srv := &http.Server{
Addr: ":8080",
Handler: logging(mux),
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
IdleTimeout: 120 * time.Second,
}Concurrency
errgroup for parallel operations with error propagation:
g, ctx := errgroup.WithContext(ctx)
for _, url := range urls {
g.Go(func() error {
return fetch(ctx, url)
})
}
if err := g.Wait(); err != nil {
return fmt.Errorf("fetch failed: %w", err)
}Semaphore to limit concurrency:
sem := semaphore.NewWeighted(10)
for _, task := range tasks {
sem.Acquire(ctx, 1)
go func() {
defer sem.Release(1)
process(task)
}()
}
sem.Acquire(ctx, 10) // wait for allGraceful shutdown:
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()
go func() { srv.ListenAndServe() }()
<-ctx.Done()
shutdownCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
srv.Shutdown(shutdownCtx)Structured Logging
Prefer zerolog (per project standard) or slog (stdlib):
// zerolog
log := zerolog.New(os.Stdout).With().Timestamp().Logger()
log.Info().Str("user_id", id).Int("status", 200).Msg("request served")
// slog (stdlib, Go 1.21+)
logger := slog.New(slog.NewJSONHandler(os.Stdout, nil))
logger.Info("request served", "user_id", id, "status", 200)Never use fmt.Println or log.Println in production code.
Testing
Table-driven tests (always):
func TestParseSize(t *testing.T) {
tests := []struct {
name string
input string
want int64
wantErr bool
}{
{"bytes", "100B", 100, false},
{"kilobytes", "2KB", 2048, false},
{"invalid", "abc", 0, true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := ParseSize(tt.input)
if (err != nil) != tt.wantErr {
t.Fatalf("err = %v, wantErr = %v", err, tt.wantErr)
}
if got != tt.want {
t.Errorf("got %d, want %d", got, tt.want)
}
})
}
}Fuzzing for input parsing:
func FuzzParseSize(f *testing.F) {
f.Add("100B")
f.Fuzz(func(t *testing.T, s string) {
ParseSize(s) // must not panic
})
}Benchmarks:
func BenchmarkSort(b *testing.B) {
data := generateData(10000)
b.ResetTimer()
for i := 0; i < b.N; i++ {
slices.Sort(slices.Clone(data))
}
}
// Run: go test -bench=. -benchmem -count=5Modern Go (1.22-1.26)
Range-over-func iterators:
func Lines(r io.Reader) iter.Seq[string] {
return func(yield func(string) bool) {
scanner := bufio.NewScanner(r)
for scanner.Scan() {
if !yield(scanner.Text()) {
return
}
}
}
}
for line := range Lines(file) {
process(line)
}Slices and maps packages:
slices.Sort(items)
slices.Compact(items) // remove adjacent duplicates
idx, ok := slices.BinarySearch(items, target)
clone := maps.Clone(original)
maps.DeleteFunc(m, func(k string, v int) bool { return v == 0 })Performance
Profile before optimizing. Always measure.
// HTTP pprof endpoint (add to any server)
import _ "net/http/pprof"
go http.ListenAndServe("localhost:6060", nil)
// CLI profiling
f, _ := os.Create("cpu.prof")
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()go tool pprof -http=:8081 cpu.prof
go test -bench=. -cpuprofile=cpu.prof -memprofile=mem.profCommon wins:
sync.Poolfor frequently allocated objectsstrings.Builderoverfmt.Sprintfin loops- Pre-allocate slices:
make([]T, 0, expectedCap) context.WithTimeoutto bound all external calls
Anti-patterns
BAD:
result, _ := doSomething() // ignored error
go func() { doWork() }() // fire-and-forget goroutine
log.Println("something happened") // unstructured loggingGOOD:
result, err := doSomething()
if err != nil {
return fmt.Errorf("do something: %w", err)
}
g.Go(func() error { return doWork() }) // tracked goroutine
slog.Info("something happened", "result", result)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

