[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F1XAV10G4P0KH2EBQ609YD":3,"skill-same:01M6F1XAV10G4P0KH2EBQ609YD":104},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6F1XAV10G4P0KH2EBQ609YD","golang-context",null,"Idiomatic context.Context usage in Golang — creation, propagation, cancellation, timeouts, deadlines, context values, and cross-service tracing. Apply when working with context.Context in any Go code.","luokai0\u002Fai-agent-skills-by-luo-kai","luokai0","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F266954973?v=4","01M6E16VNT42JB8B3X3254QWJ7","luo kai","01M6E16VTFVP6S5XJF1V1MPV90",14,"MIT","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"golang","golang context","context","write","with","false","propagation","creation","cc","ai coding","edit","github","read","projects","Bash","https","code","lint","ai coding agents","coding agents","2026-11-10 10:12:30",false,"---\nname: golang-context\ndescription: \"Idiomatic context.Context usage in Golang — creation, propagation, cancellation, timeouts, deadlines, context values, and cross-service tracing. Apply when working with context.Context in any Go code.\"\nuser-invocable: false\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.1.1\"\n  openclaw:\n    emoji: \"?\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n    install: []\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\n---\n\n> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-context` skill takes precedence.\n\n# Go context.Context Best Practices\n\n`context.Context` is Go's mechanism for propagating cancellation signals, deadlines, and request-scoped values across API boundaries and between goroutines. Think of it as the \"session\" of a request — it ties together every operation that belongs to the same unit of work.\n\n## Best Practices Summary\n\n1. The same context MUST be propagated through the entire request lifecycle: HTTP handler → service → DB → external APIs\n2. `ctx` MUST be the first parameter, named `ctx context.Context`\n3. NEVER store context in a struct — pass explicitly through function parameters\n4. NEVER pass `nil` context — use `context.TODO()` if unsure\n5. `cancel()` MUST always be deferred immediately after `WithCancel`\u002F`WithTimeout`\u002F`WithDeadline`\n6. `context.Background()` MUST only be used at the top level (main, init, tests)\n7. **Use `context.TODO()`** as a placeholder when you know a context is needed but don't have one yet\n8. NEVER create a new `context.Background()` in the middle of a request path\n9. Context value keys MUST be unexported types to prevent collisions\n10. Context values MUST only carry request-scoped metadata — NEVER function parameters\n11. **Use `context.WithoutCancel`** (Go 1.21+) when spawning background work that must outlive the parent request\n\n## Creating Contexts\n\n| Situation | Use |\n| --- | --- |\n| Entry point (main, init, test) | `context.Background()` |\n| Function needs context but caller doesn't provide one yet | `context.TODO()` |\n| Inside an HTTP handler | `r.Context()` |\n| Need cancellation control | `context.WithCancel(parentCtx)` |\n| Need a deadline\u002Ftimeout | `context.WithTimeout(parentCtx, duration)` |\n\n## Context Propagation: The Core Principle\n\nThe most important rule: **propagate the same context through the entire call chain**. When you propagate correctly, cancelling the parent context cancels all downstream work automatically.\n\n```go\n\u002F\u002F ✗ Bad — creates a new context, breaking the chain\nfunc (s *OrderService) Create(ctx context.Context, order Order) error {\n    return s.db.ExecContext(context.Background(), \"INSERT INTO orders ...\", order.ID)\n}\n\n\u002F\u002F ✓ Good — propagates the caller's context\nfunc (s *OrderService) Create(ctx context.Context, order Order) error {\n    return s.db.ExecContext(ctx, \"INSERT INTO orders ...\", order.ID)\n}\n```\n\n## Deep Dives\n\n- **[Cancellation, Timeouts & Deadlines](.\u002Freferences\u002Fcancellation.md)** — How cancellation propagates: `WithCancel` for manual cancellation, `WithTimeout` for automatic cancellation after a duration, `WithDeadline` for absolute time deadlines. Patterns for listening (`\u003C-ctx.Done()`) in concurrent code, `AfterFunc` callbacks, and `WithoutCancel` for operations that must outlive their parent request (e.g., audit logs).\n\n- **[Context Values & Cross-Service Tracing](.\u002Freferences\u002Fvalues-tracing.md)** — Safe context value patterns: unexported key types to prevent namespace collisions, when to use context values (request ID, user ID) vs function parameters. Trace context propagation: OpenTelemetry trace headers, correlation IDs for log aggregation, and marshaling\u002Funmarshaling context across service boundaries.\n\n- **[Context in HTTP Servers & Service Calls](.\u002Freferences\u002Fhttp-services.md)** — HTTP handler context: `r.Context()` for request-scoped cancellation, middleware integration, and propagating to services. HTTP client patterns: `NewRequestWithContext`, client timeouts, and retries with context awareness. Database operations: always use `*Context` variants (`QueryContext`, `ExecContext`) to respect deadlines.\n\n## Cross-References\n\n- → See the `samber\u002Fcc-skills-golang@golang-concurrency` skill for goroutine cancellation patterns using context\n- → See the `samber\u002Fcc-skills-golang@golang-database` skill for context-aware database operations (QueryContext, ExecContext)\n- → See the `samber\u002Fcc-skills-golang@golang-observability` skill for trace context propagation with OpenTelemetry\n- → See the `samber\u002Fcc-skills-golang@golang-design-patterns` skill for timeout and resilience patterns\n\n## Enforce with Linters\n\nMany context pitfalls are caught automatically by linters: `govet`, `staticcheck`. → See the `samber\u002Fcc-skills-golang@golang-linter` skill for configuration and usage.\n","> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-context` skill takes precedence.\n\n# Go context.Context Best Practices\n\n`context.Context` is Go's mechanism for propagating cancellation signals, deadlines, and request-scoped values across API boundaries and between goroutines. Think of it as the \"session\" of a request — it ties together every operation that belongs to the same unit of work.\n\n## Best Practices Summary\n\n1. The same context MUST be propagated through the entire request lifecycle: HTTP handler → service → DB → external APIs\n2. `ctx` MUST be the first parameter, named `ctx context.Context`\n3. NEVER store context in a struct — pass explicitly through function parameters\n4. NEVER pass `nil` context — use `context.TODO()` if unsure\n5. `cancel()` MUST always be deferred immediately after `WithCancel`\u002F`WithTimeout`\u002F`WithDeadline`\n6. `context.Background()` MUST only be used at the top level (main, init, tests)\n7. **Use `context.TODO()`** as a placeholder when you know a context is needed but don't have one yet\n8. NEVER create a new `context.Background()` in the middle of a request path\n9. Context value keys MUST be unexported types to prevent collisions\n10. Context values MUST only carry request-scoped metadata — NEVER function parameters\n11. **Use `context.WithoutCancel`** (Go 1.21+) when spawning background work that must outlive the parent request\n\n## Creating Contexts\n\n| Situation | Use |\n| --- | --- |\n| Entry point (main, init, test) | `context.Background()` |\n| Function needs context but caller doesn't provide one yet | `context.TODO()` |\n| Inside an HTTP handler | `r.Context()` |\n| Need cancellation control | `context.WithCancel(parentCtx)` |\n| Need a deadline\u002Ftimeout | `context.WithTimeout(parentCtx, duration)` |\n\n## Context Propagation: The Core Principle\n\nThe most important rule: **propagate the same context through the entire call chain**. When you propagate correctly, cancelling the parent context cancels all downstream work automatically.\n\n```go\n\u002F\u002F ✗ Bad — creates a new context, breaking the chain\nfunc (s *OrderService) Create(ctx context.Context, order Order) error {\n    return s.db.ExecContext(context.Background(), \"INSERT INTO orders ...\", order.ID)\n}\n\n\u002F\u002F ✓ Good — propagates the caller's context\nfunc (s *OrderService) Create(ctx context.Context, order Order) error {\n    return s.db.ExecContext(ctx, \"INSERT INTO orders ...\", order.ID)\n}\n```\n\n## Deep Dives\n\n- **[Cancellation, Timeouts & Deadlines](.\u002Freferences\u002Fcancellation.md)** — How cancellation propagates: `WithCancel` for manual cancellation, `WithTimeout` for automatic cancellation after a duration, `WithDeadline` for absolute time deadlines. Patterns for listening (`\u003C-ctx.Done()`) in concurrent code, `AfterFunc` callbacks, and `WithoutCancel` for operations that must outlive their parent request (e.g., audit logs).\n\n- **[Context Values & Cross-Service Tracing](.\u002Freferences\u002Fvalues-tracing.md)** — Safe context value patterns: unexported key types to prevent namespace collisions, when to use context values (request ID, user ID) vs function parameters. Trace context propagation: OpenTelemetry trace headers, correlation IDs for log aggregation, and marshaling\u002Funmarshaling context across service boundaries.\n\n- **[Context in HTTP Servers & Service Calls](.\u002Freferences\u002Fhttp-services.md)** — HTTP handler context: `r.Context()` for request-scoped cancellation, middleware integration, and propagating to services. HTTP client patterns: `NewRequestWithContext`, client timeouts, and retries with context awareness. Database operations: always use `*Context` variants (`QueryContext`, `ExecContext`) to respect deadlines.\n\n## Cross-References\n\n- → See the `samber\u002Fcc-skills-golang@golang-concurrency` skill for goroutine cancellation patterns using context\n- → See the `samber\u002Fcc-skills-golang@golang-database` skill for context-aware database operations (QueryContext, ExecContext)\n- → See the `samber\u002Fcc-skills-golang@golang-observability` skill for trace context propagation with OpenTelemetry\n- → See the `samber\u002Fcc-skills-golang@golang-design-patterns` skill for timeout and resilience patterns\n\n## Enforce with Linters\n\nMany context pitfalls are caught automatically by linters: `govet`, `staticcheck`. → See the `samber\u002Fcc-skills-golang@golang-linter` skill for configuration and usage.\n",{"name":5,"license":15,"metadata":44,"description":7,"allowed-tools":54,"compatibility":55,"user-invocable":40},{"author":45,"version":46,"openclaw":47},"samber","1.1.1",{"emoji":48,"install":49,"homepage":50,"requires":51},"?",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":52},[53],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent","Designed for Claude Code or similar AI coding agents, and for projects using Golang.","main","4d2fb89cdfb75f3f6fd3c6c5ec9ad90ea129eb3c","ai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context",2,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai","https:\u002F\u002Fgithub.com\u002Fluokai0","a solo builder.","2026-05-06 04:29:04",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill golang-context",{"tool":70,"command":71},"bunx","bunx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill golang-context",{"tool":73,"command":74},"pnpm","pnpm dlx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill golang-context","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002FSKILL.md",true,[78,84,88,92,96,100],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"_meta.json","REFERENCE","参考文档",133,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002F_meta.json",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},".clawhub\u002Forigin.json",146,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002F.clawhub\u002Forigin.json",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"evals\u002Fevals.json",12535,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002Fevals\u002Fevals.json",{"path":93,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fcancellation.md",5194,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002Freferences\u002Fcancellation.md",{"path":97,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fhttp-services.md",3588,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002Freferences\u002Fhttp-services.md",{"path":101,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fvalues-tracing.md",3162,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fgolang-context\u002Freferences\u002Fvalues-tracing.md",[105,131,148,170,194,219],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":39},"01M6F2SKTE208174C7S7JJCZC7","write-contracts","Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and storage type guidance. Includes comprehensive storage decision framework for optimal data structure selection. Triggers on: 'write contract', 'create NFT collection', 'build marketplace', 'implement minting', 'generate Move module', 'create token contract', 'build DAO', 'implement staking'. Ask storage questions when: 'store', 'track', 'registry', 'mapping', 'list', 'collection'.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fwrite-contracts\u002FSKILL.md",[],[22,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],"contracts","write contracts","storage","secure","create","generate","collection","model","decision","ask","smart-contracts","selection","objects","structure","nft","token","aptos","critical","move",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":39},"01M6F2RFXJ6T9MKW0A7N7GM45B","web-search","通用网络搜索技能，支持多引擎搜索（百度、必应、DuckDuckGo），无需API密钥即可获取实时信息","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fweb-search-ex-skill\u002FSKILL.md",[],[138,139,140,141,142,143,144,145,146,147],"web","search","web search","搜索","baidu","bing","duckduckgo","百度","多引擎","internet",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":39},"01M6F2K968G1FZEZFPW2E6B222","solo-build","Execute implementation plan tasks with TDD workflow, auto-commit, and phase gates. Use when user says \"build it\", \"start building\", \"execute plan\", \"implement tasks\", \"ship it\", or references a track ID. Do NOT use for planning (use \u002Fplan) or scaffolding (use \u002Fscaffold).","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fsolo-build\u002FSKILL.md",[],[155,156,157,158,159,160,161,35,139,33,162,31,22,163,164,165,166,167,168,169],"build","solo","solo build","MCP","workflow","commit","tasks","plan","auto","references","context7","query","scaffolding","ship it","project",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":39},"01M6F2GKN39SGHSPWYB3662YC8","react-email","Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Freact-email-skills\u002FSKILL.md",[],[177,178,179,30,180,181,182,183,184,34,185,186,187,188,189,190,191,192,193,23],"react","email","react email","editor","components","react components","component","welcome","notifications","password","node","use","html","resend","visual","emails","rendering",{"skillNo":195,"name":196,"nameZh":6,"description":197,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":198,"categories":199,"keywords":200,"publishedAt":39},"01M6F2FBVGVDFSG8SSFJGXA40C","APITester Agent-Driven API Testing","Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fopenclaw-api-tester\u002FSKILL.md",[],[201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218],"testing","api","api testing","driven","APITester Agent Driven API Testing","test","run","postman","results","plain english","tester","endpoints","document","get","define","tests","english","api-tester",{"skillNo":220,"name":221,"nameZh":6,"description":222,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":223,"categories":224,"keywords":225,"publishedAt":39},"01M6F273Y3NGAPVJZ608BC0G9G","hubspot-implementation-plan","Generate a phased implementation plan from a HubSpot audit report. Creates prioritized, sequenced cleanup processes with effort estimates, dependencies, and automation feasibility. Use after running \u002Fhubspot-audit.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fhubspot-implementation-plan\u002FSKILL.md",[],[162,226,227,228,229,230,231,117,232,233,234,235,236,188,237,238,23,239],"implementation","hubspot","hubspot implementation plan","automation","feasibility","cleanup","planning","report","audit","audit report","phased implementation","dependencies","processes","hubspot audit"]