一键导入
go-cli-architecture
Build Kubernetes-native CLIs in Go with type safety, testability, and complex orchestration logic for deployment tools and cluster automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build Kubernetes-native CLIs in Go with type safety, testability, and complex orchestration logic for deployment tools and cluster automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Production-grade Go CLI patterns, automated release workflows with Release Please, versioned docs, and coverage enforcement for DevSecOps build pipelines.
Design CLI commands that work independently and compose well for automation. Orchestrator pattern coordinates, subcommands execute discrete tasks.
Implement idiomatic Kubernetes operations with label selectors, strategic merge patches, and proper error handling for production-grade CLI tooling.
Choose the right Go CLI framework for Kubernetes-native tools. Decision matrix compares Cobra, urfave/cli, and Kong for ecosystem alignment and features.
Integrate Go CLIs with Kubernetes using client-go. Automatic config detection works on laptops, CI runners, and cluster pods with minimal RBAC setup.
Automate version management and changelog generation with smart builds. Only build changed components using GitHub App tokens and release-please integration.
| name | go-cli-architecture |
| description | Build Kubernetes-native CLIs in Go with type safety, testability, and complex orchestration logic for deployment tools and cluster automation. |
Go vs Shell Scripts
Start with shell scripts for prototyping. Graduate to Go when you need type safety, testability, or complex orchestration logic.
Use Go when you need:
Use shell scripts when you need:
See the full implementation guide in the source documentation.
| Principle | Description |
|---|---|
| Separation of concerns | Commands handle CLI logic; pkg/ handles business logic |
| Testable by default | Interfaces for external dependencies enable fake clients |
| Fail fast | Validate configuration and connectivity before operations |
| Structured output | JSON output for machine consumption, human-friendly by default |
| Graceful degradation | Clear error messages with actionable context |
Building CLIs that operators trust.
See examples.md for code examples.