Skip to content
Back to skills

Golang Best Practices

ASecurity

MUST be used for Go tasks. Covers Go 1.21+, standard library, Go modules, concurrency, performance optimization, testing, and WebAssembly (GOOS=js, GOARCH=wasm). Load for any .go files work.

  • 8 stars
  • 0 votes
  • 4 copies
  • 23 views
  • Added September 8, 2026
code-qualitygotestingdebugginggitperformancedocumentation

Works with

  • cli

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add belos-street/skill-kit --skill golang-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Golang Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Golang Best Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/belos-street-golang-best-practices/badge)](https://www.skillsdirectory.com/skills/belos-street-golang-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: golang-best-practices
description: MUST be used for Go tasks. Covers Go 1.21+, standard library, Go modules, concurrency, performance optimization, testing, and WebAssembly (GOOS=js, GOARCH=wasm). Load for any .go files work.
license: MIT
metadata:
  author: github.com/belos-street
  version: "1.0.0"
---

Go best practices, common gotchas, and performance optimization. Includes WebAssembly development.

### Project & Package
- Standard Go project layout → See [standard-go-project-layout](references/standard-go-project-layout.md)
- Go modules and dependency management → See [go-mod-dependency-management](references/go-mod-dependency-management.md)
- Go naming conventions → See [go-naming-conventions](references/go-naming-conventions.md)

### Error Handling
- Go-style error handling patterns → See [error-handling-patterns](references/error-handling-patterns.md)
- Sentinel errors and error wrapping → See [error-sentinel-wrapping](references/error-sentinel-wrapping.md)
- Recover and panic best practices → See [error-recover-panic](references/error-recover-panic.md)

### Types & Memory
- Value types vs pointers → See [value-type-vs-pointer](references/value-type-vs-pointer.md)
- Understanding nil in Go → See [go-nil-handling](references/go-nil-handling.md)
- Memory management and GC → See [memory-management-gc](references/memory-management-gc.md)
- Escape analysis → See [escape-analysis](references/escape-analysis.md)

### Concurrency
- Goroutine lifecycle management → See [goroutine-lifecycle](references/goroutine-lifecycle.md)
- Channel patterns → See [channel-patterns](references/channel-patterns.md)
- Sync primitives (Mutex, RWMutex, Atomic) → See [sync-primitives](references/sync-primitives.md)
- Common concurrency pitfalls → See [concurrency-pitfalls](references/concurrency-pitfalls.md)

### Interfaces
- Interface design principles → See [interface-design](references/interface-design.md)
- Dependency injection → See [dependency-injection](references/dependency-injection.md)
- Interface and nil → See [interface-nil](references/interface-nil.md)

### Performance
- String and []byte optimization → See [string-byte-optimization](references/string-byte-optimization.md)
- Slice tips and tricks → See [slice-optimization](references/slice-optimization.md)
- Map optimization → See [map-optimization](references/map-optimization.md)
- Profiling with pprof → See [pprof-usage](references/pprof-usage.md)

### Testing
- Table-driven tests → See [table-driven-tests](references/table-driven-tests.md)
- Mocking techniques → See [go-mocking](references/go-mocking.md)
- Benchmarking → See [benchmarking](references/benchmarking.md)

### Tooling
- Linting and formatting → See [linting-formatting](references/linting-formatting.md)
- Documentation with godoc → See [godoc-best-practices](references/godoc-best-practices.md)
- Build tags and conditional compilation → See [build-tags](references/build-tags.md)

### WebAssembly
- WASM basics and compilation → See [wasm-basics](references/wasm-basics.md)
- JS interop with wasm_exec → See [wasm-js-interop](references/wasm-js-interop.md)
- DOM manipulation → See [wasm-dom-manipulation](references/wasm-dom-manipulation.md)
- Memory management in WASM → See [wasm-memory-management](references/wasm-memory-management.md)
- Callbacks and async → See [wasm-callbacks-async](references/wasm-callbacks-async.md)
- WASM performance considerations → See [wasm-performance](references/wasm-performance.md)
- Debugging WASM → See [wasm-debugging](references/wasm-debugging.md)
- Practical WASM use cases → See [wasm-use-cases](references/wasm-use-cases.md)

### Common Gotchas
- Loop variable closure → See [loop-variable-closure](references/loop-variable-closure.md)
- Slice append behavior → See [slice-append-behavior](references/slice-append-behavior.md)
- time.After memory leak → See [time-after-leak](references/time-after-leak.md)
- HTTP client timeouts → See [http-client-timeouts](references/http-client-timeouts.md)

Files in this skill

  • references/benchmarking.md4.3 KB
  • references/build-tags.md3.6 KB
  • references/channel-patterns.md5 KB
  • references/concurrency-pitfalls.md5.8 KB
  • references/dependency-injection.md6 KB
  • references/error-handling-patterns.md4.6 KB
  • references/escape-analysis.md4.1 KB
  • references/go-mocking.md4.4 KB
  • references/go-mod-dependency-management.md2.4 KB
  • references/go-naming-conventions.md4.2 KB
  • references/go-nil-handling.md3.8 KB
  • references/godoc-best-practices.md3.6 KB
  • references/goroutine-lifecycle.md5.3 KB
  • references/http-client-timeouts.md4 KB
  • references/interface-design.md5.6 KB
  • references/interface-nil.md5 KB
  • references/linting-formatting.md3.4 KB
  • references/loop-variable-closure.md2.9 KB
  • references/map-optimization.md3.5 KB
  • references/memory-management-gc.md4.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.