
Golang Context
Idiomatic context.Context guidance for propagation, cancellation, timeouts, values, and detached background work in Go.
- skills.sh installs
- 43.2K
- GitHub stars
- 3.9K
- last updated
- Aug 21, 2026
What it does
- Covers propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, and
context.WithoutCancel - Includes deep-dive references on cancellation, value keys and tracing, and HTTP handlers and database calls
- Enforces passing context through parameters instead of structs, and creating
context.Background()only at entry points - Designed for Go services that need consistent request-scoped cancellation, with linting via
govetandstaticcheck
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-context -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Community default. A company skill that explicitly supersedes
samber/cc-skills-golang@golang-contextskill takes precedence.
Go context.Context Best Practices
context.Context is Go's mechanism for propagating cancellation signals, deadlines, and request-scoped values across API boundaries and between goroutines. Think of it as the "session" of a request — it ties together every operation that belongs to the same unit of work.
Best Practices Summary
Details
- Repository
- github.com/samber/cc-skills-golang
- Category
- Go
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Database43K
- Golang Naming43K
- Golang Safety42.7K
- Golang Project Layout42.5K
- Golang Documentation42.4K
- Golang Modernize42.4K
- Golang Lint42.3K
- Golang Data Structures42.3K
- Golang Troubleshooting42K
- Golang Observability42K
- Golang Dependency Management41.8K
- Golang Structs Interfaces41.7K
- Golang Cli41.5K
- Golang Benchmark41.5K
- Golang Dependency Injection41.4K
- Golang Popular Libraries41.4K
- Golang Stretchr Testify41.3K
- Golang Continuous Integration41.3K
- Golang Grpc41.1K
- Golang Samber Lo40.4K
- Golang Stay Updated40.3K
- Golang Samber Do40.2K
- Golang Samber Slog40.1K
- Golang Samber Oops40K
Similar to Golang Context
More Go
go-contextcxuu/golang-skills1.3K installsGo context conventions covering placement, cancellation, deadlines, and when to store values in context.
golang-concurrencysamber/cc-skills-golang44.1K installsGo concurrency design guide covering goroutine lifecycles, channels, sync primitives, and worker pools.
golang-design-patternssamber/cc-skills-golang44.3K installsIdiomatic Go design patterns covering constructors, error flow, lifecycle, and architecture choices for production code.
go-concurrency-patternswshobson/agents11.8K installsConcurrency primitives and worked patterns for Go, covering goroutines, channels, sync, and context-driven cancellation.
go-concurrencycxuu/golang-skills1.4K installsGo concurrency guidance covering goroutine lifetimes, channel-versus-mutex choice, and safe shared state.
golang-concurrency-patternsbobmatnyc/claude-mpm-skills427 installsGo concurrency patterns for production services: context cancellation, errgroup, worker pools, and race avoidance.