golang-architecture
Structure Go code with package-first boundaries, `cmd/` and `internal/`, and explicit dependency wiring. Use when shaping project layout, package ownership…
от HoangNguyen0403★ 598 звёзд на GitHub
Установить golang-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Golang Architecture
Priority: P0 (CRITICAL)
Rules
- Package-first design: organize by domain/capability before package-by-layer sprawl.
- Layout:
cmd/for binaries,internal/for private app code,pkg/only for intentional reuse. - Wiring: compose dependencies in
mainor dedicated constructors, not via hidden globals. - Interfaces: define small interfaces on the consumer side.
- Context: pass
context.Contextacross I/O and request boundaries.
Recipe
- Place the entrypoint in
cmd/<app>. - Create domain-owned packages under
internal/. - Expose constructors for services, repositories, and handlers.
- Keep business rules out of transport packages.
- Wire logging, config, DB, and HTTP server at startup.
Verify
- No package-level mutable singletons control runtime behavior.
- Imports flow inward; transport and storage packages do not pull business rules outward.
- Interfaces live with callers that need substitution.
-
mainwires dependencies but does not hold business logic. - Request and DB paths accept
context.Context.
Anti-Patterns
- No package soup: avoid dumping unrelated code into
internal/sharedorpkg/utils. - No global singletons: use constructors; avoid package-level mutable variables.
- No god services: split orchestration by capability.
- No fake Clean Architecture theatre: package names must match real ownership.
References
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- evals/evals.json
- references/clean-arch.md
- references/project-layout.md
FAQ
Что делает скилл golang-architecture?
Structure Go code with package-first boundaries, `cmd/` and `internal/`, and explicit dependency wiring. Use when shaping project layout, package ownership, or service boundaries in Go; defer Redis/cache-specific implementation recipes to database skills.
Как установить скилл golang-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл golang-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…