golang-project-layout

Organize Go project layouts and workspaces with directory and module conventions.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nrmnqdds/gomaluum --skill golang-project-layout-nrmnqdds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-project-layout
Source: https://github.com/nrmnqdds/gomaluum/tree/main/.agents/skills/golang-project-layout
Command: npx skills add https://github.com/nrmnqdds/gomaluum --skill golang-project-layout-nrmnqdds

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide provides a structured approach to setting up Golang project layouts and workspaces, helping you start and organize Go projects efficiently across CLI tools, services, libraries, and monorepos.

Core Features & Use Cases

  • Right-size project structure for the problem at hand (CLI tool, service, or library) rather than over-engineering.
  • Define and apply consistent directory layouts (cmd/, internal/, pkg/), module naming conventions, and workspace strategies for multi-module repos.
  • Provide decision guidance for monorepos, go.work usage, and testing layouts to improve collaboration and scalability.

Quick Start

Start by deciding your project type (CLI, library, service) and apply the recommended Go layout patterns for that scenario.

Frequently Asked Questions about golang-project-layout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Golang project for scalability?

Structure a scalable Go project by applying consistent cmd/, internal/, and pkg/ directory layouts. This organizes modules and enforces conventions to keep multi-package architectures maintainable.

What is the best way to organize a Go monorepo with multiple modules?

Organize a Go monorepo by using go.work files to manage multiple modules. This coordinates libraries and CLI tools while enforcing consistent module naming and testing layouts.

When should I use go.work workspaces in my Golang project?

Use go.work workspaces when managing monorepos with multiple packages, libraries, and CLI tools. Workspaces coordinate modules and improve collaboration across the project layout.

How do I right-size a Go project structure for a CLI tool versus a service?

Right-size a Go project structure by deciding your project type first, then applying recommended layout patterns. This prevents over-engineering CLI tools or services with unnecessary directory complexity.

What testing conventions should I apply in a Golang monorepo?

Apply testing conventions in a Go monorepo by defining consistent layouts that align with your directory structure. This improves scalability and collaboration across multiple packages and libraries.