[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79ZVT5K1VQZPA9MGWZMMW3T":3,"skill-same:01M79ZVT5K1VQZPA9MGWZMMW3T":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79ZVT5K1VQZPA9MGWZMMW3T","go-context",null,"Use when working with context.Context in Go — placement in signatures, propagating cancellation and deadlines, and storing values in context vs parameters. Also use when cancelling long-running operations, setting timeouts, or passing request-scoped data, even if they don't mention context.Context directly. Does not cover goroutine lifecycle or sync primitives (see go-concurrency).","kongnakornna\u002Fgolangapi","kongnakornna","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10528904?v=4","01M79Z5JQPPV5CWQHXS235Q9MD","Kongnakorn Jantakun","01M79Z5JRHJJJ6PR2DGQS4P985",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgolang-skills\u002Fskills\u002Fgo-context\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: go-context\ndescription: Use when working with context.Context in Go — placement in signatures, propagating cancellation and deadlines, and storing values in context vs parameters. Also use when cancelling long-running operations, setting timeouts, or passing request-scoped data, even if they don't mention context.Context directly. Does not cover goroutine lifecycle or sync primitives (see go-concurrency).\n---\n\n# Go Context Usage\n\n> Compatibility: `context` has been in the standard library since Go 1.7.\n\n## Resource Routing\n\n- `references\u002FPATTERNS.md` - Read when deriving contexts, checking cancellation, handling HTTP request contexts, or using typed context-value keys.\n\n## Context as First Parameter\n\nFunctions that use a Context should accept it as their **first parameter**:\n\n```go\nfunc F(ctx context.Context, \u002F* other arguments *\u002F) error\nfunc ProcessRequest(ctx context.Context, req *Request) (*Response, error)\n```\n\nThis is a strong convention in Go that makes context flow visible and consistent\nacross codebases.\n\n---\n\n## Don't Store Context in Structs\n\nDo not add a Context member to a struct type. Instead, pass `ctx` as a parameter\nto each method that needs it:\n\n```go\n\u002F\u002F Bad: Context stored in struct\ntype Worker struct {\n    ctx context.Context  \u002F\u002F Don't do this\n}\n\n\u002F\u002F Good: Context passed to methods\ntype Worker struct{ \u002F* ... *\u002F }\n\nfunc (w *Worker) Process(ctx context.Context) error {\n    \u002F\u002F Context explicitly passed — lifetime clear\n}\n```\n\n**Exception**: Methods whose signature must match an interface in the standard\nlibrary or a third-party library may need to work around this.\n\n---\n\n## Don't Create Custom Context Types\n\nDo not create custom Context types or use interfaces other than `context.Context`\nin function signatures:\n\n```go\n\u002F\u002F Bad: Custom context type\ntype MyContext interface {\n    context.Context\n    GetUserID() string\n}\n\n\u002F\u002F Good: Use standard context.Context with value extraction\nfunc Process(ctx context.Context) error {\n    userID := GetUserID(ctx)\n}\n```\n\n---\n\n## Where to Put Application Data\n\nConsider these options in order of preference:\n\n1. **Function parameters** — most explicit and type-safe\n2. **Receiver** — for data that belongs to the type\n3. **Globals** — for truly global configuration (use sparingly)\n4. **Context value** — only for request-scoped data\n\nContext values are appropriate for:\n- Request IDs and trace IDs\n- Authentication\u002Fauthorization info that flows with requests\n- Deadlines and cancellation signals\n\nContext values are **not** appropriate for:\n- Optional function parameters\n- Data that could be passed explicitly\n- Configuration that doesn't vary per-request\n\n---\n\n## Common Patterns\n\n### Deriving Contexts\n\nAlways `defer cancel()` immediately after creating a derived context:\n\n```go\nctx, cancel := context.WithTimeout(ctx, 5*time.Second)\ndefer cancel()\n```\n\n### Checking Cancellation\n\n```go\nselect {\ncase \u003C-ctx.Done():\n    return ctx.Err()\ndefault:\n    \u002F\u002F Do work\n}\n```\n\n### Context Immutability\n\nContexts are immutable — it's safe to pass the same `ctx` to multiple\nconcurrent calls that share the same deadline and cancellation signal.\n\n---\n\n## Related Skills\n\n- **Goroutine coordination**: See [go-concurrency](..\u002Fgo-concurrency\u002FSKILL.md) when using context for goroutine cancellation, select-based timeouts, or errgroup\n- **Error handling**: See [go-error-handling](..\u002Fgo-error-handling\u002FSKILL.md) when deciding how to wrap or return `ctx.Err()` cancellation errors\n- **Interface design**: See [go-interfaces](..\u002Fgo-interfaces\u002FSKILL.md) when designing APIs that accept context alongside interfaces\n- **Request-scoped logging**: See [go-logging](..\u002Fgo-logging\u002FSKILL.md) when injecting loggers into context or adding request IDs to structured log output\n","# Go Context Usage\n\n> Compatibility: `context` has been in the standard library since Go 1.7.\n\n## Resource Routing\n\n- `references\u002FPATTERNS.md` - Read when deriving contexts, checking cancellation, handling HTTP request contexts, or using typed context-value keys.\n\n## Context as First Parameter\n\nFunctions that use a Context should accept it as their **first parameter**:\n\n```go\nfunc F(ctx context.Context, \u002F* other arguments *\u002F) error\nfunc ProcessRequest(ctx context.Context, req *Request) (*Response, error)\n```\n\nThis is a strong convention in Go that makes context flow visible and consistent\nacross codebases.\n\n---\n\n## Don't Store Context in Structs\n\nDo not add a Context member to a struct type. Instead, pass `ctx` as a parameter\nto each method that needs it:\n\n```go\n\u002F\u002F Bad: Context stored in struct\ntype Worker struct {\n    ctx context.Context  \u002F\u002F Don't do this\n}\n\n\u002F\u002F Good: Context passed to methods\ntype Worker struct{ \u002F* ... *\u002F }\n\nfunc (w *Worker) Process(ctx context.Context) error {\n    \u002F\u002F Context explicitly passed — lifetime clear\n}\n```\n\n**Exception**: Methods whose signature must match an interface in the standard\nlibrary or a third-party library may need to work around this.\n\n---\n\n## Don't Create Custom Context Types\n\nDo not create custom Context types or use interfaces other than `context.Context`\nin function signatures:\n\n```go\n\u002F\u002F Bad: Custom context type\ntype MyContext interface {\n    context.Context\n    GetUserID() string\n}\n\n\u002F\u002F Good: Use standard context.Context with value extraction\nfunc Process(ctx context.Context) error {\n    userID := GetUserID(ctx)\n}\n```\n\n---\n\n## Where to Put Application Data\n\nConsider these options in order of preference:\n\n1. **Function parameters** — most explicit and type-safe\n2. **Receiver** — for data that belongs to the type\n3. **Globals** — for truly global configuration (use sparingly)\n4. **Context value** — only for request-scoped data\n\nContext values are appropriate for:\n- Request IDs and trace IDs\n- Authentication\u002Fauthorization info that flows with requests\n- Deadlines and cancellation signals\n\nContext values are **not** appropriate for:\n- Optional function parameters\n- Data that could be passed explicitly\n- Configuration that doesn't vary per-request\n\n---\n\n## Common Patterns\n\n### Deriving Contexts\n\nAlways `defer cancel()` immediately after creating a derived context:\n\n```go\nctx, cancel := context.WithTimeout(ctx, 5*time.Second)\ndefer cancel()\n```\n\n### Checking Cancellation\n\n```go\nselect {\ncase \u003C-ctx.Done():\n    return ctx.Err()\ndefault:\n    \u002F\u002F Do work\n}\n```\n\n### Context Immutability\n\nContexts are immutable — it's safe to pass the same `ctx` to multiple\nconcurrent calls that share the same deadline and cancellation signal.\n\n---\n\n## Related Skills\n\n- **Goroutine coordination**: See [go-concurrency](..\u002Fgo-concurrency\u002FSKILL.md) when using context for goroutine cancellation, select-based timeouts, or errgroup\n- **Error handling**: See [go-error-handling](..\u002Fgo-error-handling\u002FSKILL.md) when deciding how to wrap or return `ctx.Err()` cancellation errors\n- **Interface design**: See [go-interfaces](..\u002Fgo-interfaces\u002FSKILL.md) when designing APIs that accept context alongside interfaces\n- **Request-scoped logging**: See [go-logging](..\u002Fgo-logging\u002FSKILL.md) when injecting loggers into context or adding request IDs to structured log output\n",{"name":5,"description":7},"main","19f4d52a98d557f3a645a2cfbbeb5bd54f28831d",".github\u002Fskills\u002Fgolang-skills\u002Fskills\u002Fgo-context","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi","https:\u002F\u002Fgithub.com\u002Fkongnakornna","http:\u002F\u002Fcmoniot.trueddns.com:52160","Technical Skills and Expertise\r\nLanguages and Frameworks\r\nFrontend: HTML, JavaScript, TypeScript, React, Vue, Angular, Next.js\r\nBackend: Node.js,Python,Golang","2026-10-06 23:01:46",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add kongnakornna\u002Fgolangapi --skill go-context",{"tool":38,"command":39},"bunx","bunx skills add kongnakornna\u002Fgolangapi --skill go-context",{"tool":41,"command":42},"pnpm","pnpm dlx skills add kongnakornna\u002Fgolangapi --skill go-context","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgolang-skills\u002Fskills\u002Fgo-context\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002FPATTERNS.md","REFERENCE","参考文档",6342,"https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgolang-skills\u002Fskills\u002Fgo-context\u002Freferences\u002FPATTERNS.md",[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7A0M9RJJ3383VEFYKABWV15","tb-writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-writing-plans\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7A0M4JKY4DEDRP1CBHT00WV","tb-using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-using-git-worktrees\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7A0KZ5HRAQAAT2KXR6146Q7","tb-test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-test-driven-development\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7A0KW92W3F18E2MRP8H62P2","tb-subagent-driven-development","Use when executing implementation plans with independent tasks in the current session","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-subagent-driven-development\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7A0KKYQCHYYRHA5J5BAP24M","tb-scrutinize","Outsider-perspective end-to-end review of a plan, PR, or code change. First questions intent and whether a simpler\u002Fmore elegant approach would achieve the same goal, then traces the actual code path (not just the diff) to verify the change does what it claims. Output is concise, actionable, and every call carries its rationale. Trigger on \u002Ftb-scrutinize and proactively whenever the user asks to review, audit, sanity-check, or get a second opinion on a plan, PR, diff, design doc, or proposed code change.","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-scrutinize\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7A0KFDR1V3RW7SW1XNHP82P","tb-requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-requesting-code-review\u002FSKILL.md",[],[]]