Search

PythonReactSEOPDF
OpenClaw

Afrexai Go Production

Go Production Engineering

1kalin0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install 1kalin/afrexai-go-production

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Go Production Engineering

You are a Go production engineering expert. Follow this system for every Go project — from architecture decisions through production deployment. Apply phases sequentially for new projects; use individual phases as needed for existing codebases.


Quick Health Check (/16)

Score 0 (missing), 1 (partial), or 2 (solid) for each signal:

Signal What to Check
Project structure Standard layout, clean package boundaries
Error handling Wrapped errors, sentinel errors, no swallowed errors
Concurrency safety No goroutine leaks, proper context propagation
Testing >80% coverage, table-driven tests, race detector clean
Observability Structured logging, metrics, tracing
Configuration 12-factor, validated at startup
CI/CD Linting, testing, building in pipeline
Documentation GoDoc comments, README, ADRs

Score interpretation: 0-6 = 🔴 Critical gaps | 7-10 = 🟡 Needs work | 11-14 = 🟢 Solid | 15-16 = 💎 Exemplary


Phase 1: Project Architecture

Project Structure (Standard Layout)
project-root/
├── cmd/
│   ├── api/              # HTTP API binary
│   │   └── main.go
│   └── worker/           # Background worker binary
│       └── main.go
├── internal/             # Private packages (enforced by Go)
│   ├── domain/           # Business types & interfaces
│   │   ├── user.go
│   │   └── order.go
│   ├── service/          # Business logic
│   │   ├── user.go
│   │   └── user_test.go
│   ├── repository/       # Data access
│   │   ├── postgres/
│   │   └── redis/
│   ├── handler/          # HTTP/gRPC handlers
│   │   ├── http/
│   │   └── grpc/
│   ├── middleware/        # HTTP middleware
│   └── config/           # Configuration
├── pkg/                  # Public packages (use sparingly)
├── api/                  # OpenAPI specs, proto files
├── migrations/           # Database migrations
├── scripts/              # Build/deploy scripts
├── Makefile
├─...

Source information

Source
github
Repository
openclaw/skills
Path
skills/1kalin/afrexai-go-production
Version
—
Commit
84fdc3a187608cbfe424bbb4b057b99d4fd0f491
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

Go Production Engineering 🐹

Build production-grade Go services with battle-tested patterns. From project architecture through deployment — every phase covered with code examples, decision matrices, and quality scoring.

Install

clawhub install afrexai-go-production

What's Inside

A complete 14-phase Go production engineering system:

  • Project Architecture — Standard layout, dependency injection, framework selection matrix
  • Error Handling — Sentinel errors, wrapping with %w, HTTP error mapping
  • Concurrency Patterns — Context propagation, errgroup, goroutine lifecycle, race prevention
  • Interface Design — Consumer-defined interfaces, the Go way
  • Testing — Table-driven tests, testcontainers integration, fuzz testing, benchmarks
  • Configuration — 12-factor config with validation at startup
  • Structured Logging — slog (stdlib), request ID middleware
  • Database Patterns — pgx connection pool, sqlc type-safe SQL, transactions
  • HTTP API Design — chi router, request/response patterns, health checks
  • Observability — OpenTelemetry tracing, Prometheus metrics
  • Production Deployment — Multi-stage Dockerfile, Makefile, GitHub Actions CI
  • Performance — pprof profiling, connection pooling, sync.Pool, pre-allocation
  • Security — govulncheck, security headers, input validation, rate limiting
  • Advanced Patterns — Generics, functional options, circuit breaker

Plus: 10 Commandments, 10 common mistakes table, production readiness checklist, quality scoring rubric.

Quick Start

Ask your agent:

  • "Set up a new Go service" — full project scaffold
  • "Review this Go code" — health check + anti-pattern detection
  • "Make this production ready" — complete readiness checklist
  • "Add observability" — OTel + Prometheus setup

⚡ Level Up

Want production-grade patterns for your specific industry?

AfrexAI Context Packs ($47) — Complete AI agent confi...

Extracted content

SKILL.md
# Go Production Engineering

You are a Go production engineering expert. Follow this system for every Go project — from architecture decisions through production deployment. Apply phases sequentially for new projects; use individual phases as needed for existing codebases.

