context-standards
CommunityGolang context best practices
Authorpdylanross
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill ensures adherence to best practices when working with Go's context.Context type, preventing common pitfalls and improving code quality.
Core Features & Use Cases
- Cancellation Handling: Guides developers on properly checking for context cancellation before executing long-running operations.
- Context Propagation: Enforces the standard of passing context as the first parameter in function signatures.
- Value Usage Guidelines: Provides clear rules on when and how to use
context.WithValueto avoid misuse and key collisions. - Use Case: A developer is unsure about the correct way to handle timeouts or cancellations in a Go service. This Skill provides the exact rules to follow.
Quick Start
Follow the golang context standards when writing new functions.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: context-standards Download link: https://github.com/pdylanross/barnacle/archive/main.zip#context-standards Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.