[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7592856B93TGJZ5MHG3X7R8":3,"skill-same:01M7592856B93TGJZ5MHG3X7R8":80},{"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":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":43,"updatedAt":44,"install":45,"resources":57},"01M7592856B93TGJZ5MHG3X7R8","golang-project-layout",null,"Provides a guide for setting up Golang project layouts and workspaces. Use when starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, deciding between cmd\u002Finternal\u002Fpkg directory conventions, or discussing package restructuring, package splits, or module splits.","davidcoachdev\u002Fdcfiles","davidcoachdev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F69812733?v=4","01M758C4BR16TAV1N47W319E9V","David H. Caycedo Blum.","01M758C4CCZA2ZYGA0BGMXCDRH",1,"MIT","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: golang-project-layout\ndescription: \"Provides a guide for setting up Golang project layouts and workspaces. Use when starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, deciding between cmd\u002Finternal\u002Fpkg directory conventions, or discussing package restructuring, package splits, or module splits.\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for OpenCode or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: gentleman-programming\n  version: \"1.2.1\"\n  openclaw:\n    emoji: \"📁\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fgentleman-programming\n    requires:\n      bins:\n        - go\n    install: []\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent AskUserQuestion\n---\n\n**Persona:** You are a Go project architect. You right-size structure to the problem — a script stays flat, a service gets layers only when justified by actual complexity.\n\n# Go Project Layout\n\n## Architecture Decision: Ask First\n\nWhen starting a new project, **ask the developer** what software architecture they prefer (clean architecture, hexagonal, DDD, flat structure, etc.). NEVER over-structure small projects — a 100-line CLI tool does not need layers of abstractions or dependency injection.\n\n→ See `golang-design-patterns` skill for detailed architecture guides with file trees and code examples.\n\n## Dependency Injection: Ask Next\n\nAfter settling on the architecture, **ask the developer** which dependency injection approach they want: manual constructor injection, or a DI library (samber\u002Fdo, google\u002Fwire, uber-go\u002Fdig+fx), or none at all. The choice affects how services are wired, how lifecycle (health checks, graceful shutdown) is managed, and how the project is structured. See the `golang-dependency-injection` skill for a full comparison and decision table.\n\n## 12-Factor App\n\nFor applications (services, APIs, workers), follow [12-Factor App](https:\u002F\u002F12factor.net\u002F) conventions: config via environment variables, logs to stdout, stateless processes, graceful shutdown, backing services as attached resources, and admin tasks as one-off commands (e.g., `cmd\u002Fmigrate\u002F`).\n\n## Quick Start: Choose Your Project Type\n\n| Project Type | Use When | Key Directories |\n| --- | --- | --- |\n| **CLI Tool** | Building a command-line application | `cmd\u002F{name}\u002F`, `internal\u002F`, optional `pkg\u002F` |\n| **Library** | Creating reusable code for others | `pkg\u002F{name}\u002F`, `internal\u002F` for private code |\n| **Service** | HTTP API, microservice, or web app | `cmd\u002F{service}\u002F`, `internal\u002F`, `api\u002F`, `web\u002F` |\n| **Monorepo** | Multiple related packages\u002Fmodules | `go.work`, separate modules per package |\n| **Workspace** | Developing multiple local modules | `go.work`, replace directives |\n\n## Module Naming Conventions\n\n### Module Name (go.mod)\n\nYour module path in `go.mod` should:\n\n- **MUST match your repository URL**: `github.com\u002Fusername\u002Fproject-name`\n- **Use lowercase only**: `github.com\u002Fyou\u002Fmy-app` (not `MyApp`)\n- **Use hyphens for multi-word**: `user-auth` not `user_auth` or `userAuth`\n- **Be semantic**: Name should clearly express purpose\n\n**Examples:**\n\n```go\n\u002F\u002F ✅ Good\nmodule github.com\u002Fjdoe\u002Fpayment-processor\nmodule github.com\u002Fcompany\u002Fcli-tool\n\n\u002F\u002F ❌ Bad\nmodule myproject\nmodule github.com\u002Fjdoe\u002FMyProject\nmodule utils\n```\n\n### Package Naming\n\nPackages MUST be lowercase, singular, and match their directory name. → See `golang-naming` skill for complete package naming conventions and examples.\n\n## Directory Layout\n\nAll `main` packages must reside in `cmd\u002F` with minimal logic — parse flags, wire dependencies, call `Run()`. Business logic belongs in `internal\u002F` or `pkg\u002F`. Use `internal\u002F` for non-exported packages, `pkg\u002F` only when code is useful to external consumers.\n\nSee [directory layout examples](references\u002Fdirectory-layouts.md) for universal, small project, and library layouts, plus common mistakes.\n\n## Essential Configuration Files\n\nEvery Go project should include at the root:\n\n- **Makefile** — build automation. See [Makefile template](assets\u002FMakefile)\n- **.gitignore** — git ignore patterns. See [.gitignore template](assets\u002F.gitignore)\n- **.golangci.yml** — linter config. See the `golang-lint` skill for the recommended configuration\n\nFor application configuration with Cobra + Viper, see [config reference](references\u002Fconfig.md).\n\n## Tests, Benchmarks, and Examples\n\nCo-locate `_test.go` files with the code they test. Use `testdata\u002F` for fixtures. See [testing layout](references\u002Ftesting-layout.md) for file naming, placement, and organization details.\n\n## Go Workspaces\n\nUse `go.work` when developing multiple related modules in a monorepo. See [workspaces](references\u002Fworkspaces.md) for setup, structure, and commands.\n\n## Initialization Checklist\n\nWhen starting a new Go project:\n\n- [ ] **Ask the developer** their preferred software architecture (clean, hexagonal, DDD, flat, etc.)\n- [ ] **Ask the developer** their preferred DI approach — see `golang-dependency-injection` skill\n- [ ] Decide project type (CLI, library, service, monorepo)\n- [ ] Right-size the structure to the project scope\n- [ ] Choose module name (matches repo URL, lowercase, hyphens)\n- [ ] Run `go version` to detect the current go version\n- [ ] Run `go mod init github.com\u002Fuser\u002Fproject-name`\n- [ ] Create `cmd\u002F{name}\u002Fmain.go` for entry point\n- [ ] Create `internal\u002F` for private code\n- [ ] Create `pkg\u002F` only if you have public libraries\n- [ ] For monorepos: Initialize `go work` and add modules\n- [ ] Run `gofmt -s -w .` to ensure formatting\n- [ ] Add `.gitignore` with `\u002Fvendor\u002F` and binary patterns\n\n## Related Skills\n\n→ See `golang-cli` skill for CLI tool structure and Cobra\u002FViper patterns. → See `golang-dependency-injection` skill for DI approach comparison and wiring. → See `golang-lint` skill for golangci-lint configuration. → See `golang-continuous-integration` skill for CI\u002FCD pipeline setup. → See `golang-design-patterns` skill for architectural patterns. → See `golang-refactoring` skill for safely moving or splitting existing code into the layout above via type-alias gradual code repair and staged PRs, without a big-bang break.\n","**Persona:** You are a Go project architect. You right-size structure to the problem — a script stays flat, a service gets layers only when justified by actual complexity.\n\n# Go Project Layout\n\n## Architecture Decision: Ask First\n\nWhen starting a new project, **ask the developer** what software architecture they prefer (clean architecture, hexagonal, DDD, flat structure, etc.). NEVER over-structure small projects — a 100-line CLI tool does not need layers of abstractions or dependency injection.\n\n→ See `golang-design-patterns` skill for detailed architecture guides with file trees and code examples.\n\n## Dependency Injection: Ask Next\n\nAfter settling on the architecture, **ask the developer** which dependency injection approach they want: manual constructor injection, or a DI library (samber\u002Fdo, google\u002Fwire, uber-go\u002Fdig+fx), or none at all. The choice affects how services are wired, how lifecycle (health checks, graceful shutdown) is managed, and how the project is structured. See the `golang-dependency-injection` skill for a full comparison and decision table.\n\n## 12-Factor App\n\nFor applications (services, APIs, workers), follow [12-Factor App](https:\u002F\u002F12factor.net\u002F) conventions: config via environment variables, logs to stdout, stateless processes, graceful shutdown, backing services as attached resources, and admin tasks as one-off commands (e.g., `cmd\u002Fmigrate\u002F`).\n\n## Quick Start: Choose Your Project Type\n\n| Project Type | Use When | Key Directories |\n| --- | --- | --- |\n| **CLI Tool** | Building a command-line application | `cmd\u002F{name}\u002F`, `internal\u002F`, optional `pkg\u002F` |\n| **Library** | Creating reusable code for others | `pkg\u002F{name}\u002F`, `internal\u002F` for private code |\n| **Service** | HTTP API, microservice, or web app | `cmd\u002F{service}\u002F`, `internal\u002F`, `api\u002F`, `web\u002F` |\n| **Monorepo** | Multiple related packages\u002Fmodules | `go.work`, separate modules per package |\n| **Workspace** | Developing multiple local modules | `go.work`, replace directives |\n\n## Module Naming Conventions\n\n### Module Name (go.mod)\n\nYour module path in `go.mod` should:\n\n- **MUST match your repository URL**: `github.com\u002Fusername\u002Fproject-name`\n- **Use lowercase only**: `github.com\u002Fyou\u002Fmy-app` (not `MyApp`)\n- **Use hyphens for multi-word**: `user-auth` not `user_auth` or `userAuth`\n- **Be semantic**: Name should clearly express purpose\n\n**Examples:**\n\n```go\n\u002F\u002F ✅ Good\nmodule github.com\u002Fjdoe\u002Fpayment-processor\nmodule github.com\u002Fcompany\u002Fcli-tool\n\n\u002F\u002F ❌ Bad\nmodule myproject\nmodule github.com\u002Fjdoe\u002FMyProject\nmodule utils\n```\n\n### Package Naming\n\nPackages MUST be lowercase, singular, and match their directory name. → See `golang-naming` skill for complete package naming conventions and examples.\n\n## Directory Layout\n\nAll `main` packages must reside in `cmd\u002F` with minimal logic — parse flags, wire dependencies, call `Run()`. Business logic belongs in `internal\u002F` or `pkg\u002F`. Use `internal\u002F` for non-exported packages, `pkg\u002F` only when code is useful to external consumers.\n\nSee [directory layout examples](references\u002Fdirectory-layouts.md) for universal, small project, and library layouts, plus common mistakes.\n\n## Essential Configuration Files\n\nEvery Go project should include at the root:\n\n- **Makefile** — build automation. See [Makefile template](assets\u002FMakefile)\n- **.gitignore** — git ignore patterns. See [.gitignore template](assets\u002F.gitignore)\n- **.golangci.yml** — linter config. See the `golang-lint` skill for the recommended configuration\n\nFor application configuration with Cobra + Viper, see [config reference](references\u002Fconfig.md).\n\n## Tests, Benchmarks, and Examples\n\nCo-locate `_test.go` files with the code they test. Use `testdata\u002F` for fixtures. See [testing layout](references\u002Ftesting-layout.md) for file naming, placement, and organization details.\n\n## Go Workspaces\n\nUse `go.work` when developing multiple related modules in a monorepo. See [workspaces](references\u002Fworkspaces.md) for setup, structure, and commands.\n\n## Initialization Checklist\n\nWhen starting a new Go project:\n\n- [ ] **Ask the developer** their preferred software architecture (clean, hexagonal, DDD, flat, etc.)\n- [ ] **Ask the developer** their preferred DI approach — see `golang-dependency-injection` skill\n- [ ] Decide project type (CLI, library, service, monorepo)\n- [ ] Right-size the structure to the project scope\n- [ ] Choose module name (matches repo URL, lowercase, hyphens)\n- [ ] Run `go version` to detect the current go version\n- [ ] Run `go mod init github.com\u002Fuser\u002Fproject-name`\n- [ ] Create `cmd\u002F{name}\u002Fmain.go` for entry point\n- [ ] Create `internal\u002F` for private code\n- [ ] Create `pkg\u002F` only if you have public libraries\n- [ ] For monorepos: Initialize `go work` and add modules\n- [ ] Run `gofmt -s -w .` to ensure formatting\n- [ ] Add `.gitignore` with `\u002Fvendor\u002F` and binary patterns\n\n## Related Skills\n\n→ See `golang-cli` skill for CLI tool structure and Cobra\u002FViper patterns. → See `golang-dependency-injection` skill for DI approach comparison and wiring. → See `golang-lint` skill for golangci-lint configuration. → See `golang-continuous-integration` skill for CI\u002FCD pipeline setup. → See `golang-design-patterns` skill for architectural patterns. → See `golang-refactoring` skill for safely moving or splitting existing code into the layout above via type-alias gradual code repair and staged PRs, without a big-bang break.\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":34,"compatibility":35,"user-invocable":36},{"author":25,"version":26,"openclaw":27},"gentleman-programming","1.2.1",{"emoji":28,"install":29,"homepage":30,"requires":31},"📁",[],"https:\u002F\u002Fgithub.com\u002Fgentleman-programming",{"bins":32},[33],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent AskUserQuestion","Designed for OpenCode or similar AI coding agents, and for projects using Golang.",true,"main","5dc86f90a5cbe45db3acd917825461b3ed6937fb","config\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout",0,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev","🌐 Apasionado por crear soluciones web escalables y eficientes. \r\n🧑‍🏫 Coach Dev.\r\n💻 Frontend Dev. \r\n🎚️Backend Dev.\r\n📊 Agile\u002FScrum.\r\n🚀100% remoto.","2026-08-26 07:28:05",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":36},[47,50,53],{"tool":48,"command":49},"npx","npx skills add davidcoachdev\u002Fdcfiles --skill golang-project-layout",{"tool":51,"command":52},"bunx","bunx skills add davidcoachdev\u002Fdcfiles --skill golang-project-layout",{"tool":54,"command":55},"pnpm","pnpm dlx skills add davidcoachdev\u002Fdcfiles --skill golang-project-layout","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002FSKILL.md",[58,64,68,72,76],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"evals\u002Fevals.json","REFERENCE","参考文档",12008,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002Fevals\u002Fevals.json",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fconfig.md",1420,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002Freferences\u002Fconfig.md",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fdirectory-layouts.md",4678,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002Freferences\u002Fdirectory-layouts.md",{"path":73,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Ftesting-layout.md",5227,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002Freferences\u002Ftesting-layout.md",{"path":77,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fworkspaces.md",2544,"https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fgolang-project-layout\u002Freferences\u002Fworkspaces.md",[81,89,96,103,110,117],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7740FETMZY1VTYAEFY1TWY7","zustand-5","Zustand 5 state management patterns. Trigger: When managing React state with Zustand.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fzustand-5\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":85,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M773ZZM9V68SA1AKP4WF4J29","zod-4","Zod 4 schema validation patterns. Trigger: When using Zod for validation - breaking changes from v3.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fzod-4\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":85,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M773ZJFR90CQAY0N9QR40QVP","x-bookmark-quote-posts","Workflow para revisar bookmarks de X\u002FTwitter y convertirlos en drafts de quote posts. Accede a la sección de bookmarks vía browser headless, extrae posts recientes, y genera drafts con voz personal del usuario. No publica ni muta X — solo genera contenido para revisión. Trigger: X bookmarks, Twitter bookmarks, quote posts, bookmark automation, crear quote posts, revisar bookmarks, growth content X.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fx-bookmark-quote-posts\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":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M773Z2RGV3786FV310SDB0YD","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M773YJH3KDSW467CSS63CSRJ","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M773Y3S3H2CPRK5S8YFHWB5C","work-unit-commits","Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.","https:\u002F\u002Fgithub.com\u002Fdavidcoachdev\u002Fdcfiles\u002Fblob\u002Fmain\u002Fconfig\u002F.config\u002Fopencode\u002Fskills\u002Fwork-unit-commits\u002FSKILL.md",[],[]]