golang-context

golang context

samber ↓ 34k
Claude Code
View source ↗

What it does

  • → See the samber/cc-skills-golang@golang-concurrency skill for goroutine cancellation patterns using context
  • → See the samber/cc-skills-golang@golang-database skill for context-aware database operations (QueryContext, ExecContext)
  • → See the samber/cc-skills-golang@golang-observability skill for trace context propagation with OpenTelemetry
  • → See the samber/cc-skills-golang@golang-design-patterns skill for timeout and resilience patterns

Requirements & configuration

  • | Function needs context but caller doesn't provide one yet | context.TODO() |
  • | Need cancellation control | context.WithCancel(parentCtx) |
  • | Need a deadline/timeout | context.WithTimeout(parentCtx, duration) |

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

golang context

Source

Repository: https://github.com/samber/cc-skills-golang

golang-context FAQ

What does the golang-context skill do?

Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or unexpired contexts, choosing between context.Background/TODO/WithoutCancel, or storing values in context. Not for code that merely accepts ctx as first parameter. → See the samber/cc-skills-golang@golang-concurrency skill for goroutine cancellation patterns using context → See the samber/cc-skills-golang@golang-database skill for context-aware database operations (QueryContext, ExecContext)

What does golang-context require?

| Function needs context but caller doesn't provide one yet | context.TODO() | | Need cancellation control | context.WithCancel(parentCtx) | | Need a deadline/timeout | context.WithTimeout(parentCtx, duration) |

How do I install golang-context?

Run: npx -y skills add https://github.com/samber/cc-skills-golang --skill golang-context --agent claude-code — the source lives at github.com/samber/cc-skills-golang.

Maintain golang-context?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

golang-context on getagentictools
[![golang-context on getagentictools](https://getagentictools.com/badge/skills/samber-cc-skills-golang-golang-context.svg)](https://getagentictools.com/skills/samber-cc-skills-golang-golang-context?ref=badge)
npx agentictools info skills/samber-cc-skills-golang-golang-context

The second line is the CLI lookup for this page — handy in READMEs and docs.