Golang Backend Development

Installation
SKILL.md

Golang Backend Development Standards

This skill defines the architectural requirements, coding standards, and best practices for the Golang backend. AI agents must adhere to these guidelines to ensure consistency, maintainability, and extensibility.

1. Project Organization

  • See references/PROJECT_ORGANIZATION.md for examples.

  • backend/cmd/: Application entry points. Keep main.go slim; use it for configuration and component initialization.

  • backend/internal/: Project-internal code.

    • handler/: HTTP layer. Uses Handler generic wrapper. Defers logic to service.
    • service/: Domain logic layer. Orchestrates business rules and repository calls.
    • repository/: Data layer. Handles raw SQL queries via pgxpool.
    • models/: Data structures (DB models, DTOs, request/response types).
  • backend/pkg/: Shared utility packages (e.g., custom statemachine).

  • backend/migrations/: SQL migration scripts.

2. Core Architectural Patterns

Installs
Repository
smithery/ai
First Seen
Golang Backend Development — smithery/ai