[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JZBY98F85FBSB3XHA9VS41":3,"skill-same:01M6JZBY98F85FBSB3XHA9VS41":81},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6JZBY98F85FBSB3XHA9VS41","golang-build",null,"Cross-platform build script for Go projects using a build.go file at the repository root. Use when building the project, setting up cross-compilation, running go build for multiple targets, or asking about CGO_ENABLED, build flags, target platforms (linux\u002Famd64, windows\u002Famd64, darwin\u002Farm64), or how to automate builds without a Makefile. Also triggers when the user mentions build.go, go run build.go, or cross-compiling Go binaries.","paulohgodinho\u002Fskills","paulohgodinho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F57510522?v=4","01M6JZBW2QZR573QTV4PN1H6DE","Paulo Godinho","01M6JZBW6QM55GHQB0K3BC6D45",0,"MIT","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-build\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"golang build","golang","build","write","at","how to","false","project","run build","up","edit","ai coding agents","read","projects","Bash","how","makefile","repository","code","run","2026-11-10 10:12:30",false,"---\nname: golang-build\ndescription: \"Cross-platform build script for Go projects using a build.go file at the repository root. Use when building the project, setting up cross-compilation, running go build for multiple targets, or asking about CGO_ENABLED, build flags, target platforms (linux\u002Famd64, windows\u002Famd64, darwin\u002Farm64), or how to automate builds without a Makefile. Also triggers when the user mentions build.go, go run build.go, or cross-compiling Go binaries.\"\nuser-invocable: false\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.0\"\n  openclaw:\n    emoji: \"?\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\n    requires:\n      bins:\n        - go\n    install: []\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\n---\n\n**Persona:** Go build engineer — reproducible, static, cross-compiled binaries with zero external tooling.\n\n# Go Build\n\n## The build.go Convention\n\nEvery Go project should have a `build.go` file at the **root of the repository** (not inside `cmd\u002F`). This file is a plain Go program that cross-compiles the project for all target platforms. It requires no external tools — only the Go toolchain.\n\nRun it with:\n\n```sh\ngo run build.go\n```\n\nThe template is provided in [assets\u002Fbuild.go](assets\u002Fbuild.go). Copy it to the root of the project and adapt it to the project's needs.\n\n## Default Configuration\n\nThe default `build.go` ships with the following settings:\n\n| Setting | Default | Reason |\n| --- | --- | --- |\n| `CGO_ENABLED` | `0` | Produces fully static binaries; required for cross-compilation without a C cross-compiler |\n| `linux\u002Famd64` | ✅ | Standard server target |\n| `windows\u002Famd64` | ✅ | Standard Windows desktop\u002Fserver target |\n| `darwin\u002Farm64` | ✅ | Apple Silicon Mac target |\n\n## Customising the Build Script\n\nAll knobs are at the top of `build.go`:\n\n### Change the Binary Name\n\n```go\nconst (\n    BinaryName   = \"myapp\" \u002F\u002F ← rename to match the project\n    C_GO_ENABLED = 0\n)\n```\n\n### Add or Remove Target Platforms\n\n```go\nvar platforms = []struct {\n    OS   string\n    Arch string\n}{\n    {\"linux\", \"amd64\"},\n    {\"windows\", \"amd64\"},\n    {\"darwin\", \"arm64\"},\n    \u002F\u002F {\"darwin\", \"amd64\"}, \u002F\u002F Intel Mac\n    \u002F\u002F {\"linux\", \"arm64\"},  \u002F\u002F ARM server \u002F Raspberry Pi\n}\n```\n\n### Add Build Flags\n\nUncomment or add entries in `buildOptions`:\n\n```go\nvar buildOptions = []string{\n    \"-o\", BinaryName,\n    \u002F\u002F \"-v\",                    \u002F\u002F verbose output\n    \u002F\u002F \"-trimpath\",             \u002F\u002F remove local file paths from binary\n    \u002F\u002F \"-ldflags\", \"-s -w\",     \u002F\u002F strip debug symbols (smaller binary)\n    \u002F\u002F \"-ldflags\", \"-X main.version=1.2.3\", \u002F\u002F embed version string\n}\n```\n\n### Enable CGO\n\nOnly enable CGO if the project requires C bindings (e.g., sqlite3, certain crypto libs). Cross-compilation with CGO requires a C cross-compiler per target platform.\n\n```go\nconst C_GO_ENABLED = 1 \u002F\u002F requires C toolchain for each target\n```\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Placing `build.go` inside `cmd\u002F` | Keep it at the repository root — it builds the whole project |\n| Using `CGO_ENABLED=1` without a cross-compiler | Either disable CGO or install the correct C toolchain for each target |\n| Hardcoding the output path without platform suffix | When building for multiple platforms simultaneously, append `_OS_ARCH` to `BinaryName` to avoid overwriting |\n| Forgetting `-trimpath` for release builds | Release binaries should not embed developer machine paths |\n\n## Related Skills\n\n- → See [golang-project-layout](..\u002Fgolang-project-layout\u002FSKILL.md) for where build.go fits in the overall project structure\n","**Persona:** Go build engineer — reproducible, static, cross-compiled binaries with zero external tooling.\n\n# Go Build\n\n## The build.go Convention\n\nEvery Go project should have a `build.go` file at the **root of the repository** (not inside `cmd\u002F`). This file is a plain Go program that cross-compiles the project for all target platforms. It requires no external tools — only the Go toolchain.\n\nRun it with:\n\n```sh\ngo run build.go\n```\n\nThe template is provided in [assets\u002Fbuild.go](assets\u002Fbuild.go). Copy it to the root of the project and adapt it to the project's needs.\n\n## Default Configuration\n\nThe default `build.go` ships with the following settings:\n\n| Setting | Default | Reason |\n| --- | --- | --- |\n| `CGO_ENABLED` | `0` | Produces fully static binaries; required for cross-compilation without a C cross-compiler |\n| `linux\u002Famd64` | ✅ | Standard server target |\n| `windows\u002Famd64` | ✅ | Standard Windows desktop\u002Fserver target |\n| `darwin\u002Farm64` | ✅ | Apple Silicon Mac target |\n\n## Customising the Build Script\n\nAll knobs are at the top of `build.go`:\n\n### Change the Binary Name\n\n```go\nconst (\n    BinaryName   = \"myapp\" \u002F\u002F ← rename to match the project\n    C_GO_ENABLED = 0\n)\n```\n\n### Add or Remove Target Platforms\n\n```go\nvar platforms = []struct {\n    OS   string\n    Arch string\n}{\n    {\"linux\", \"amd64\"},\n    {\"windows\", \"amd64\"},\n    {\"darwin\", \"arm64\"},\n    \u002F\u002F {\"darwin\", \"amd64\"}, \u002F\u002F Intel Mac\n    \u002F\u002F {\"linux\", \"arm64\"},  \u002F\u002F ARM server \u002F Raspberry Pi\n}\n```\n\n### Add Build Flags\n\nUncomment or add entries in `buildOptions`:\n\n```go\nvar buildOptions = []string{\n    \"-o\", BinaryName,\n    \u002F\u002F \"-v\",                    \u002F\u002F verbose output\n    \u002F\u002F \"-trimpath\",             \u002F\u002F remove local file paths from binary\n    \u002F\u002F \"-ldflags\", \"-s -w\",     \u002F\u002F strip debug symbols (smaller binary)\n    \u002F\u002F \"-ldflags\", \"-X main.version=1.2.3\", \u002F\u002F embed version string\n}\n```\n\n### Enable CGO\n\nOnly enable CGO if the project requires C bindings (e.g., sqlite3, certain crypto libs). Cross-compilation with CGO requires a C cross-compiler per target platform.\n\n```go\nconst C_GO_ENABLED = 1 \u002F\u002F requires C toolchain for each target\n```\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Placing `build.go` inside `cmd\u002F` | Keep it at the repository root — it builds the whole project |\n| Using `CGO_ENABLED=1` without a cross-compiler | Either disable CGO or install the correct C toolchain for each target |\n| Hardcoding the output path without platform suffix | When building for multiple platforms simultaneously, append `_OS_ARCH` to `BinaryName` to avoid overwriting |\n| Forgetting `-trimpath` for release builds | Release binaries should not embed developer machine paths |\n\n## Related Skills\n\n- → See [golang-project-layout](..\u002Fgolang-project-layout\u002FSKILL.md) for where build.go fits in the overall project structure\n",{"name":5,"license":15,"metadata":44,"description":7,"allowed-tools":54,"compatibility":55,"user-invocable":40},{"author":45,"version":46,"openclaw":47},"samber","1.0",{"emoji":48,"install":49,"homepage":50,"requires":51},"?",[],"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills",{"bins":52},[53],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent","Designed for Claude Code or similar AI coding agents, and for projects using Golang.","main","f1ec08caf4f3441b371842829bc5b7e2fae2b11a","skills\u002Fgo\u002Fgolang-build","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho","2026-04-04 09:40:33",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add paulohgodinho\u002Fskills --skill golang-build",{"tool":67,"command":68},"bunx","bunx skills add paulohgodinho\u002Fskills --skill golang-build",{"tool":70,"command":71},"pnpm","pnpm dlx skills add paulohgodinho\u002Fskills --skill golang-build","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-build\u002FSKILL.md",true,[75],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"assets\u002Fbuild.go","SCRIPT","脚本",1090,"https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-build\u002Fassets\u002Fbuild.go",[82,101,118,135,150,164],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":39},"01M6JZD7VH66ESK96RANN6C5J1","golang-structs-interfaces","Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON\u002FYAML\u002FDB serialization, or choosing between pointer and value receivers. Also use when the user asks about \"accept interfaces, return structs\", compile-time interface checks, or composing small interfaces into larger ones.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-structs-interfaces\u002FSKILL.md",[],[20,89,90,91,30,37,92,33,32,31,22,93,94,95,96,25,97,98,99,100],"golang structs interfaces","design","writing","Composition","dependency","design patterns","time","db","embedding","types","interface","implementing",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":39},"01M6JZD385E2VQ9MEPJGZK2RH5","golang-project-layout","Provides a guide for setting up Golang project layouts and workspaces. Use this whenever starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, or deciding on directory structure. Apply this for any Go project initialization or restructuring work.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-project-layout\u002FSKILL.md",[],[20,108,26,109,110,111,30,112,37,33,32,113,114,31,22,28,115,56,116,117],"golang project layout","layout","directory","cli","packages","monorepo","work","workspaces","structure","initialization",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":39},"01M6JZCXBFYKM5A7W8QHBG5SP6","golang-naming","Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters\u002Fsetters, functional options, acronyms, test functions, and subtest names. Use this skill when writing new Go code, reviewing or refactoring, choosing between naming alternatives (New vs NewTypeName, isConnected vs connected, ErrNotFound vs NotFoundError, StatusReady vs StatusUnknown at iota 0), debating Go package names (utils\u002Fhelpers anti-patterns), or asking about Go naming best practices. Also trigger when the user mentions MixedCaps vs snake_case, ALL_CAPS constants, Get-prefix on getters, or error string casing. Do NOT use for general Go implementation questions that don't involve naming decisions.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-naming\u002FSKILL.md",[],[20,125,126,91,30,112,37,33,127,32,31,128,129,130,25,131,132,133,134,23],"golang naming","naming","refactoring","anti-patterns","options","get","error","functional","errors","utils",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":39},"01M6JZCRJPW41M4A70HYKEMN19","golang-lint","Provides linting best practices and golangci-lint configuration for Go projects. Covers running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and managing linter settings. Use this skill whenever the user runs linters, configures golangci-lint, asks about lint warnings or suppressions, sets up code quality tooling, or asks which linters to enable for a Go project. Also use when the user mentions golangci-lint, go vet, staticcheck, revive, or any Go linting tool.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-linter\u002FSKILL.md",[],[142,20,143,53,30,37,144,33,32,145,146,147,31,22,29,28,26,25,148,149],"lint","golang lint","git","coding","linter","brew","linting","which",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":39},"01M6JZCKDKSZ49ZH7ZS4STSMC7","golang-design-patterns","Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, and streaming. Apply when designing Go APIs, structuring applications, choosing between patterns, making design decisions, architectural choices, or production hardening.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-design-patterns\u002FSKILL.md",[],[90,20,94,157,158,159,30,160,37,161,33,32,31,93,162,129,25,131,132,163],"golang design patterns","patterns","architecture","resilience","streaming","shutdown","resource management",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":39},"01M6JZCE2S3X0WWK38MZSTHH3A","golang-dependency-injection","Comprehensive guide for dependency injection (DI) in Golang. Covers why DI matters (testability, loose coupling, separation of concerns, lifecycle management), manual constructor injection, and DI library comparison (google\u002Fwire, uber-go\u002Fdig, uber-go\u002Ffx). Use this skill when designing service architecture, setting up dependency injection, refactoring tightly coupled code, managing singletons or service factories, or when the user asks about inversion of control, service containers, or wiring dependencies in Go.","https:\u002F\u002Fgithub.com\u002Fpaulohgodinho\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fgo\u002Fgolang-dependency-injection\u002FSKILL.md",[],[20,171,93,172,173,174,159,30,37,175,33,127,32,31,28,176,177,25,178,179],"injection","golang dependency injection","dependency injection","MCP","why","context7","query","separation of concerns","wiring"]