What problem does it solve?
Prevents broken cancellation, deadline, and tracing flows by enforcing correct and idiomatic use of Go context.Context across the full call chain.
Core Features & Use Cases
- End-to-end context propagation: ensures the same ctx flows from entry points through services, database calls, and outbound HTTP/gRPC requests.
- Cancellation correctness: covers WithCancel, WithTimeout, WithDeadline, ctx.Done listening, and required cancel() cleanup to avoid leaks.
- Safe request-scoped values: uses unexported key types and limits context values to metadata like trace_id/user_id/correlation IDs.
- Background work without canceling: applies context.WithoutCancel for goroutines that must outlive the request while preserving values.
Quick Start
Use the golang-context skill to review a Go handler and its downstream service/database/HTTP calls for context propagation, cancellation leaks, context value key safety, and correct use of context.TODO/background/WithoutCancel.