What problem does it solve? Go developers frequently misuse context.Context: breaking cancellation chains with context.Background() inside handlers, leaking resources by forgetting cancel(), storing contexts in structs, or colliding on string value keys. This Skill encodes the correct patterns so generated or reviewed Go code propagates cancellation, deadlines, and request-scoped values properly across API boundaries. ## Core Features & Use Cases - Propagation rules: Enforces passing ctx as the first parameter, using r.Context() in HTTP handlers, and never creating context.Background() mid-request. - Cancellation and timeouts: Covers WithCancel, WithTimeout, WithDeadline, nested deadline semantics, ctx.Done() select patterns, and always calling cancel() to prevent leaks. - Modern Go 1.21+ APIs: Teaches context.WithoutCancel for background work that must outlive a request (e.g., audit logging) and context.AfterFunc for non-blocking cleanup callbacks. - Use Case: When writing an HTTP handler that queries a database and calls an external payment API, the Skill ensures the request context flows through QueryRowContext and http.NewRequestWithContext so client disconnects cancel all downstream work. ## Quick Start Ask the agent to review or write Go code involving context usage, such as: review my HTTP handler and service layer for correct context propagation and timeout handling.