[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79ZANDADBT5M19AHSSHY8FP":3,"skill-same:01M79ZANDADBT5M19AHSSHY8FP":66},{"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":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":51},"01M79ZANDADBT5M19AHSSHY8FP","go-observability",null,"Structured logging, distributed tracing, metrics, and health checks for Go services. Covers slog, OpenTelemetry, Prometheus, and observability best practices. Use when: \"add logging\", \"structured logs\", \"add tracing\", \"OpenTelemetry\", \"add metrics\", \"Prometheus\", \"observability\", \"instrument this code\". Not for: pprof profiling (go-performance-review), error handling (go-error-handling), health endpoints (go-api-design).","kongnakornna\u002Fgolangapi","kongnakornna","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F10528904?v=4","01M79Z5JQPPV5CWQHXS235Q9MD","Kongnakorn Jantakun","01M79Z5JRHJJJ6PR2DGQS4P985",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-observability\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: go-observability\ndescription: >\n  Structured logging, distributed tracing, metrics, and health checks for Go\n  services. Covers slog, OpenTelemetry, Prometheus, and observability best\n  practices. Use when: \"add logging\", \"structured logs\", \"add tracing\",\n  \"OpenTelemetry\", \"add metrics\", \"Prometheus\", \"observability\", \"instrument\n  this code\".\n  Not for: pprof profiling (go-performance-review), error handling\n  (go-error-handling), health endpoints (go-api-design).\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents working on Go projects. Requires the Go toolchain.\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(gofmt:*)\nmetadata:\n  author: eduardo-sl\n  version: \"1.2.0\"\n---\n\n# Go Observability\n\nObservability is not optional for production services. Every service must produce\nstructured logs, expose metrics, and propagate trace context. Use the stdlib\n`log\u002Fslog` for logging and OpenTelemetry for tracing and metrics.\n\nDetailed reference material, loaded on demand:\n\n- `references\u002Fslog.md` — handler setup, logger injection, child loggers.\n- `references\u002Ftracing.md` — tracer provider, spans, propagation, shutdown.\n- `references\u002Fmetrics.md` — metric definitions, HTTP instrumentation.\n\nRead a reference file only when the section below is not enough.\n\n## 1. Structured Logging with slog\n\nUse `log\u002Fslog` (Go 1.21+) with a JSON handler in production. Every line is\nkey-value pairs, never a formatted sentence:\n\n```go\n\u002F\u002F ✅ Good — structured, leveled\nlogger.Info(\"user created\", slog.String(\"user_id\", user.ID), slog.Duration(\"latency\", elapsed))\n\n\u002F\u002F ❌ Bad — unparseable in production\nlog.Printf(\"user %s created in %v\", user.ID, elapsed)\n```\n\nInject the logger as a dependency; never reach for a package-level global.\nDerive child loggers with `logger.With(...)` so component, method and request\nID are attached once instead of at every call site. See `references\u002Fslog.md`.\n\n### Log levels — use them consistently\n\n| Level | Use for |\n|---|---|\n| `Debug` | Verbose diagnostic info, disabled in production |\n| `Info` | Normal operations: request received, job completed |\n| `Warn` | Recoverable issues: retry succeeded, deprecated usage |\n| `Error` | Failures requiring attention: DB down, external call failed |\n\nNEVER log at Error level for expected conditions (user not found → Info or Warn).\n\n### Sensitive data — NEVER log\n\n- Passwords, tokens, API keys\n- Full credit card numbers, SSNs\n- Raw request bodies containing PII\n\n```go\n\u002F\u002F ✅ Good — redacted\nlogger.Info(\"auth attempt\", slog.String(\"user\", email), slog.Bool(\"success\", ok))\n\n\u002F\u002F ❌ Bad — leaks credentials\nlogger.Info(\"auth attempt\", slog.String(\"password\", password))\n```\n\n## 2. Distributed Tracing with OpenTelemetry\n\nStart a span for every operation worth seeing on a waterfall — inbound\nrequests, DB calls, outbound HTTP, meaningful business steps — and always\n`defer span.End()`.\n\nRules the reference examples follow:\n\n- Name the span after the operation (`GetUser`, `db.query`), never after the\n  fully-qualified function, and never `doStuff`.\n- On failure call `span.RecordError(err)` and `span.SetStatus(codes.Error, ...)`,\n  or the trace shows a green span for a failed request.\n- Pass `ctx` down the whole chain. A `context.Background()` mid-chain silently\n  starts a new trace and breaks the parent link.\n\nSetup and examples in `references\u002Ftracing.md`.\n\n## 3. Metrics with OpenTelemetry \u002F Prometheus\n\n| Type | Use for | Example |\n|---|---|---|\n| Counter | Monotonically increasing values | Requests total, errors total |\n| Gauge | Values that go up and down | Active connections, queue depth |\n| Histogram | Distribution of values | Request latency, response size |\n\nNaming is `\u003Cnamespace>_\u003Csubsystem>_\u003Cname>_\u003Cunit>`:\n\n```text\nhttp_request_duration_seconds     ✅ (unit in name)\nhttp_requests_total               ✅ (counter with _total suffix)\ndb_connections_active             ✅ (gauge, no suffix needed)\nuser_signups                      ❌ (missing _total for counter)\nrequestLatency                    ❌ (camelCase, no unit)\n```\n\nKeep cardinality bounded. Label with the route pattern, method and status —\nnever a user ID, request ID or raw `r.URL.Path`, each of which mints a new\ntime series per value and eventually takes the metrics backend down.\n\nDefinitions and middleware in `references\u002Fmetrics.md`.\n\n## 4. Connecting Logs, Traces, and Metrics\n\nA log line without a trace ID cannot be joined to the request that produced\nit. Pull `trace.SpanContextFromContext(ctx)` and attach `trace_id` and\n`span_id` to the logger at the top of each handler or service method.\n\n## 5. Graceful Shutdown of Telemetry\n\nThe batch span processor holds spans in memory. Call `tp.Shutdown(ctx)` with\nits own timeout on the way out, or the last seconds before a crash — the\ninteresting ones — never reach the collector.\n\nBoth examples in `references\u002Ftracing.md`.\n\n## Verification Checklist\n\n1. All logging uses `log\u002Fslog` with structured key-value pairs, not `fmt.Printf` or `log.Printf`\n2. Logger is injected as a dependency, not used as a global\n3. No sensitive data (passwords, tokens, PII) in log output\n4. Trace context is propagated through all function calls via `context.Context`\n5. Spans are created for significant operations (DB calls, HTTP requests, business logic)\n6. Spans record errors with `span.RecordError(err)` and set error status\n7. Metrics follow naming conventions: `_seconds`, `_total`, `_bytes`\n8. No high-cardinality labels (user IDs, request IDs) in metrics\n9. Telemetry providers are shut down gracefully on service exit\n10. Trace IDs are included in log entries for correlation\n","# Go Observability\n\nObservability is not optional for production services. Every service must produce\nstructured logs, expose metrics, and propagate trace context. Use the stdlib\n`log\u002Fslog` for logging and OpenTelemetry for tracing and metrics.\n\nDetailed reference material, loaded on demand:\n\n- `references\u002Fslog.md` — handler setup, logger injection, child loggers.\n- `references\u002Ftracing.md` — tracer provider, spans, propagation, shutdown.\n- `references\u002Fmetrics.md` — metric definitions, HTTP instrumentation.\n\nRead a reference file only when the section below is not enough.\n\n## 1. Structured Logging with slog\n\nUse `log\u002Fslog` (Go 1.21+) with a JSON handler in production. Every line is\nkey-value pairs, never a formatted sentence:\n\n```go\n\u002F\u002F ✅ Good — structured, leveled\nlogger.Info(\"user created\", slog.String(\"user_id\", user.ID), slog.Duration(\"latency\", elapsed))\n\n\u002F\u002F ❌ Bad — unparseable in production\nlog.Printf(\"user %s created in %v\", user.ID, elapsed)\n```\n\nInject the logger as a dependency; never reach for a package-level global.\nDerive child loggers with `logger.With(...)` so component, method and request\nID are attached once instead of at every call site. See `references\u002Fslog.md`.\n\n### Log levels — use them consistently\n\n| Level | Use for |\n|---|---|\n| `Debug` | Verbose diagnostic info, disabled in production |\n| `Info` | Normal operations: request received, job completed |\n| `Warn` | Recoverable issues: retry succeeded, deprecated usage |\n| `Error` | Failures requiring attention: DB down, external call failed |\n\nNEVER log at Error level for expected conditions (user not found → Info or Warn).\n\n### Sensitive data — NEVER log\n\n- Passwords, tokens, API keys\n- Full credit card numbers, SSNs\n- Raw request bodies containing PII\n\n```go\n\u002F\u002F ✅ Good — redacted\nlogger.Info(\"auth attempt\", slog.String(\"user\", email), slog.Bool(\"success\", ok))\n\n\u002F\u002F ❌ Bad — leaks credentials\nlogger.Info(\"auth attempt\", slog.String(\"password\", password))\n```\n\n## 2. Distributed Tracing with OpenTelemetry\n\nStart a span for every operation worth seeing on a waterfall — inbound\nrequests, DB calls, outbound HTTP, meaningful business steps — and always\n`defer span.End()`.\n\nRules the reference examples follow:\n\n- Name the span after the operation (`GetUser`, `db.query`), never after the\n  fully-qualified function, and never `doStuff`.\n- On failure call `span.RecordError(err)` and `span.SetStatus(codes.Error, ...)`,\n  or the trace shows a green span for a failed request.\n- Pass `ctx` down the whole chain. A `context.Background()` mid-chain silently\n  starts a new trace and breaks the parent link.\n\nSetup and examples in `references\u002Ftracing.md`.\n\n## 3. Metrics with OpenTelemetry \u002F Prometheus\n\n| Type | Use for | Example |\n|---|---|---|\n| Counter | Monotonically increasing values | Requests total, errors total |\n| Gauge | Values that go up and down | Active connections, queue depth |\n| Histogram | Distribution of values | Request latency, response size |\n\nNaming is `\u003Cnamespace>_\u003Csubsystem>_\u003Cname>_\u003Cunit>`:\n\n```text\nhttp_request_duration_seconds     ✅ (unit in name)\nhttp_requests_total               ✅ (counter with _total suffix)\ndb_connections_active             ✅ (gauge, no suffix needed)\nuser_signups                      ❌ (missing _total for counter)\nrequestLatency                    ❌ (camelCase, no unit)\n```\n\nKeep cardinality bounded. Label with the route pattern, method and status —\nnever a user ID, request ID or raw `r.URL.Path`, each of which mints a new\ntime series per value and eventually takes the metrics backend down.\n\nDefinitions and middleware in `references\u002Fmetrics.md`.\n\n## 4. Connecting Logs, Traces, and Metrics\n\nA log line without a trace ID cannot be joined to the request that produced\nit. Pull `trace.SpanContextFromContext(ctx)` and attach `trace_id` and\n`span_id` to the logger at the top of each handler or service method.\n\n## 5. Graceful Shutdown of Telemetry\n\nThe batch span processor holds spans in memory. Call `tp.Shutdown(ctx)` with\nits own timeout on the way out, or the last seconds before a crash — the\ninteresting ones — never reach the collector.\n\nBoth examples in `references\u002Ftracing.md`.\n\n## Verification Checklist\n\n1. All logging uses `log\u002Fslog` with structured key-value pairs, not `fmt.Printf` or `log.Printf`\n2. Logger is injected as a dependency, not used as a global\n3. No sensitive data (passwords, tokens, PII) in log output\n4. Trace context is propagated through all function calls via `context.Context`\n5. Spans are created for significant operations (DB calls, HTTP requests, business logic)\n6. Spans record errors with `span.RecordError(err)` and set error status\n7. Metrics follow naming conventions: `_seconds`, `_total`, `_bytes`\n8. No high-cardinality labels (user IDs, request IDs) in metrics\n9. Telemetry providers are shut down gracefully on service exit\n10. Trace IDs are included in log entries for correlation\n",{"name":5,"license":15,"metadata":24,"description":27,"allowed-tools":28,"compatibility":29,"user-invocable":30},{"author":25,"version":26},"eduardo-sl","1.2.0","Structured logging, distributed tracing, metrics, and health checks for Go services. Covers slog, OpenTelemetry, Prometheus, and observability best practices. Use when: \"add logging\", \"structured logs\", \"add tracing\", \"OpenTelemetry\", \"add metrics\", \"Prometheus\", \"observability\", \"instrument this code\". Not for: pprof profiling (go-performance-review), error handling (go-error-handling), health endpoints (go-api-design).\n","Read Edit Write Glob Grep Bash(go:*) Bash(gofmt:*)","Designed for Claude Code or similar AI coding agents working on Go projects. Requires the Go toolchain.",true,"main","19f4d52a98d557f3a645a2cfbbeb5bd54f28831d",".github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-observability","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":40,"prompt":50,"zipAvailable":30},[41,44,47],{"tool":42,"command":43},"npx","npx skills add kongnakornna\u002Fgolangapi --skill go-observability",{"tool":45,"command":46},"bunx","bunx skills add kongnakornna\u002Fgolangapi --skill go-observability",{"tool":48,"command":49},"pnpm","pnpm dlx skills add kongnakornna\u002Fgolangapi --skill go-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-observability\u002FSKILL.md",[52,58,62],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fmetrics.md","REFERENCE","参考文档",1551,"https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-observability\u002Freferences\u002Fmetrics.md",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fslog.md",1588,"https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-observability\u002Freferences\u002Fslog.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Ftracing.md",3304,"https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fgo-agent-skills\u002Fskills\u002F(safety)\u002Fgo-observability\u002Freferences\u002Ftracing.md",[67,75,82,89,96,103],{"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":71,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7A0M9RJJ3383VEFYKABWV15","tb-writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fkongnakornna\u002Fgolangapi\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftb-writing-plans\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"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":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"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":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"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":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"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":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"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",[],[]]