golang-user-conventions

Standardize Go CLI/TUI project layout, testing, and UI patterns.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/ohnotnow/agentic-stuff --skill golang-user-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-user-conventions
Source: https://github.com/ohnotnow/agentic-stuff/tree/main/skills/golang
Command: npx skills add https://github.com/ohnotnow/agentic-stuff --skill golang-user-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go CLI/TUI projects often suffer from inconsistent structure, scattered patterns, and difficulty in onboarding. This Skill defines a coherent set of Go CLI/TUI conventions to standardize project layout, testing, and UI patterns.

Core Features & Use Cases

  • Project layout guidance: recommends layouts for single-file scripts, flat package main structures, and internal/ boundaries to organize code and tests.
  • CLI flag parsing and testing patterns: prescribes using flag.FlagSet per subcommand, testable wiring, and stable configuration strategies.
  • TUI and UI patterns: outlines Bubble Tea-based model structures, UI composition guidelines, and embedded UI considerations.
  • Edge-case safe defaults: provides SQLite usage patterns, embedded web UI patterns, and consistent error handling.

Quick Start

Initialize a new Go CLI/TUI project following the standard layout: main.go, internal/, and UI modules.

Frequently Asked Questions about golang-user-conventions

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

FAQPage Schema
What is the standard project structure for a Go CLI tool?

A standard Go CLI structure uses a root main.go file, an internal/ directory for private packages, and dedicated UI modules to organize code and tests for robust tooling.

How do I parse CLI flags for multiple subcommands in Go?

Use flag.FlagSet for each subcommand to parse CLI flags independently, ensuring testable wiring and stable configuration strategies for your Go tools.

Does this convention set support Bubble Tea-based TUI applications?

Yes, the conventions outline Bubble Tea-based model structures and UI composition guidelines, providing specific patterns for building terminal user interfaces in Go.

What is the best way to test Go CLI projects using standard libraries?

Testing Go CLI projects is best done using the standard library stdlib, combined with testable wiring structures that separate flag parsing from core logic.

Can I use SQLite and embedded web UIs in my Go CLI tools?

Yes, these conventions provide edge-case safe defaults including SQLite usage patterns and embedded web UI patterns for robust Go tool development.

When should I use a flat package main structure instead of internal packages?

Use a flat package main structure for single-file scripts or simple Go tools, and adopt internal/ boundaries for mid-size projects requiring organized code and tests.