Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: adaptive-enforcement-lab-claude-skills-go-cli-architecture3description: Go CLI Architecture4---56# Go CLI Architecture78## When to Use This Skill910> **Go vs Shell Scripts**11>12>13> Start with shell scripts for prototyping. Graduate to Go when you need type safety, testability, or complex orchestration logic.14>1516**Use Go when you need:**1718- Direct Kubernetes API access with type-safe clients19- Complex orchestration logic across multiple resources20- Reusable tooling packaged as container images21- Performance-critical operations (milliseconds matter)22- Long-running controllers or operators2324**Use shell scripts when you need:**2526- Simple glue logic between existing tools27- Quick prototypes or one-off operations28- kubectl-based workflows without custom logic29- CI/CD steps that primarily call other CLIs3031---323334## Implementation3536See the full implementation guide in the [source documentation](https://adaptive-enforcement-lab.com/build/go-cli-architecture/).373839## Key Principles4041| Principle | Description |42| ----------- | ------------- |43| **[Separation of concerns](../../patterns/architecture/separation-of-concerns/index.md)** | Commands handle CLI logic; `pkg/` handles business logic |44| **[Testable by default](testing/index.md)** | Interfaces for external dependencies enable fake clients |45| **[Fail fast](../../patterns/error-handling/fail-fast/index.md)** | Validate configuration and connectivity before operations |46| **[Structured output](command-architecture/io-contracts.md)** | JSON output for machine consumption, human-friendly by default |47| **[Graceful degradation](../../patterns/error-handling/graceful-degradation/index.md)** | Clear error messages with actionable context |4849---5051*Building CLIs that operators trust.*525354## Examples5556See [examples.md](examples.md) for code examples.57## References5859- [Source Documentation](https://adaptive-enforcement-lab.com/build/go-cli-architecture/)60- [AEL Build](https://adaptive-enforcement-lab.com/build/)6162---63> Converted and distributed by [TomeVault](https://tomevault.io/claim/adaptive-enforcement-lab) — claim your Tome and manage your conversions.64<!-- tomevault:4.0:skill_md:2026-04-15 -->
Run npx skillmds@latest add tomevault-io/adaptive-enforcement-lab-claude-skills-go-cli-architecture in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Go CLI Architecture It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.