Skip to main content
Back to registry

go-context

cxuu/golang-skills

context.Context carries security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass contexts explicitly along the entire function call chain.

Installs174
Install command
npx skills add https://github.com/cxuu/golang-skills --skill go-context
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
context.Context carries security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass contexts explicitly along the entire function call chain. Based on Go Wiki CodeReviewComments - Contexts . Functions that use a Context should accept it as their first parameter : This is a strong convention in Go that makes context flow visible and consistent across codebases. Do not add a Context member to a struct type. Instead, pass ctx as a parameter to each method that needs it: Exception : Methods whose signature must match an interface in the standard library or a third-party library may need to work around this. Do not create custom Context types or use interfaces other than context.Context in function signatures: If you have application data to pass around, consider these options in order of preference: Context values are appropriate for: Context values are not appropriate for: Contexts are immutable. It's safe to pass the same ctx to multiple calls that share the same deadline, cancellation signal, credentials, and parent trace: Use context.Background() only for functions that are never request-specific : Default to passing a Context even if you think you don't need to.

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does go-context do?

context.Context carries security credentials, tracing information, deadlines, and cancellation signals across API and process boundaries. Go programs pass contexts explicitly along the entire function call chain.

Is go-context good?

go-context does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does go-context work with?

go-context currently lists compatibility with codex, gemini-cli, opencode, cursor, kimi-cli, amp, github-copilot.

What are alternatives to go-context?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install go-context?

npx skills add https://github.com/cxuu/golang-skills --skill go-context

Related skills

More from cxuu/golang-skills

Related skills

Alternatives in Software Engineering