Zum Inhalt springen

Skills / golang best practices skill

golang best practices skill

Production-ready Go code review skill for AI agents based on authoritative sources

β˜… 11by @saifoelloh175d agoMITGitHub β†’

Installation

Compatibility

Claude Code

Description

Golang Fullstack Best Practices Skill

Comprehensive Go + GORM + PostgreSQL review skill for AI agents based on authoritative sources

v3.0.0: The "Ultimate Merger" release. Unified 89 rules across 9 specialized domains, covering everything from Go concurrency and architecture to deep PostgreSQL performance and migration safety.

πŸ“‹ Overview

This meta-skill provides a complete code review solution for Go fullstack backend services. It combines general Go language best practices (v2.1.0) with specialized GORM & PostgreSQL expertise (v1.0.0).

πŸ“š Available Skills

| Domain | Rules | Focus | |---|---|---| | Concurrency Safety | 12 | Goroutines, channels, race conditions | | Clean Architecture | 9 | Layered architecture, gRPC, dependency inversion | | Error Handling (Unified) | 14 | Go error chains + Postgres error codes/retries | | Design Patterns | 13 | Code smells, refactoring, GoF patterns | | Idiomatic Go | 7 | Go conventions, interface design, pointers | | GORM Query Patterns | 11 | ORM queries, transactions, context | | PostgreSQL Syntax | 10 | Raw SQL, Postgres-specific features | | Query Performance | 7 | N+1 detection, indexing, EXPLAIN | | Migration Safety | 6 | Zero-downtime schema changes, rollbacks |

Priority Distribution:

  • 20 CRITICAL β€” Data loss, SQL injection, crashes, production bugs
  • 30 HIGH β€” Reliability, performance, architecture
  • 34 MEDIUM β€” Code quality, idiomatic patterns
  • 5 ARCHITECTURE β€” Structural compliance

πŸš€ Quick Start

Usage

Full Audit:

"Review this Go project for all language and database anti-patterns"

Targeted Reviews:

"Check for race conditions"              β†’ Concurrency Safety
"Audit architecture"                     β†’ Clean Architecture
"Review GORM queries for N+1"            β†’ GORM Patterns / Query Performance
"Debug this 23505 Postgres error"        β†’ Error Handling
"Is this migration safe for production?" β†’ Migration Safety

πŸ—οΈ Structure

golang-fullstack-best-practices/
β”œβ”€β”€ SKILL.md                    # Meta-skill coordinator (v3.0.0)
β”œβ”€β”€ metadata.json               # Full rule manifest
β”‚
β”œβ”€β”€ concurrency-safety/         # Go-specific
β”œβ”€β”€ clean-architecture/         # Architecture
β”œβ”€β”€ design-patterns/            # Quality & Smells
β”œβ”€β”€ idiomatic-go/               # Conventions
β”‚
β”œβ”€β”€ gorm-query-patterns/        # GORM ORM
β”œβ”€β”€ postgresql-syntax/          # Raw SQL
β”œβ”€β”€ query-performance/          # Optimization
β”œβ”€β”€ migration-safety/           # DB Schema changes
β”‚
β”œβ”€β”€ error-handling/             # Unified Go & DB
β”œβ”€β”€ shared/                     # Rule templates & categories
└── references/                 # Deep-dive guides

✨ Features

  • End-to-End Coverage: From Go syntax to PostgreSQL index optimization.
  • Unified Routing: High-accuracy targeting using meta-skill coordination.
  • Evidence-Based: Rules cite 8+ authoritative sources (Jon Bodner, Martin Fowler, Robert Martin, PostgreSQL Docs, etc.).
  • Production-Ready: Focused on zero-downtime, safe operations, and debugging real-world failures.

πŸ‘€ Author

saifoelloh


Built with ❀️ for bulletproof Go systems.

Related Skills