[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CC0VTVXRSXYYJFWHXG4G6C":3,"skill-same:01M6CC0VTVXRSXYYJFWHXG4G6C":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":13,"ownerHtmlUrl":50,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":51,"install":52,"resources":65},"01M6CC0VTVXRSXYYJFWHXG4G6C","prometheus-go-code-review","Go Prometheus 埋点审查","Reviews Prometheus instrumentation in Go code for proper metric types, labels, and patterns. Use when reviewing code with prometheus\u002Fclient_golang metrics.","审查 Go 代码中的 Prometheus 监控埋点，检查指标类型、标签和模式是否正确。在审查包含 prometheus\u002Fclient_golang 指标的代码时使用。","ray-manaloto\u002Fmacos-development-environment","ray-manaloto","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F227192835?v=4","01M6CBR7J13ZA01X5YB1A1QRJP",null,"01M6CBR7P0S3NS8ZV81JYNST14",1,"MIT","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskills\u002Fprometheus-go-code-review\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD3B3T8FK02S5JVCZA1M","运维监控与告警","SCENARIO","使用场景",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",[30,31,32,33,34,35,36,37,38,39],"code review","review","go","code","prometheus","go code review","prometheus go code review","golang","metrics","use","2026-11-10 10:12:30",false,"---\nname: prometheus-go-code-review\ndescription: Reviews Prometheus instrumentation in Go code for proper metric types, labels, and patterns. Use when reviewing code with prometheus\u002Fclient_golang metrics.\n---\n\n# Prometheus Go Code Review\n\n## Review Checklist\n\n- [ ] Metric types match measurement semantics (Counter\u002FGauge\u002FHistogram)\n- [ ] Labels have low cardinality (no user IDs, timestamps, paths)\n- [ ] Metric names follow conventions (snake_case, unit suffix)\n- [ ] Histograms use appropriate bucket boundaries\n- [ ] Metrics registered once, not per-request\n- [ ] Collectors don't panic on race conditions\n- [ ] \u002Fmetrics endpoint exposed and accessible\n\n## Metric Type Selection\n\n| Measurement | Type | Example |\n|-------------|------|---------|\n| Requests processed | Counter | `requests_total` |\n| Items in queue | Gauge | `queue_length` |\n| Request duration | Histogram | `request_duration_seconds` |\n| Concurrent connections | Gauge | `active_connections` |\n| Errors since start | Counter | `errors_total` |\n| Memory usage | Gauge | `memory_bytes` |\n\n## Critical Anti-Patterns\n\n### 1. High Cardinality Labels\n\n```go\n\u002F\u002F BAD - unique per user\u002Frequest\ncounter := promauto.NewCounterVec(\n    prometheus.CounterOpts{Name: \"requests_total\"},\n    []string{\"user_id\", \"path\"},  \u002F\u002F millions of series!\n)\ncounter.WithLabelValues(userID, request.URL.Path).Inc()\n\n\u002F\u002F GOOD - bounded label values\ncounter := promauto.NewCounterVec(\n    prometheus.CounterOpts{Name: \"requests_total\"},\n    []string{\"method\", \"status_code\"},  \u002F\u002F \u003C100 series\n)\ncounter.WithLabelValues(r.Method, statusCode).Inc()\n```\n\n### 2. Wrong Metric Type\n\n```go\n\u002F\u002F BAD - using gauge for monotonic value\nrequestCount := promauto.NewGauge(prometheus.GaugeOpts{\n    Name: \"http_requests\",\n})\nrequestCount.Inc()  \u002F\u002F should be Counter!\n\n\u002F\u002F GOOD\nrequestCount := promauto.NewCounter(prometheus.CounterOpts{\n    Name: \"http_requests_total\",\n})\nrequestCount.Inc()\n```\n\n### 3. Registering Per-Request\n\n```go\n\u002F\u002F BAD - new metric per request\nfunc handler(w http.ResponseWriter, r *http.Request) {\n    counter := prometheus.NewCounter(...)  \u002F\u002F creates new each time!\n    prometheus.MustRegister(counter)       \u002F\u002F panics on duplicate!\n}\n\n\u002F\u002F GOOD - register once\nvar requestCounter = promauto.NewCounter(prometheus.CounterOpts{\n    Name: \"http_requests_total\",\n})\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n    requestCounter.Inc()\n}\n```\n\n### 4. Missing Unit Suffix\n\n```go\n\u002F\u002F BAD\nduration := promauto.NewHistogram(prometheus.HistogramOpts{\n    Name: \"request_duration\",  \u002F\u002F no unit!\n})\n\n\u002F\u002F GOOD\nduration := promauto.NewHistogram(prometheus.HistogramOpts{\n    Name: \"request_duration_seconds\",  \u002F\u002F unit in name\n})\n```\n\n## Good Patterns\n\n### Metric Definition\n\n```go\nvar (\n    httpRequests = promauto.NewCounterVec(\n        prometheus.CounterOpts{\n            Namespace: \"myapp\",\n            Subsystem: \"http\",\n            Name:      \"requests_total\",\n            Help:      \"Total HTTP requests processed\",\n        },\n        []string{\"method\", \"status\"},\n    )\n\n    httpDuration = promauto.NewHistogramVec(\n        prometheus.HistogramOpts{\n            Namespace: \"myapp\",\n            Subsystem: \"http\",\n            Name:      \"request_duration_seconds\",\n            Help:      \"HTTP request latencies\",\n            Buckets:   []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10},\n        },\n        []string{\"method\"},\n    )\n)\n```\n\n### Middleware Pattern\n\n```go\nfunc metricsMiddleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        timer := prometheus.NewTimer(httpDuration.WithLabelValues(r.Method))\n        defer timer.ObserveDuration()\n\n        wrapped := &responseWriter{ResponseWriter: w, status: 200}\n        next.ServeHTTP(wrapped, r)\n\n        httpRequests.WithLabelValues(r.Method, strconv.Itoa(wrapped.status)).Inc()\n    })\n}\n```\n\n### Exposing Metrics\n\n```go\nimport \"github.com\u002Fprometheus\u002Fclient_golang\u002Fprometheus\u002Fpromhttp\"\n\nfunc main() {\n    http.Handle(\"\u002Fmetrics\", promhttp.Handler())\n    http.ListenAndServe(\":9090\", nil)\n}\n```\n\n## Review Questions\n\n1. Are metric types correct (Counter vs Gauge vs Histogram)?\n2. Are label values bounded (no UUIDs, timestamps, paths)?\n3. Do metric names include units (_seconds, _bytes)?\n4. Are metrics registered once (not per-request)?\n5. Is \u002Fmetrics endpoint properly exposed?\n","# Prometheus Go Code Review\n\n## Review Checklist\n\n- [ ] Metric types match measurement semantics (Counter\u002FGauge\u002FHistogram)\n- [ ] Labels have low cardinality (no user IDs, timestamps, paths)\n- [ ] Metric names follow conventions (snake_case, unit suffix)\n- [ ] Histograms use appropriate bucket boundaries\n- [ ] Metrics registered once, not per-request\n- [ ] Collectors don't panic on race conditions\n- [ ] \u002Fmetrics endpoint exposed and accessible\n\n## Metric Type Selection\n\n| Measurement | Type | Example |\n|-------------|------|---------|\n| Requests processed | Counter | `requests_total` |\n| Items in queue | Gauge | `queue_length` |\n| Request duration | Histogram | `request_duration_seconds` |\n| Concurrent connections | Gauge | `active_connections` |\n| Errors since start | Counter | `errors_total` |\n| Memory usage | Gauge | `memory_bytes` |\n\n## Critical Anti-Patterns\n\n### 1. High Cardinality Labels\n\n```go\n\u002F\u002F BAD - unique per user\u002Frequest\ncounter := promauto.NewCounterVec(\n    prometheus.CounterOpts{Name: \"requests_total\"},\n    []string{\"user_id\", \"path\"},  \u002F\u002F millions of series!\n)\ncounter.WithLabelValues(userID, request.URL.Path).Inc()\n\n\u002F\u002F GOOD - bounded label values\ncounter := promauto.NewCounterVec(\n    prometheus.CounterOpts{Name: \"requests_total\"},\n    []string{\"method\", \"status_code\"},  \u002F\u002F \u003C100 series\n)\ncounter.WithLabelValues(r.Method, statusCode).Inc()\n```\n\n### 2. Wrong Metric Type\n\n```go\n\u002F\u002F BAD - using gauge for monotonic value\nrequestCount := promauto.NewGauge(prometheus.GaugeOpts{\n    Name: \"http_requests\",\n})\nrequestCount.Inc()  \u002F\u002F should be Counter!\n\n\u002F\u002F GOOD\nrequestCount := promauto.NewCounter(prometheus.CounterOpts{\n    Name: \"http_requests_total\",\n})\nrequestCount.Inc()\n```\n\n### 3. Registering Per-Request\n\n```go\n\u002F\u002F BAD - new metric per request\nfunc handler(w http.ResponseWriter, r *http.Request) {\n    counter := prometheus.NewCounter(...)  \u002F\u002F creates new each time!\n    prometheus.MustRegister(counter)       \u002F\u002F panics on duplicate!\n}\n\n\u002F\u002F GOOD - register once\nvar requestCounter = promauto.NewCounter(prometheus.CounterOpts{\n    Name: \"http_requests_total\",\n})\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n    requestCounter.Inc()\n}\n```\n\n### 4. Missing Unit Suffix\n\n```go\n\u002F\u002F BAD\nduration := promauto.NewHistogram(prometheus.HistogramOpts{\n    Name: \"request_duration\",  \u002F\u002F no unit!\n})\n\n\u002F\u002F GOOD\nduration := promauto.NewHistogram(prometheus.HistogramOpts{\n    Name: \"request_duration_seconds\",  \u002F\u002F unit in name\n})\n```\n\n## Good Patterns\n\n### Metric Definition\n\n```go\nvar (\n    httpRequests = promauto.NewCounterVec(\n        prometheus.CounterOpts{\n            Namespace: \"myapp\",\n            Subsystem: \"http\",\n            Name:      \"requests_total\",\n            Help:      \"Total HTTP requests processed\",\n        },\n        []string{\"method\", \"status\"},\n    )\n\n    httpDuration = promauto.NewHistogramVec(\n        prometheus.HistogramOpts{\n            Namespace: \"myapp\",\n            Subsystem: \"http\",\n            Name:      \"request_duration_seconds\",\n            Help:      \"HTTP request latencies\",\n            Buckets:   []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10},\n        },\n        []string{\"method\"},\n    )\n)\n```\n\n### Middleware Pattern\n\n```go\nfunc metricsMiddleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        timer := prometheus.NewTimer(httpDuration.WithLabelValues(r.Method))\n        defer timer.ObserveDuration()\n\n        wrapped := &responseWriter{ResponseWriter: w, status: 200}\n        next.ServeHTTP(wrapped, r)\n\n        httpRequests.WithLabelValues(r.Method, strconv.Itoa(wrapped.status)).Inc()\n    })\n}\n```\n\n### Exposing Metrics\n\n```go\nimport \"github.com\u002Fprometheus\u002Fclient_golang\u002Fprometheus\u002Fpromhttp\"\n\nfunc main() {\n    http.Handle(\"\u002Fmetrics\", promhttp.Handler())\n    http.ListenAndServe(\":9090\", nil)\n}\n```\n\n## Review Questions\n\n1. Are metric types correct (Counter vs Gauge vs Histogram)?\n2. Are label values bounded (no UUIDs, timestamps, paths)?\n3. Do metric names include units (_seconds, _bytes)?\n4. Are metrics registered once (not per-request)?\n5. Is \u002Fmetrics endpoint properly exposed?\n",{"name":5,"description":7},"main","716b17df3ef6719d88aeac180015008b7ddfff6f",".claude\u002Fskills\u002Fskills\u002Fprometheus-go-code-review",0,"https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment","https:\u002F\u002Fgithub.com\u002Fray-manaloto","2026-08-03 16:55:50",{"source":9,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add ray-manaloto\u002Fmacos-development-environment --skill prometheus-go-code-review",{"tool":58,"command":59},"bunx","bunx skills add ray-manaloto\u002Fmacos-development-environment --skill prometheus-go-code-review",{"tool":61,"command":62},"pnpm","pnpm dlx skills add ray-manaloto\u002Fmacos-development-environment --skill prometheus-go-code-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fskills\u002Fprometheus-go-code-review\u002FSKILL.md",true,[],[67,84,102,120,136,150],{"skillNo":68,"name":69,"nameZh":13,"description":70,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":40},"01M6CC8DXNJ39YWERYTWCGGCGG","next-workflow-step","Use this skill when the user wants to transition to the next workflow step, wrap up a session cleanly, prepare a handoff, or says things like \"next step\", \"continue the workflow\", \"wrap up\", \"hand off\", \"move to the next phase\", \"what's next in embrace\", or \"prepare for \u002Fclear\". Also triggers when the current octo:embrace phase appears complete and no explicit next action is set.","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002Frsm-subagents\u002Fplugins\u002Fworkflow-toolkit\u002Fskills\u002Fnext-workflow-step\u002FSKILL.md",[],[74,75,76,39,77,78,79,80,81,82,83],"next workflow step","workflow","up","session","user","wrap up","continue","handoff","prepare","SET",{"skillNo":85,"name":86,"nameZh":13,"description":87,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":40},"01M6CC8BRZBQHEBXGMKPDM422P","source-discovery","This skill should be used when the user asks to \"find sources\", \"discover URLs\", \"catalog a source\", \"classify a URL\", \"search for libraries\", \"check what exists\", or mentions source discovery, URL cataloging, source classification, or research source management.","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002Frsm-subagents\u002Fplugins\u002Fresearch-review-toolkit\u002Fskills\u002Fsource-discovery\u002FSKILL.md",[],[91,92,93,94,95,96,97,98,99,78,100,101],"discovery","source discovery","research","libraries","search","classification","find","check","management","catalog","find sources",{"skillNo":103,"name":104,"nameZh":13,"description":105,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":40},"01M6CC89CGJP69A0PS22G2H1FV","review-synthesis","This skill should be used when the user asks to \"summarize review findings\", \"prioritize fixes\", \"rank review issues\", \"combine reviewer feedback\", \"create action items from review\", or mentions review synthesis, finding prioritization, severity ranking, or review result summarization.","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002Frsm-subagents\u002Fplugins\u002Fresearch-review-toolkit\u002Fskills\u002Freview-synthesis\u002FSKILL.md",[],[31,109,110,111,112,113,114,78,115,116,117,118,119],"review synthesis","Synthesis","prioritize","create action","feedback","reviewer","summarize","prioritization","create","issues","severity",{"skillNo":121,"name":122,"nameZh":13,"description":123,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":40},"01M6CC872EZ9GRJY0HRCG0RT2M","research-scoring","This skill should be used when the user asks to \"score research\", \"check research quality\", \"evaluate coverage\", \"measure improvement\", \"assess research completeness\", or mentions research scoring, quality metrics, coverage gaps, improvement baseline, or research pipeline status.","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002Frsm-subagents\u002Fplugins\u002Fresearch-review-toolkit\u002Fskills\u002Fresearch-scoring\u002FSKILL.md",[],[127,93,128,129,38,130,131,132,98,78,133,134,135],"research scoring","status","coverage gaps","pipeline","baseline","quality","coverage","pipeline status","research quality",{"skillNo":137,"name":138,"nameZh":13,"description":139,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":40},"01M6CC852HSDS1FE4EJAT0RHGR","notebooklm-integration","This skill should be used when the user asks to \"ingest into NotebookLM\", \"query NotebookLM\", \"add sources to notebook\", \"cross-source synthesis\", \"check stale sources\", or mentions NotebookLM, notebook integration, source ingestion, or knowledge consolidation.","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002Frsm-subagents\u002Fplugins\u002Fresearch-review-toolkit\u002Fskills\u002Fnotebooklm-integration\u002FSKILL.md",[],[143,144,145,146,98,78,147,148,149,110],"notebooklm integration","notebooklm","integration","knowledge","ingestion","ingest","stale",{"skillNo":151,"name":152,"nameZh":13,"description":153,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":40},"01M6CC82Z4V3205KCJWQZPS2VG","evidence-synthesis","This skill should be used when the user asks to \"synthesize findings\", \"combine research\", \"cross-reference sources\", \"summarize evidence\", \"write a deep review\", or mentions evidence synthesis, finding consolidation, cross-source analysis, or research summarization.","https:\u002F\u002Fgithub.com\u002Fray-manaloto\u002Fmacos-development-environment\u002Fblob\u002Fmain\u002Frsm-subagents\u002Fplugins\u002Fresearch-review-toolkit\u002Fskills\u002Fevidence-synthesis\u002FSKILL.md",[],[157,110,158,115,93,159,160,161,78,162,31],"evidence synthesis","evidence","deep review","analysis","write","reference"]