[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E5EBXDRZ9ACXAAWVGECGR3":3,"skill-same:01M7E5EBXDRZ9ACXAAWVGECGR3":90},{"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":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":59},"01M7E5EBXDRZ9ACXAAWVGECGR3","golang-design-patterns",null,"Design Go APIs with functional options, interfaces, composition, constructors, and clear ownership. Select a pattern for a concrete design problem rather than adding abstractions by default.","w0rxbend\u002Fdot-agents","w0rxbend","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8176996?v=4","01M7E4XY3Y871Z2NFBXF3H3T8F","Oleksandr B.","01M7E4XY51E6NSG05FXR36H9RV",0,"MIT","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: golang-design-patterns\ndescription: \"Design Go APIs with functional options, interfaces, composition, constructors, and clear ownership. Select a pattern for a concrete design problem rather than adding abstractions by default.\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code, Codex or similar harness, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.2.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 build:*) Bash(go test:*) Bash(go vet:*) Bash(golangci-lint run:*) Bash(git status:*) Bash(git diff:*) Bash(git log:*) Bash(git show:*) Agent AskUserQuestion\npaths:\n  - \"**\u002F*.go\"\n---\n\n**Persona:** Go architect who values simplicity and explicitness. Apply patterns only when they solve real problem, not to show sophistication. Push back on premature abstraction.\n\n**Modes:**\n\n- **Design mode** — new APIs, packages, application structure: ask developer's architecture preference before proposing patterns; favor smallest pattern meeting requirement.\n- **Review mode** — audit existing code: scan for `init()` abuse, unbounded resources, missing timeouts, implicit global state; report findings before suggesting refactors.\n\n> **Community default.** Company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-design-patterns` skill takes precedence.\n\n# Go Design Patterns & Idioms\n\n## Best Practices Summary\n\n1. Constructors SHOULD use **functional options** — scale as APIs evolve (one function per option, no breaking changes)\n2. Functional options MUST **return an error** if validation can fail — catch bad config at construction, not runtime\n3. **Avoid `init()`** — implicit, cannot return errors, makes tests unpredictable. Use explicit constructors\n4. Enums SHOULD **start at 1** (or Unknown sentinel at 0) — Go's zero value silently passes as first member\n5. Error cases MUST be **handled first** with early return — keep happy path flat → see `samber\u002Fcc-skills-golang@golang-code-style`\n6. **Panic is for bugs, not expected errors** — callers handle returned errors; panics crash process\n7. **`defer Close()` immediately after opening** — later edits can skip cleanup\n8. **`runtime.AddCleanup`** over `runtime.SetFinalizer` — finalizers are unpredictable, can resurrect objects\n9. Every external call SHOULD **have a timeout** — slow upstream hangs goroutine indefinitely\n10. **Limit everything** (pool sizes, queue depths, buffers) — unbounded resources grow until crash\n11. Retry logic MUST **check context cancellation** between attempts\n12. **Use `strings.Builder`** for concatenation in loops → see `samber\u002Fcc-skills-golang@golang-code-style`\n13. string vs []byte: **use `[]byte` for mutation and I\u002FO**, `string` for display and keys — conversions allocate\n14. Iterators (Go 1.23+): **use for lazy evaluation** — avoid loading everything into memory\n15. **Stream large transfers** — loading millions of rows causes OOM; streaming keeps memory constant\n16. `\u002F\u002Fgo:embed` for **static assets** — embedded at compile time, no runtime file I\u002FO errors\n17. **Use `crypto\u002Frand`** for keys\u002Ftokens — `math\u002Frand` is predictable → see `samber\u002Fcc-skills-golang@golang-security`\n18. Regexp MUST be **compiled once at package level** — compilation is O(n), allocates\n19. Compile-time interface checks: **`var _ Interface = (*Type)(nil)`** → see `samber\u002Fcc-skills-golang@golang-structs-interfaces`\n20. **A little recode > a big dependency** — each dep adds attack surface, maintenance burden\n21. **Design for testability** — accept interfaces, inject dependencies, keep functions pure\n\n## Constructor Patterns: Functional Options vs Builder\n\n### Functional Options (Preferred)\n\n```go\ntype Server struct {\n    addr         string\n    readTimeout  time.Duration\n    writeTimeout time.Duration\n    maxConns     int\n}\n\ntype Option func(*Server)\n\nfunc WithReadTimeout(d time.Duration) Option {\n    return func(s *Server) { s.readTimeout = d }\n}\n\nfunc WithWriteTimeout(d time.Duration) Option {\n    return func(s *Server) { s.writeTimeout = d }\n}\n\nfunc WithMaxConns(n int) Option {\n    return func(s *Server) { s.maxConns = n }\n}\n\nfunc NewServer(addr string, opts ...Option) *Server {\n    \u002F\u002F Default options\n    s := &Server{\n        addr:         addr,\n        readTimeout:  5 * time.Second,\n        writeTimeout: 10 * time.Second,\n        maxConns:     100,\n    }\n    for _, opt := range opts {\n        opt(s)\n    }\n    return s\n}\n\n\u002F\u002F Usage\nsrv := NewServer(\":8080\",\n    WithReadTimeout(30*time.Second),\n    WithMaxConns(500),\n)\n```\n\nIf option can be invalid, make option type return error; constructor returns it (rule 2):\n\n```go\ntype Option func(*Server) error\n\nfunc WithMaxConns(n int) Option {\n    return func(s *Server) error {\n        if n \u003C= 0 {\n            return fmt.Errorf(\"max conns must be positive, got %d\", n)\n        }\n        s.maxConns = n\n        return nil\n    }\n}\n\nfunc NewServer(addr string, opts ...Option) (*Server, error) {\n    s := &Server{addr: addr, readTimeout: 5 * time.Second, writeTimeout: 10 * time.Second, maxConns: 100}\n    for _, opt := range opts {\n        if err := opt(s); err != nil {\n            return nil, fmt.Errorf(\"new server: %w\", err)\n        }\n    }\n    return s, nil\n}\n```\n\nUse builder pattern only for complex validation between configuration steps.\n\n## Constructors & Initialization\n\n### Avoid `init()` and Mutable Globals\n\n`init()` runs implicitly, hinders testing, creates hidden dependencies:\n\n- Multiple `init()` functions run in declaration order, across files in **filename alphabetical order** — fragile\n- Cannot return errors — failures must panic or `log.Fatal`\n- Runs before `main()` and tests — side effects make tests unpredictable\n\n```go\n\u002F\u002F Bad — hidden global state\nvar db *sql.DB\n\nfunc init() {\n    var err error\n    db, err = sql.Open(\"postgres\", os.Getenv(\"DATABASE_URL\"))\n    if err != nil {\n        log.Fatal(err)\n    }\n}\n\n\u002F\u002F Good — explicit initialization, injectable\nfunc NewUserRepository(db *sql.DB) *UserRepository {\n    return &UserRepository{db: db}\n}\n```\n\n### Enums: Start at 1\n\n```go\ntype Status int\n\nconst (\n    StatusUnknown Status = iota \u002F\u002F 0 = invalid\u002Funset\n    StatusActive                \u002F\u002F 1\n    StatusInactive              \u002F\u002F 2\n    StatusSuspended             \u002F\u002F 3\n)\n```\n\n### Compile Regexp Once\n\n```go\n\u002F\u002F Good — compiled once at package level\nvar emailRegex = regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$`)\n\nfunc ValidateEmail(email string) bool {\n    return emailRegex.MatchString(email)\n}\n```\n\n### Use `\u002F\u002Fgo:embed` for Static Assets\n\n```go\nimport \"embed\"\n\n\u002F\u002Fgo:embed templates\u002F*\nvar templateFS embed.FS\n\n\u002F\u002Fgo:embed version.txt\nvar version string\n```\n\n## Error Flow Patterns\n\n### When to Panic vs Return Error\n\n- **Return error**: network failures, file not found, invalid input — anything caller can handle\n- **Panic**: nil pointer where it should be impossible, violated invariant, `Must*` constructors used at init time\n- **`.Close()` \u002F `Flush()` errors**: read-only cleanup can often use `defer f.Close()`; write\u002Fflush resources must report close or flush errors when durability matters\n\n## Data Handling\n\n### string vs []byte vs []rune\n\n| Type     | Default for | Use when                                            |\n| -------- | ----------- | --------------------------------------------------- |\n| `string` | Everything  | Immutable, safe, UTF-8                              |\n| `[]byte` | I\u002FO         | Writing to `io.Writer`, building strings, mutations |\n| `[]rune` | Unicode ops | `len()` must mean characters, not bytes             |\n\nAvoid repeated conversions — each allocates. Stay in one type until you need the other.\n\n### Iterators & Streaming for Large Data\n\nCode examples: [Data Handling Patterns](references\u002Fdata-handling.md).\n\n## Resource Management\n\n`defer Close()` examples, graceful shutdown, resource pools and `runtime.AddCleanup`: see [Resource Management](references\u002Fresource-management.md).\n\n## Resilience & Limits\n\n### Timeout Every External Call\n\n```go\nctx, cancel := context.WithTimeout(ctx, 5*time.Second)\ndefer cancel()\n\nresp, err := httpClient.Do(req.WithContext(ctx))\n```\n\n### Retry & Context Checks\n\nRetry logic MUST check `ctx.Err()` between attempts and use exponential\u002Flinear backoff via `select` on `ctx.Done()`. Long loops MUST check `ctx.Err()` periodically. → See `samber\u002Fcc-skills-golang@golang-context` skill.\n\n## Database Patterns\n\n→ See `samber\u002Fcc-skills-golang@golang-database` skill for sqlx\u002Fpgx, transactions, nullable columns, connection pools, repository interfaces, testing.\n\n## Architecture\n\nAsk developer's preferred architecture: clean architecture, hexagonal, DDD, or flat layout. Don't impose complex architecture on small project.\n\nCore principles regardless of architecture (details: [Architecture Patterns](references\u002Farchitecture.md)):\n\n- **Keep domain pure** — no framework dependencies in domain layer\n- **Fail fast** — validate at boundaries, trust internal code\n- **Make illegal states unrepresentable** — use types to enforce invariants\n- **Respect 12-factor app** principles → see `samber\u002Fcc-skills-golang@golang-project-layout`\n\n## Detailed Guides\n\n| Guide | Scope |\n| --- | --- |\n| [Architecture Patterns](references\u002Farchitecture.md) | High-level principles, when each architecture fits |\n| [Clean Architecture](references\u002Fclean-architecture.md) | Use cases, dependency rule, layered adapters |\n| [Hexagonal Architecture](references\u002Fhexagonal-architecture.md) | Ports and adapters, domain core isolation |\n| [Domain-Driven Design](references\u002Fddd.md) | Aggregates, value objects, bounded contexts |\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-data-structures` skill for data structure selection, internals, container\u002F packages\n- → See `samber\u002Fcc-skills-golang@golang-error-handling` skill for error wrapping, sentinel errors, single handling rule\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for interface design and composition\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for goroutine lifecycle and graceful shutdown\n- → See `samber\u002Fcc-skills-golang@golang-context` skill for timeout and cancellation patterns\n- → See `samber\u002Fcc-skills-golang@golang-project-layout` skill for architecture and directory structure\n- → See `samber\u002Fcc-skills-golang@golang-refactoring` skill to safely stage migration toward one of these patterns (options struct, DI, consumer-side interfaces) across existing codebase\n","**Persona:** Go architect who values simplicity and explicitness. Apply patterns only when they solve real problem, not to show sophistication. Push back on premature abstraction.\n\n**Modes:**\n\n- **Design mode** — new APIs, packages, application structure: ask developer's architecture preference before proposing patterns; favor smallest pattern meeting requirement.\n- **Review mode** — audit existing code: scan for `init()` abuse, unbounded resources, missing timeouts, implicit global state; report findings before suggesting refactors.\n\n> **Community default.** Company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-design-patterns` skill takes precedence.\n\n# Go Design Patterns & Idioms\n\n## Best Practices Summary\n\n1. Constructors SHOULD use **functional options** — scale as APIs evolve (one function per option, no breaking changes)\n2. Functional options MUST **return an error** if validation can fail — catch bad config at construction, not runtime\n3. **Avoid `init()`** — implicit, cannot return errors, makes tests unpredictable. Use explicit constructors\n4. Enums SHOULD **start at 1** (or Unknown sentinel at 0) — Go's zero value silently passes as first member\n5. Error cases MUST be **handled first** with early return — keep happy path flat → see `samber\u002Fcc-skills-golang@golang-code-style`\n6. **Panic is for bugs, not expected errors** — callers handle returned errors; panics crash process\n7. **`defer Close()` immediately after opening** — later edits can skip cleanup\n8. **`runtime.AddCleanup`** over `runtime.SetFinalizer` — finalizers are unpredictable, can resurrect objects\n9. Every external call SHOULD **have a timeout** — slow upstream hangs goroutine indefinitely\n10. **Limit everything** (pool sizes, queue depths, buffers) — unbounded resources grow until crash\n11. Retry logic MUST **check context cancellation** between attempts\n12. **Use `strings.Builder`** for concatenation in loops → see `samber\u002Fcc-skills-golang@golang-code-style`\n13. string vs []byte: **use `[]byte` for mutation and I\u002FO**, `string` for display and keys — conversions allocate\n14. Iterators (Go 1.23+): **use for lazy evaluation** — avoid loading everything into memory\n15. **Stream large transfers** — loading millions of rows causes OOM; streaming keeps memory constant\n16. `\u002F\u002Fgo:embed` for **static assets** — embedded at compile time, no runtime file I\u002FO errors\n17. **Use `crypto\u002Frand`** for keys\u002Ftokens — `math\u002Frand` is predictable → see `samber\u002Fcc-skills-golang@golang-security`\n18. Regexp MUST be **compiled once at package level** — compilation is O(n), allocates\n19. Compile-time interface checks: **`var _ Interface = (*Type)(nil)`** → see `samber\u002Fcc-skills-golang@golang-structs-interfaces`\n20. **A little recode > a big dependency** — each dep adds attack surface, maintenance burden\n21. **Design for testability** — accept interfaces, inject dependencies, keep functions pure\n\n## Constructor Patterns: Functional Options vs Builder\n\n### Functional Options (Preferred)\n\n```go\ntype Server struct {\n    addr         string\n    readTimeout  time.Duration\n    writeTimeout time.Duration\n    maxConns     int\n}\n\ntype Option func(*Server)\n\nfunc WithReadTimeout(d time.Duration) Option {\n    return func(s *Server) { s.readTimeout = d }\n}\n\nfunc WithWriteTimeout(d time.Duration) Option {\n    return func(s *Server) { s.writeTimeout = d }\n}\n\nfunc WithMaxConns(n int) Option {\n    return func(s *Server) { s.maxConns = n }\n}\n\nfunc NewServer(addr string, opts ...Option) *Server {\n    \u002F\u002F Default options\n    s := &Server{\n        addr:         addr,\n        readTimeout:  5 * time.Second,\n        writeTimeout: 10 * time.Second,\n        maxConns:     100,\n    }\n    for _, opt := range opts {\n        opt(s)\n    }\n    return s\n}\n\n\u002F\u002F Usage\nsrv := NewServer(\":8080\",\n    WithReadTimeout(30*time.Second),\n    WithMaxConns(500),\n)\n```\n\nIf option can be invalid, make option type return error; constructor returns it (rule 2):\n\n```go\ntype Option func(*Server) error\n\nfunc WithMaxConns(n int) Option {\n    return func(s *Server) error {\n        if n \u003C= 0 {\n            return fmt.Errorf(\"max conns must be positive, got %d\", n)\n        }\n        s.maxConns = n\n        return nil\n    }\n}\n\nfunc NewServer(addr string, opts ...Option) (*Server, error) {\n    s := &Server{addr: addr, readTimeout: 5 * time.Second, writeTimeout: 10 * time.Second, maxConns: 100}\n    for _, opt := range opts {\n        if err := opt(s); err != nil {\n            return nil, fmt.Errorf(\"new server: %w\", err)\n        }\n    }\n    return s, nil\n}\n```\n\nUse builder pattern only for complex validation between configuration steps.\n\n## Constructors & Initialization\n\n### Avoid `init()` and Mutable Globals\n\n`init()` runs implicitly, hinders testing, creates hidden dependencies:\n\n- Multiple `init()` functions run in declaration order, across files in **filename alphabetical order** — fragile\n- Cannot return errors — failures must panic or `log.Fatal`\n- Runs before `main()` and tests — side effects make tests unpredictable\n\n```go\n\u002F\u002F Bad — hidden global state\nvar db *sql.DB\n\nfunc init() {\n    var err error\n    db, err = sql.Open(\"postgres\", os.Getenv(\"DATABASE_URL\"))\n    if err != nil {\n        log.Fatal(err)\n    }\n}\n\n\u002F\u002F Good — explicit initialization, injectable\nfunc NewUserRepository(db *sql.DB) *UserRepository {\n    return &UserRepository{db: db}\n}\n```\n\n### Enums: Start at 1\n\n```go\ntype Status int\n\nconst (\n    StatusUnknown Status = iota \u002F\u002F 0 = invalid\u002Funset\n    StatusActive                \u002F\u002F 1\n    StatusInactive              \u002F\u002F 2\n    StatusSuspended             \u002F\u002F 3\n)\n```\n\n### Compile Regexp Once\n\n```go\n\u002F\u002F Good — compiled once at package level\nvar emailRegex = regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$`)\n\nfunc ValidateEmail(email string) bool {\n    return emailRegex.MatchString(email)\n}\n```\n\n### Use `\u002F\u002Fgo:embed` for Static Assets\n\n```go\nimport \"embed\"\n\n\u002F\u002Fgo:embed templates\u002F*\nvar templateFS embed.FS\n\n\u002F\u002Fgo:embed version.txt\nvar version string\n```\n\n## Error Flow Patterns\n\n### When to Panic vs Return Error\n\n- **Return error**: network failures, file not found, invalid input — anything caller can handle\n- **Panic**: nil pointer where it should be impossible, violated invariant, `Must*` constructors used at init time\n- **`.Close()` \u002F `Flush()` errors**: read-only cleanup can often use `defer f.Close()`; write\u002Fflush resources must report close or flush errors when durability matters\n\n## Data Handling\n\n### string vs []byte vs []rune\n\n| Type     | Default for | Use when                                            |\n| -------- | ----------- | --------------------------------------------------- |\n| `string` | Everything  | Immutable, safe, UTF-8                              |\n| `[]byte` | I\u002FO         | Writing to `io.Writer`, building strings, mutations |\n| `[]rune` | Unicode ops | `len()` must mean characters, not bytes             |\n\nAvoid repeated conversions — each allocates. Stay in one type until you need the other.\n\n### Iterators & Streaming for Large Data\n\nCode examples: [Data Handling Patterns](references\u002Fdata-handling.md).\n\n## Resource Management\n\n`defer Close()` examples, graceful shutdown, resource pools and `runtime.AddCleanup`: see [Resource Management](references\u002Fresource-management.md).\n\n## Resilience & Limits\n\n### Timeout Every External Call\n\n```go\nctx, cancel := context.WithTimeout(ctx, 5*time.Second)\ndefer cancel()\n\nresp, err := httpClient.Do(req.WithContext(ctx))\n```\n\n### Retry & Context Checks\n\nRetry logic MUST check `ctx.Err()` between attempts and use exponential\u002Flinear backoff via `select` on `ctx.Done()`. Long loops MUST check `ctx.Err()` periodically. → See `samber\u002Fcc-skills-golang@golang-context` skill.\n\n## Database Patterns\n\n→ See `samber\u002Fcc-skills-golang@golang-database` skill for sqlx\u002Fpgx, transactions, nullable columns, connection pools, repository interfaces, testing.\n\n## Architecture\n\nAsk developer's preferred architecture: clean architecture, hexagonal, DDD, or flat layout. Don't impose complex architecture on small project.\n\nCore principles regardless of architecture (details: [Architecture Patterns](references\u002Farchitecture.md)):\n\n- **Keep domain pure** — no framework dependencies in domain layer\n- **Fail fast** — validate at boundaries, trust internal code\n- **Make illegal states unrepresentable** — use types to enforce invariants\n- **Respect 12-factor app** principles → see `samber\u002Fcc-skills-golang@golang-project-layout`\n\n## Detailed Guides\n\n| Guide | Scope |\n| --- | --- |\n| [Architecture Patterns](references\u002Farchitecture.md) | High-level principles, when each architecture fits |\n| [Clean Architecture](references\u002Fclean-architecture.md) | Use cases, dependency rule, layered adapters |\n| [Hexagonal Architecture](references\u002Fhexagonal-architecture.md) | Ports and adapters, domain core isolation |\n| [Domain-Driven Design](references\u002Fddd.md) | Aggregates, value objects, bounded contexts |\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-data-structures` skill for data structure selection, internals, container\u002F packages\n- → See `samber\u002Fcc-skills-golang@golang-error-handling` skill for error wrapping, sentinel errors, single handling rule\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for interface design and composition\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for goroutine lifecycle and graceful shutdown\n- → See `samber\u002Fcc-skills-golang@golang-context` skill for timeout and cancellation patterns\n- → See `samber\u002Fcc-skills-golang@golang-project-layout` skill for architecture and directory structure\n- → See `samber\u002Fcc-skills-golang@golang-refactoring` skill to safely stage migration toward one of these patterns (options struct, DI, consumer-side interfaces) across existing codebase\n",{"name":5,"paths":24,"license":15,"metadata":26,"description":7,"allowed-tools":36,"compatibility":37,"user-invocable":38},[25],"**\u002F*.go",{"author":27,"version":28,"openclaw":29},"samber","1.2.1",{"emoji":30,"install":31,"homepage":32,"requires":33},"🏗",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":34},[35],"go","Read Edit Write Glob Grep Bash(go build:*) Bash(go test:*) Bash(go vet:*) Bash(golangci-lint run:*) Bash(git status:*) Bash(git diff:*) Bash(git log:*) Bash(git show:*) Agent AskUserQuestion","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","101d0f67250256ca5d80dc3f95767cad7b541457","skills\u002Fgo\u002Fgolang-design-patterns","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents","https:\u002F\u002Fgithub.com\u002Fw0rxbend","https:\u002F\u002Freadme.worxbend.com\u002F","Fluent in Backend-ese (microservices, distributed systems, you know the drill)\r\nFunctional Programming Fanatic...","2026-11-14 14:44:12",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":38},[49,52,55],{"tool":50,"command":51},"npx","npx skills add w0rxbend\u002Fdot-agents --skill golang-design-patterns",{"tool":53,"command":54},"bunx","bunx skills add w0rxbend\u002Fdot-agents --skill golang-design-patterns",{"tool":56,"command":57},"pnpm","pnpm dlx skills add w0rxbend\u002Fdot-agents --skill golang-design-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002FSKILL.md",[60,66,70,74,78,82,86],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"evals\u002Fevals.json","REFERENCE","参考文档",22668,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Fevals\u002Fevals.json",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Farchitecture.md",5048,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Freferences\u002Farchitecture.md",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fclean-architecture.md",5544,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Freferences\u002Fclean-architecture.md",{"path":75,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fdata-handling.md",1575,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Freferences\u002Fdata-handling.md",{"path":79,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fddd.md",7063,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Freferences\u002Fddd.md",{"path":83,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fhexagonal-architecture.md",6847,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Freferences\u002Fhexagonal-architecture.md",{"path":87,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fresource-management.md",4247,"https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002Freferences\u002Fresource-management.md",[91,98,105,113,120,127],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7E6TS1SW1ZSXN748N0RBGHT","wiki-builder","Create and maintain a local Markdown research wiki (sources with provenance, compiled concept\u002Fsource pages, index, maintenance log) driven by a per-wiki config. Use when the user wants to start a wiki or knowledge base, ingest sources into one, or query and update it; use wiki-page-writer for a single code deep-dive page.","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fwiki-builder\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7E6S8ARS0VQR85H4FEC390B","refactoring-guru","Diagnose a named code smell and apply the smallest behavior-preserving refactoring, with verification before and after and an explicit stop condition. Use for structural refactors (extract, move, consolidate, change ownership), not for feature or bug work; for readability cleanup of recent changes use code-simplification.","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Frefactoring-guru\u002FSKILL.md",[],[],{"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":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7E6RRXCYGSHA0ZBFX3YZP7Y","legacy-seams","When changing untested legacy code, pin the observed results with characterization tests and open the smallest seam that substitutes only the blocking dependency, separate from any later logic change. Use when a clock, random source, I\u002FO, global, or hidden constructor blocks a test or a safe edit. Use test-driven-development for a new behavior or a bug, refactoring-guru for one named structural refactor after the seam exists, and code-refactoring-tech-debt to choose which legacy to replace.","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Flegacy-seams\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Flegacy-seams\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7E6QZ11XWSNHCBGYK8HH97C","idea-refine","Refine a raw idea into a one-page brief (problem statement, recommended direction, assumptions to validate, MVP scope, not-doing list) through divergent then convergent thinking. Use when an idea is still vague or you want options and a stress test before committing; use interview-me when the goal itself is unclear and spec-driven-development once the direction is chosen.","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fidea-refine\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7E6N2N7BYW7BA5XGM0QD3B4","code-review-and-quality","Review rubric and approval standard for any change before merge, including code written by you, another agent, or a human: five axes (correctness, readability, architecture, security, performance), change sizing, structural remedies, severity labels, and feedback technique. Use to judge whether a change is fit to merge; use code-review to run a PR or diff review end to end.","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fcode-review-and-quality\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":19},"01M7E6MNCZPTRD77Z419X755HQ","code-perfection","Smell and style gate for code you write or change. Bans known code smells (long method, large class, primitive obsession, long parameter list, data clumps, duplicate code, dead code, feature envy, shotgun surgery, flag arguments, message chains) and enforces behavior-preserving structure. On Scala files, enforces worxbend style. Use while implementing, reviewing a diff for smells, or when a smell or style violation is suspected. Routine construction stays with code-complete. SOLID and DRY stay with clean-code-guard. One named structural refactor stays with refactoring-guru.","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fcode-perfection\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fw0rxbend\u002Fdot-agents\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow\u002Fcode-perfection\u002FSKILL.md",[],[]]