# Build Enterprise Go Architecture

Large Go systems can lose clear boundaries as teams add features. This skill gives Claude, Codex, and Claude Code structured patterns for clean architecture, DDD, and production service layout.

## Install

```bash
npx skillstore add joseph obrien/89jobrien-golang-enterprise-patterns
```

## Metadata

- Status: approved
- Slug: 89jobrien-golang-enterprise-patterns
- Version: 1.0.1
- Author version: 1.0.1
- Skillstore revision: r1
- Version status: valid
- Tree hash: 89d1a424f90bfc81fa804866c2699c6dfefe3e9f4280182a1bf09df7d6558ed8
- Author: Joseph OBrien
- GitHub username: 89jobrien
- License: MIT
- Repository: https://github.com/89jobrien/steve/tree/main/steve/skills/golang-enterprise-patterns
- Ref: c4037264bbd363c572662d6154a3ab28f5ca4f53
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, env\_access
- Quality score: 81
- Quality tier: silver
- Public page: https://skillstore.pages.dev/skills/89jobrien-golang-enterprise-patterns
- Manifest: https://skillstore.pages.dev/api/skills/89jobrien-golang-enterprise-patterns/manifest

## Capabilities

- Explains clean architecture package layout for Go services.
- Shows domain repository, service, and port interface examples.
- Demonstrates SQL persistence adapter patterns with dependency inversion.
- Covers aggregate roots, value objects, and domain events.
- Describes manual and Wire-style dependency injection.
- Provides configuration and custom error handling examples.

## Use Cases

- Plan a New Go Service: Define package boundaries, dependency direction, and service layers before implementation begins.
- Standardize Team Architecture: Create shared patterns for repositories, services, ports, adapters, and application wiring.
- Refactor a Growing Codebase: Move business rules into domain and application layers while keeping infrastructure isolated.

## Prompt Templates

### Map a New Service

```
Use the golang-enterprise-patterns skill to propose a clean architecture layout for a new Go API. Include packages, dependency direction, and boundaries.
```

### Define Ports and Adapters

```
Use this skill to design ports and adapters for a Go service with database storage and notifications. Explain each interface and adapter responsibility.
```

### Model a Domain Workflow

```
Use this skill to model an order workflow with aggregates, value objects, domain events, and invariants. Keep infrastructure outside the domain.
```

### Review Architecture Boundaries

```
Use this skill to review a Go service for clean architecture violations. Identify misplaced dependencies, unclear boundaries, and concrete refactoring steps.
```

## Limitations

- Provides guidance and snippets, not a runnable code generator.
- Examples omit full imports, tests, migrations, and security hardening.
- Does not cover every framework, cloud provider, or database driver.
- Requires user review before applying patterns to production systems.

## Best Practices

- Start with domain rules and use cases before choosing infrastructure details.
- Keep interfaces small and define them near the layer that owns the behavior.
- Use explicit constructors and configuration boundaries for production services.

## Anti Patterns

- Do not let database models become the domain model by default.
- Do not place business rules inside HTTP handlers or persistence adapters.
- Do not add architecture layers that have no clear responsibility.

## Security Audit

- Audited at: 2026-07-05T12:31:29.163\+00:00
- Summary: I found no executable malicious behavior in the reviewed skill. The static command, reconnaissance, sensitive-file, and environment findings are false positives caused by Markdown fences and Go sample code. The skill is documentation-only, but examples should be labeled clearly to reduce scanner noise.

## Stats

- Views: 180
- Downloads: 19
- Favorites: 0
- Popularity score: 0
