[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFMC0MZTS7558MTDCCBP58":3,"skill-same:01M6CFMC0MZTS7558MTDCCBP58":106},{"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":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":70,"commitSha":71,"skillDirectory":72,"forksCount":73,"repositoryHtmlUrl":74,"repositoryHomepageUrl":6,"ownerHtmlUrl":75,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":76,"install":77,"resources":89},"01M6CFMC0MZTS7558MTDCCBP58","golang-samber-oops",null,"Structured error handling in Golang with samber\u002Foops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber\u002Foops, or when the codebase already imports github.com\u002Fsamber\u002Foops.","rockcookies\u002Fskills","rockcookies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3498265?v=4","01M6CF9C16X3SDSKZX6ANH7HQM","Jacob He","01M6CF9C53JP821FCW6R9B00AJ",1,"MIT","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-samber-oops\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"golang samber oops","oops","golang","recovery","context7","webfetch","read","stack","projects","gopls","Bash","MCP","messages","integration","harness","error handling","code","lint","codex","github","2026-11-10 10:12:30",false,"---\nname: golang-samber-oops\ndescription: >-\n  Structured error handling in Golang with samber\u002Foops — error builders, stack\n  traces, error codes, error context, error wrapping, error attributes,\n  user-facing vs developer messages, panic recovery, and logger integration.\n  Apply when using or adopting samber\u002Foops, or when the codebase already imports\n  github.com\u002Fsamber\u002Foops.\nuser-invocable: true\nlicense: MIT\ncompatibility: >-\n  Designed for Claude Code, Codex or similar harness, and for projects using\n  Golang.\nmetadata:\n  author: samber\n  version: 1.2.0\n  openclaw:\n    emoji: ?\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n    install: []\n    skill-library-version: 1.21.0\nallowed-tools: >-\n  Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\n  WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs\n  Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*\npaths:\n  - '**\u002F*.go'\n---\n\n**Persona:** You are a Go engineer who treats errors as structured data. Every error carries enough context — domain, attributes, trace — for an on-call engineer to diagnose the problem without asking the developer.\n\n# samber\u002Foops Structured Error Handling\n\n**samber\u002Foops** is a drop-in replacement for Go's standard error handling that adds structured context, stack traces, error codes, public messages, and panic recovery. Variable data goes in `.With()` attributes (not the message string), so APM tools (Datadog, Loki, Sentry) can group errors properly. Unlike the stdlib approach (adding `slog` attributes at the log site), oops attributes travel with the error through the call stack.\n\n## Why use samber\u002Foops\n\nStandard Go errors lack context — you see `connection failed` but not which user triggered it, what query was running, or the full call stack. `samber\u002Foops` provides:\n\n- **Structured context** — key-value attributes on any error\n- **Stack traces** — automatic call stack capture\n- **Error codes** — machine-readable identifiers\n- **Public messages** — user-safe messages separate from technical details\n- **Low-cardinality messages** — variable data in `.With()` attributes, not the message string, so APM tools group errors properly\n\nThis skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n## Core pattern: Error builder chain\n\nAll `oops` errors use a fluent builder pattern:\n\n```go\nerr := oops.\n    In(\"user-service\").           \u002F\u002F domain\u002Ffeature\n    Tags(\"database\", \"postgres\").  \u002F\u002F categorization\n    Code(\"network_failure\").       \u002F\u002F machine-readable identifier\n    User(\"user-123\", \"email\", \"foo@bar.com\").  \u002F\u002F user context\n    With(\"query\", query).          \u002F\u002F custom attributes\n    Errorf(\"failed to fetch user: %s\", \"timeout\")\n```\n\nTerminal methods:\n\n- `.Errorf(format, args...)` — create a new error\n- `.Wrap(err)` — wrap an existing error\n- `.Wrapf(err, format, args...)` — wrap with a message\n- `.Join(err1, err2, ...)` — combine multiple errors\n- `.Recover(fn)` \u002F `.Recoverf(fn, format, args...)` — convert panic to error\n\n### Error builder methods\n\n| Methods | Use case |\n| --- | --- |\n| `.With(\"key\", value)` | Add custom key-value attribute (lazy `func() any` values supported) |\n| `.WithContext(ctx, \"key1\", \"key2\")` | Extract values from Go context into attributes (lazy values supported) |\n| `.In(\"domain\")` | Set the feature\u002Fservice\u002Fdomain |\n| `.Tags(\"auth\", \"sql\")` | Add categorization tags (query with `err.HasTag(\"tag\")`) |\n| `.Code(\"iam_authz_missing_permission\")` | Set machine-readable error identifier\u002Fslug |\n| `.Public(\"Could not fetch user.\")` | Set user-safe message (separate from technical details) |\n| `.Hint(\"Runbook: https:\u002F\u002Fdoc.acme.org\u002Fdoc\u002Fabcd.md\")` | Add debugging hint for developers |\n| `.Owner(\"team\u002Fslack\")` | Identify responsible team\u002Fowner |\n| `.User(id, \"k\", \"v\")` | Add user identifier and attributes |\n| `.Tenant(id, \"k\", \"v\")` | Add tenant\u002Forganization context and attributes |\n| `.Trace(id)` | Add trace \u002F correlation ID (default: ULID) |\n| `.Span(id)` | Add span ID representing a unit of work\u002Foperation (default: ULID) |\n| `.Time(t)` | Override error timestamp (default: `time.Now()`) |\n| `.Since(t)` | Set duration based on time since `t` (exposed via `err.Duration()`) |\n| `.Duration(d)` | Set explicit error duration |\n| `.Request(req, includeBody)` | Attach `*http.Request` (optionally including body) |\n| `.Response(res, includeBody)` | Attach `*http.Response` (optionally including body) |\n| `oops.FromContext(ctx)` | Start from an `OopsErrorBuilder` stored in a Go context |\n\n## Common scenarios\n\n### Database\u002Frepository layer\n\n```go\nfunc (r *UserRepository) FetchUser(id string) (*User, error) {\n    query := \"SELECT * FROM users WHERE id = $1\"\n    row, err := r.db.Query(query, id)\n    if err != nil {\n        return nil, oops.\n            In(\"user-repository\").\n            Tags(\"database\", \"postgres\").\n            With(\"query\", query).\n            With(\"user_id\", id).\n            Wrapf(err, \"failed to fetch user from database\")\n    }\n    \u002F\u002F ...\n}\n```\n\n### HTTP handler layer\n\n```go\nfunc (h *Handler) CreateUser(w http.ResponseWriter, r *http.Request) {\n    userID := getUserID(r)\n\n    err := h.service.CreateUser(r.Context(), userID)\n    if err != nil {\n        err = oops.\n            In(\"http-handler\").\n            Tags(\"endpoint\", \"\u002Fusers\").\n            Request(r, false).\n            User(userID).\n            Wrapf(err, \"create user failed\")\n        http.Error(w, oops.GetPublic(err, \"Internal server error\"), http.StatusInternalServerError)\n        return\n    }\n\n    w.WriteHeader(http.StatusCreated)\n}\n```\n\n### Service layer with reusable builder\n\n```go\nfunc (s *UserService) CreateOrder(ctx context.Context, req CreateOrderRequest) error {\n    builder := oops.\n        In(\"order-service\").\n        Tags(\"orders\", \"checkout\").\n        Tenant(req.TenantID, \"plan\", req.Plan).\n        User(req.UserID, \"email\", req.UserEmail)\n\n    product, err := s.catalog.GetProduct(ctx, req.ProductID)\n    if err != nil {\n        return builder.\n            With(\"product_id\", req.ProductID).\n            Wrapf(err, \"product lookup failed\")\n    }\n\n    if product.Stock \u003C req.Quantity {\n        return builder.\n            Code(\"insufficient_stock\").\n            Public(\"Not enough items in stock.\").\n            With(\"requested\", req.Quantity).\n            With(\"available\", product.Stock).\n            Errorf(\"insufficient stock for product %s\", req.ProductID)\n    }\n\n    return nil\n}\n```\n\n## Error wrapping best practices\n\n### DO: Wrap directly, no nil check needed\n\n```go\n\u002F\u002F ✓ Good — Wrap returns nil if err is nil\nreturn oops.Wrapf(err, \"operation failed\")\n\n\u002F\u002F ✗ Bad — unnecessary nil check\nif err != nil {\n    return oops.Wrapf(err, \"operation failed\")\n}\nreturn nil\n```\n\n### DO: Add context at each layer\n\nEach architectural layer SHOULD add context via Wrap\u002FWrapf — at least once per package boundary (not necessarily at every function call).\n\n```go\n\u002F\u002F ✓ Good — each layer adds relevant context\nfunc Controller() error {\n    return oops.In(\"controller\").Trace(traceID).Wrapf(Service(), \"user request failed\")\n}\n\nfunc Service() error {\n    return oops.In(\"service\").With(\"op\", \"create_user\").Wrapf(Repository(), \"db operation failed\")\n}\n\nfunc Repository() error {\n    return oops.In(\"repository\").Tags(\"database\", \"postgres\").Errorf(\"connection timeout\")\n}\n```\n\n### DO: Keep error messages low-cardinality\n\nError messages MUST be low-cardinality for APM aggregation. Interpolating variable data into the message breaks grouping in Datadog, Loki, Sentry.\n\n```go\n\u002F\u002F ✗ Bad — high-cardinality, breaks APM grouping\noops.Errorf(\"failed to process user %s in tenant %s\", userID, tenantID)\n\n\u002F\u002F ✓ Good — static message + structured attributes\noops.With(\"user_id\", userID).With(\"tenant_id\", tenantID).Errorf(\"failed to process user\")\n```\n\n## Panic recovery\n\n`oops.Recover()` MUST be used in goroutine boundaries. Convert panics to structured errors:\n\n```go\nfunc ProcessData(data string) (err error) {\n    return oops.\n        In(\"data-processor\").\n        Code(\"panic_recovered\").\n        Hint(\"Check input data format and dependencies\").\n        With(\"input_data\", data).\n        Recover(func() {\n            riskyOperation(data)\n        })\n}\n```\n\n## Accessing error information\n\n`samber\u002Foops` errors implement the standard `error` interface. Access additional info:\n\n```go\nif oopsErr, ok := err.(oops.OopsError); ok {\n    fmt.Println(\"Code:\", oopsErr.Code())\n    fmt.Println(\"Domain:\", oopsErr.Domain())\n    fmt.Println(\"Tags:\", oopsErr.Tags())\n    fmt.Println(\"Context:\", oopsErr.Context())\n    fmt.Println(\"Stacktrace:\", oopsErr.Stacktrace())\n}\n\n\u002F\u002F Get public-facing message with fallback\npublicMsg := oops.GetPublic(err, \"Something went wrong\")\n```\n\n### Output formats\n\n```go\nfmt.Printf(\"%+v\\n\", err)       \u002F\u002F verbose with stack trace\nbytes, _ := json.Marshal(err)  \u002F\u002F JSON for logging\nslog.Error(err.Error(), slog.Any(\"error\", err))  \u002F\u002F slog integration\n```\n\n## Context propagation\n\nCarry error context through Go contexts:\n\n```go\nfunc middleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        builder := oops.\n            In(\"http\").\n            Request(r, false).\n            Trace(r.Header.Get(\"X-Trace-ID\"))\n\n        ctx := oops.WithBuilder(r.Context(), builder)\n        next.ServeHTTP(w, r.WithContext(ctx))\n    })\n}\n\nfunc handler(ctx context.Context) error {\n    return oops.FromContext(ctx).Tags(\"handler\", \"users\").Errorf(\"something failed\")\n}\n```\n\nFor assertions, configuration, and additional logger examples, see [Advanced patterns](.\u002Freferences\u002Fadvanced.md).\n\n## References\n\n- [github.com\u002Fsamber\u002Foops](https:\u002F\u002Fgithub.com\u002Fsamber\u002Foops)\n- [pkg.go.dev\u002Fgithub.com\u002Fsamber\u002Foops](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fsamber\u002Foops)\n\n## Cross-References\n\n- → See `golang-error-handling` skill for general error handling patterns\n- → See `golang-observability` skill for logger integration and structured logging\n","**Persona:** You are a Go engineer who treats errors as structured data. Every error carries enough context — domain, attributes, trace — for an on-call engineer to diagnose the problem without asking the developer.\n\n# samber\u002Foops Structured Error Handling\n\n**samber\u002Foops** is a drop-in replacement for Go's standard error handling that adds structured context, stack traces, error codes, public messages, and panic recovery. Variable data goes in `.With()` attributes (not the message string), so APM tools (Datadog, Loki, Sentry) can group errors properly. Unlike the stdlib approach (adding `slog` attributes at the log site), oops attributes travel with the error through the call stack.\n\n## Why use samber\u002Foops\n\nStandard Go errors lack context — you see `connection failed` but not which user triggered it, what query was running, or the full call stack. `samber\u002Foops` provides:\n\n- **Structured context** — key-value attributes on any error\n- **Stack traces** — automatic call stack capture\n- **Error codes** — machine-readable identifiers\n- **Public messages** — user-safe messages separate from technical details\n- **Low-cardinality messages** — variable data in `.With()` attributes, not the message string, so APM tools group errors properly\n\nThis skill is not exhaustive. Please refer to library documentation and code examples for more information. For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `golang-pkg-go-dev` skill (`godig`) — prefer it over Context7 for Go package facts. To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `golang-gopls` skill (`gopls`). Context7 remains a fallback for docs not indexed on pkg.go.dev.\n\n## Core pattern: Error builder chain\n\nAll `oops` errors use a fluent builder pattern:\n\n```go\nerr := oops.\n    In(\"user-service\").           \u002F\u002F domain\u002Ffeature\n    Tags(\"database\", \"postgres\").  \u002F\u002F categorization\n    Code(\"network_failure\").       \u002F\u002F machine-readable identifier\n    User(\"user-123\", \"email\", \"foo@bar.com\").  \u002F\u002F user context\n    With(\"query\", query).          \u002F\u002F custom attributes\n    Errorf(\"failed to fetch user: %s\", \"timeout\")\n```\n\nTerminal methods:\n\n- `.Errorf(format, args...)` — create a new error\n- `.Wrap(err)` — wrap an existing error\n- `.Wrapf(err, format, args...)` — wrap with a message\n- `.Join(err1, err2, ...)` — combine multiple errors\n- `.Recover(fn)` \u002F `.Recoverf(fn, format, args...)` — convert panic to error\n\n### Error builder methods\n\n| Methods | Use case |\n| --- | --- |\n| `.With(\"key\", value)` | Add custom key-value attribute (lazy `func() any` values supported) |\n| `.WithContext(ctx, \"key1\", \"key2\")` | Extract values from Go context into attributes (lazy values supported) |\n| `.In(\"domain\")` | Set the feature\u002Fservice\u002Fdomain |\n| `.Tags(\"auth\", \"sql\")` | Add categorization tags (query with `err.HasTag(\"tag\")`) |\n| `.Code(\"iam_authz_missing_permission\")` | Set machine-readable error identifier\u002Fslug |\n| `.Public(\"Could not fetch user.\")` | Set user-safe message (separate from technical details) |\n| `.Hint(\"Runbook: https:\u002F\u002Fdoc.acme.org\u002Fdoc\u002Fabcd.md\")` | Add debugging hint for developers |\n| `.Owner(\"team\u002Fslack\")` | Identify responsible team\u002Fowner |\n| `.User(id, \"k\", \"v\")` | Add user identifier and attributes |\n| `.Tenant(id, \"k\", \"v\")` | Add tenant\u002Forganization context and attributes |\n| `.Trace(id)` | Add trace \u002F correlation ID (default: ULID) |\n| `.Span(id)` | Add span ID representing a unit of work\u002Foperation (default: ULID) |\n| `.Time(t)` | Override error timestamp (default: `time.Now()`) |\n| `.Since(t)` | Set duration based on time since `t` (exposed via `err.Duration()`) |\n| `.Duration(d)` | Set explicit error duration |\n| `.Request(req, includeBody)` | Attach `*http.Request` (optionally including body) |\n| `.Response(res, includeBody)` | Attach `*http.Response` (optionally including body) |\n| `oops.FromContext(ctx)` | Start from an `OopsErrorBuilder` stored in a Go context |\n\n## Common scenarios\n\n### Database\u002Frepository layer\n\n```go\nfunc (r *UserRepository) FetchUser(id string) (*User, error) {\n    query := \"SELECT * FROM users WHERE id = $1\"\n    row, err := r.db.Query(query, id)\n    if err != nil {\n        return nil, oops.\n            In(\"user-repository\").\n            Tags(\"database\", \"postgres\").\n            With(\"query\", query).\n            With(\"user_id\", id).\n            Wrapf(err, \"failed to fetch user from database\")\n    }\n    \u002F\u002F ...\n}\n```\n\n### HTTP handler layer\n\n```go\nfunc (h *Handler) CreateUser(w http.ResponseWriter, r *http.Request) {\n    userID := getUserID(r)\n\n    err := h.service.CreateUser(r.Context(), userID)\n    if err != nil {\n        err = oops.\n            In(\"http-handler\").\n            Tags(\"endpoint\", \"\u002Fusers\").\n            Request(r, false).\n            User(userID).\n            Wrapf(err, \"create user failed\")\n        http.Error(w, oops.GetPublic(err, \"Internal server error\"), http.StatusInternalServerError)\n        return\n    }\n\n    w.WriteHeader(http.StatusCreated)\n}\n```\n\n### Service layer with reusable builder\n\n```go\nfunc (s *UserService) CreateOrder(ctx context.Context, req CreateOrderRequest) error {\n    builder := oops.\n        In(\"order-service\").\n        Tags(\"orders\", \"checkout\").\n        Tenant(req.TenantID, \"plan\", req.Plan).\n        User(req.UserID, \"email\", req.UserEmail)\n\n    product, err := s.catalog.GetProduct(ctx, req.ProductID)\n    if err != nil {\n        return builder.\n            With(\"product_id\", req.ProductID).\n            Wrapf(err, \"product lookup failed\")\n    }\n\n    if product.Stock \u003C req.Quantity {\n        return builder.\n            Code(\"insufficient_stock\").\n            Public(\"Not enough items in stock.\").\n            With(\"requested\", req.Quantity).\n            With(\"available\", product.Stock).\n            Errorf(\"insufficient stock for product %s\", req.ProductID)\n    }\n\n    return nil\n}\n```\n\n## Error wrapping best practices\n\n### DO: Wrap directly, no nil check needed\n\n```go\n\u002F\u002F ✓ Good — Wrap returns nil if err is nil\nreturn oops.Wrapf(err, \"operation failed\")\n\n\u002F\u002F ✗ Bad — unnecessary nil check\nif err != nil {\n    return oops.Wrapf(err, \"operation failed\")\n}\nreturn nil\n```\n\n### DO: Add context at each layer\n\nEach architectural layer SHOULD add context via Wrap\u002FWrapf — at least once per package boundary (not necessarily at every function call).\n\n```go\n\u002F\u002F ✓ Good — each layer adds relevant context\nfunc Controller() error {\n    return oops.In(\"controller\").Trace(traceID).Wrapf(Service(), \"user request failed\")\n}\n\nfunc Service() error {\n    return oops.In(\"service\").With(\"op\", \"create_user\").Wrapf(Repository(), \"db operation failed\")\n}\n\nfunc Repository() error {\n    return oops.In(\"repository\").Tags(\"database\", \"postgres\").Errorf(\"connection timeout\")\n}\n```\n\n### DO: Keep error messages low-cardinality\n\nError messages MUST be low-cardinality for APM aggregation. Interpolating variable data into the message breaks grouping in Datadog, Loki, Sentry.\n\n```go\n\u002F\u002F ✗ Bad — high-cardinality, breaks APM grouping\noops.Errorf(\"failed to process user %s in tenant %s\", userID, tenantID)\n\n\u002F\u002F ✓ Good — static message + structured attributes\noops.With(\"user_id\", userID).With(\"tenant_id\", tenantID).Errorf(\"failed to process user\")\n```\n\n## Panic recovery\n\n`oops.Recover()` MUST be used in goroutine boundaries. Convert panics to structured errors:\n\n```go\nfunc ProcessData(data string) (err error) {\n    return oops.\n        In(\"data-processor\").\n        Code(\"panic_recovered\").\n        Hint(\"Check input data format and dependencies\").\n        With(\"input_data\", data).\n        Recover(func() {\n            riskyOperation(data)\n        })\n}\n```\n\n## Accessing error information\n\n`samber\u002Foops` errors implement the standard `error` interface. Access additional info:\n\n```go\nif oopsErr, ok := err.(oops.OopsError); ok {\n    fmt.Println(\"Code:\", oopsErr.Code())\n    fmt.Println(\"Domain:\", oopsErr.Domain())\n    fmt.Println(\"Tags:\", oopsErr.Tags())\n    fmt.Println(\"Context:\", oopsErr.Context())\n    fmt.Println(\"Stacktrace:\", oopsErr.Stacktrace())\n}\n\n\u002F\u002F Get public-facing message with fallback\npublicMsg := oops.GetPublic(err, \"Something went wrong\")\n```\n\n### Output formats\n\n```go\nfmt.Printf(\"%+v\\n\", err)       \u002F\u002F verbose with stack trace\nbytes, _ := json.Marshal(err)  \u002F\u002F JSON for logging\nslog.Error(err.Error(), slog.Any(\"error\", err))  \u002F\u002F slog integration\n```\n\n## Context propagation\n\nCarry error context through Go contexts:\n\n```go\nfunc middleware(next http.Handler) http.Handler {\n    return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        builder := oops.\n            In(\"http\").\n            Request(r, false).\n            Trace(r.Header.Get(\"X-Trace-ID\"))\n\n        ctx := oops.WithBuilder(r.Context(), builder)\n        next.ServeHTTP(w, r.WithContext(ctx))\n    })\n}\n\nfunc handler(ctx context.Context) error {\n    return oops.FromContext(ctx).Tags(\"handler\", \"users\").Errorf(\"something failed\")\n}\n```\n\nFor assertions, configuration, and additional logger examples, see [Advanced patterns](.\u002Freferences\u002Fadvanced.md).\n\n## References\n\n- [github.com\u002Fsamber\u002Foops](https:\u002F\u002Fgithub.com\u002Fsamber\u002Foops)\n- [pkg.go.dev\u002Fgithub.com\u002Fsamber\u002Foops](https:\u002F\u002Fpkg.go.dev\u002Fgithub.com\u002Fsamber\u002Foops)\n\n## Cross-References\n\n- → See `golang-error-handling` skill for general error handling patterns\n- → See `golang-observability` skill for logger integration and structured logging\n",{"name":5,"paths":54,"license":15,"metadata":56,"description":7,"allowed-tools":67,"compatibility":68,"user-invocable":69},[55],"**\u002F*.go",{"author":57,"version":58,"openclaw":59},"samber","1.2.0",{"emoji":60,"install":61,"homepage":62,"requires":63,"skill-library-version":66},"?",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":64},[65],"go","1.21.0","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent WebFetch mcp__context7__resolve-library-id mcp__context7__query-docs Bash(godig:*) Bash(gopls:*) LSP mcp__gopls__*","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","c349be0704bffe54a7191d1412faf564b08983ca","skills\u002Fsamber-golang\u002Fgolang-samber-oops",0,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills","https:\u002F\u002Fgithub.com\u002Frockcookies","2026-11-11 22:09:57",{"source":8,"skillName":5,"commands":78,"prompt":88,"zipAvailable":69},[79,82,85],{"tool":80,"command":81},"npx","npx skills add rockcookies\u002Fskills --skill golang-samber-oops",{"tool":83,"command":84},"bunx","bunx skills add rockcookies\u002Fskills --skill golang-samber-oops",{"tool":86,"command":87},"pnpm","pnpm dlx skills add rockcookies\u002Fskills --skill golang-samber-oops","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-samber-oops\u002FSKILL.md",[90,96,102],{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"evals\u002Fevals.json","REFERENCE","参考文档",13037,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-samber-oops\u002Fevals\u002Fevals.json",{"path":97,"resourceType":98,"resourceTypeDesc":99,"sizeBytes":100,"sourceHtmlUrl":101},"LICENSE.txt","LICENSE","许可证",142,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FBestLemoon\u002Fcodex-seo\u002Fskills\u002Fseo-local\u002FLICENSE.txt",{"path":103,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fadvanced.md",1347,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-samber-oops\u002Freferences\u002Fadvanced.md",[107,131,148,171,183,197],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":49},"01M6WMNKD3Y4H9FGM8Q901F507","hierarchical-agents-md","init、update、audit 或 reorganize 以 AGENTS.md 与 README.md 为中心的层级项目文档： 初始化 Agent 指令、代码改动后更新文档、审计过期或冲突文档、重组仓库文档层级。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcustom\u002Fhierarchical-agents-md\u002FSKILL.md",[],[114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130],"hierarchical agents md","agents md","python","change","init","packages","update","git","audit","文档","README","maintenance","third-party","初始化","true","for","party",{"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":140,"publishedAt":49},"01M6CFS6BRTQPFZCDHQP97HYXR","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvueuse\u002Fvueuse-functions\u002FSKILL.md",[137],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[141,142,143,144,145,146,147,48],"functions","vueuse functions","https","vue","js","nuxt","build",{"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":158,"publishedAt":49},"01M6CFS34MDQXZPAWQFE5D7VGT","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[154,157],{"categoryNo":155,"categoryName":156,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},[159,160,161,144,162,163,164,48,165,166,167,168,169,170,145],"best practices","vue testing best practices","testing best practices","testing","use","e2e testing","playwright","test","component","testing patterns","e2e","vitest",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":178,"publishedAt":49},"01M6CFS0N19MSJNTVM9AEQ7Z73","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[177],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},[179,180,144,159,48,167,181,182],"vue router best practices","router","lifecycle","navigation",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":190,"publishedAt":49},"01M6CFRYN31RFQFTE41Z6DCGKE","vue-pinia-best-practices","Pinia stores, state management patterns, store setup, and reactivity with stores.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[189],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},[191,192,159,144,193,194,195,196,48],"vue pinia best practices","pinia","state","management","state management","setup",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":208,"publishedAt":49},"01M6CFRW2DKXJHP05DYJ3P3Y2S","vue-options-api-best-practices","Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-options-api-best-practices\u002FSKILL.md",[203,204,207],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":205,"categoryName":206,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[159,209,144,210,211,212,48,213,214,215],"api","vue options api best practices","data","methods","reference","only","context"]