---

## Quick Health Check (/16)

Score 0 (missing), 1 (partial), or 2 (solid) for each signal:

| Signal | What to Check |
|--------|--------------|
| Project structure | Standard layout, clean package boundaries |
| Error handling | Wrapped errors, sentinel errors, no swallowed errors |
| Concurrency safety | No goroutine leaks, proper context propagation |
| Testing | >80% coverage, table-driven tests, race detector clean |
| Observability | Structured logging, metrics, tracing |
| Configuration | 12-factor, validated at startup |
| CI/CD | Linting, testing, building in pipeline |
| Documentation | GoDoc comments, README, ADRs |

**Score interpretation:** 0-6 = 🔴 Critical gaps | 7-10 = 🟡 Needs work | 11-14 = 🟢 Solid | 15-16 = 💎 Exemplary

---

## Phase 1: Project Architecture

### Project Structure (Standard Layout)

```
project-root/
├── cmd/
│   ├── api/              # HTTP API binary
│   │   └── main.go
│   └── worker/           # Background worker binary
│       └── main.go
├── internal/             # Private packages (enforced by Go)
│   ├── domain/           # Business types & interfaces
│   │   ├── user.go
│   │   └── order.go
│   ├── service/          # Business logic
│   │   ├── user.go
│   │   └── user_test.go
│   ├── repository/       # Data access
│   │   ├── postgres/
│   │   └── redis/
│   ├── handler/          # HTTP/gRPC handlers
│   │   ├── http/
│   │   └── grpc/
│   ├── middleware/        # HTTP middleware
│   └── config/           # Configuration
├── pkg/                  # Public packages (use sparingly)
├── api/                  # OpenAPI specs, proto files
├── migrations/           # Database migrations
├── scripts/              # Build/deploy scripts
├── Makefile
├─...
README
# Go Production Engineering 🐹

Build production-grade Go services with battle-tested patterns. From project architecture through deployment — every phase covered with code examples, decision matrices, and quality scoring.

## Install

```bash
clawhub install afrexai-go-production
```

## What's Inside

A complete 14-phase Go production engineering system:

- **Project Architecture** — Standard layout, dependency injection, framework selection matrix
- **Error Handling** — Sentinel errors, wrapping with `%w`, HTTP error mapping
- **Concurrency Patterns** — Context propagation, errgroup, goroutine lifecycle, race prevention
- **Interface Design** — Consumer-defined interfaces, the Go way
- **Testing** — Table-driven tests, testcontainers integration, fuzz testing, benchmarks
- **Configuration** — 12-factor config with validation at startup
- **Structured Logging** — slog (stdlib), request ID middleware
- **Database Patterns** — pgx connection pool, sqlc type-safe SQL, transactions
- **HTTP API Design** — chi router, request/response patterns, health checks
- **Observability** — OpenTelemetry tracing, Prometheus metrics
- **Production Deployment** — Multi-stage Dockerfile, Makefile, GitHub Actions CI
- **Performance** — pprof profiling, connection pooling, sync.Pool, pre-allocation
- **Security** — govulncheck, security headers, input validation, rate limiting
- **Advanced Patterns** — Generics, functional options, circuit breaker

Plus: 10 Commandments, 10 common mistakes table, production readiness checklist, quality scoring rubric.

## Quick Start

Ask your agent:
- "Set up a new Go service" — full project scaffold
- "Review this Go code" — health check + anti-pattern detection
- "Make this production ready" — complete readiness checklist
- "Add observability" — OTel + Prometheus setup

## ⚡ Level Up

Want production-grade patterns for your specific industry?

**[AfrexAI Context Packs ($47)](https://afrexai-cto.github.io/context-packs/)** — Complete AI agent confi...

Related skills

OpenClaw

agent-pack-n-go

aicodelion

🚀 Clone your OpenClaw AI Agent to a new device in ~25 minutes — configs, memory, skills, everything.

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

cacheforge-skills

cacheforge-ai

⚡ SOTA agent skills for OpenClaw — observability, security, code quality, incident response, and more. Built by Anvil AI.

OpenClaw

restart-guard

zjianru

OpenClaw Skill: Safely restart the Gateway with context preservation, guardian watchdog, and multi-channel notification