samber/cc-skills-golang · golang-context · SKILL.md
Go语言上下文
Go语言中惯用的context.Context用法——跨API边界传播、取消、超时与截止时间、请求作用域值、context.WithoutCancel用于超出请求的后台工作。适用于设计跨层上下文传播、调试泄漏或未过期上下文、在context.Background/TODO/WithoutCancel之间选择,或在上下文中存储值。不适用于仅将ctx作为第一个参数接受的代码。
这是公开 Agent Skill 的中文说明,由采集翻译或编辑润色,完整内容以上游 SKILL.md 为准。适用于 Cursor / Claude Code / Codex / Gemini。 打开上游 SKILL.md
安装
通用(npx skills)
npx skills add samber/cc-skills-golang -s golang-context
Cursor
把该 Skill 复制到项目的 .cursor/skills/golang-context/ 目录
Claude Code
npx skills add samber/cc-skills-golang -a claude-code -s golang-context