Skip to content
G

golang-context

Idiomatic context.Context usage in Golang

by samberFree

Launch
#3347in AI Skills
0In stores

Description

golang-context is an agent skill from the samber cc-skills-golang collection that sets out best practice for context.Context in Go. It treat…

Highlights

  • Context propagation through API boundaries
  • Cancellation, timeouts and deadlines
  • Cancel on every control-flow path
  • Unexported context key types
  • WithoutCancel for background work
  • Installs from skills.sh

Ratings & Reviews

No ratings yet

Be the first to rate golang-context.

People also visit

G

go-concurrency-patterns

Master Go concurrency with goroutines, channels, sync primitives, and context

AI Skills
Launch
G

golang-concurrency

Golang concurrency design

AI Skills
Launch
A

async-python-patterns

Comprehensive guide to asyncio, concurrent patterns

AI Skills
Launch
P

python-anti-patterns

Reviewing Python code for common anti-patterns to avoid

AI Skills
Launch
R

rust-async-patterns

Production patterns for async Rust

AI Skills
Launch
C

context-map

Analyze codebases and map task-relevant files before implementing changes

AI Skills
Launch

golang-context FAQ

What does this skill cover?

Idiomatic context.Context use in Go: propagation, cancellation, timeouts, deadlines and request-scoped values.

Should context be stored in structs?

No. The skill says to pass it through function parameters, because a struct can outlive the request that filled it.

When should I use context.WithoutCancel?

For background work that must outlive the parent request, such as an audit log write, so the handler returning does not cancel it.

How do I install it?

Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-context.

What are the security audit results?

skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.

How popular is it?

The page shows about 39.1K installs, and the cc-skills-golang repository has 3.5K GitHub stars.

What are the best golang-context alternatives?

Popular alternatives to golang-context include go-concurrency-patterns, golang-concurrency and async-python-patterns. See all golang-context alternatives

Developer Stuff

Badges