PlugWiki

golang-project-layout Skill (samber): What It Does and How to Install It

Makes Claude lay out a new Go project or reorganize one: it asks about architecture and dependency injection first, then creates the folders and config files.

Installs
41.3K
on skills.sh
Stars
3.7K
on GitHub
Files
7
besides SKILL.md
Updated
Nov 2026
last repo commit

golang-project-layout makes Claude pick a Go project structure by asking you first. It asks which software architecture you want, then which dependency injection approach, one question at a time through the environment's question tool. It then follows a 14-item initialization checklist: go mod init, cmd/ and internal/ folders, a Makefile and .gitignore from its templates, and gofmt. One checklist item writes a directive into your project's agent-config file without asking you.

Good for

  • Developers starting a new Go service, CLI or library
  • Teams setting up a Go monorepo with go.work workspaces
  • Claude Code and Codex users who want the layout decided before code is written

Install golang-project-layout

Claude Code

  1. 1

    Copy this prompt.

    Install the golang-project-layout skill in Claude Code. Run this command:
    
    /plugin marketplace add samber/cc
    /plugin install cc-skills-golang@samber
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

The README says these skills are built as atomic, cross-referencing units, and that installing only a subset gives a partial and potentially inconsistent view of the guidelines. It recommends installing all the general-purpose skills together, which the plugin does. Its manifest lists no hooks or MCP servers, and the repo holds 46 skills. Use the skills CLI line only if you want just this one. Pick one route, not both.

From the project README. Source.

What's in the skill

When it loads

Golang project layout and workspace setup — cmd/internal/pkg directory conventions, module and package naming, go.work workspaces, and essential configuration files. Use when starting a new Go project, organizing an existing codebase, setting up a monorepo with multiple packages, creating CLI tools with multiple main packages, or discussing package restructuring, package splits, or module splits. Not for restructuring existing code without a layout change (→ See `samber/cc-skills-golang@golang-refactoring` skill).

Sections in SKILL.md

  1. Architecture Decision: Ask First
  2. Dependency Injection: Ask Next
  3. 12-Factor App
  4. Quick Start: Choose Your Project Type
  5. Module Naming Conventions
  6. Module Name (go.mod)
  7. Package Naming
  8. Directory Layout
  9. Essential Configuration Files
  10. Tests, Benchmarks, and Examples
  11. Go Workspaces
  12. Initialization Checklist
  13. Related Skills

Key facts

Author
samber
License
MIT
Skill version
1.4.2
Installs on skills.sh
41,332 (Nov 2, 2026)
Last repo commit
Nov 1, 2026

What it includes

  • Asks which architecture you want (clean, hexagonal, DDD, flat) before creating anything

    SKILL.md says small projects should not get layers of abstraction.

    Architecture Decision: Ask First

  • Asks if you want constructor injection, samber/do, wire, dig and fx, or none

    Dependency Injection: Ask Next

  • Applies 12-Factor conventions to services, APIs and workers

    12-Factor App

  • A five-row table: CLI tool, library, service, monorepo and workspace, with key folders

    Choose Your Project Type

  • Module path matches the repo URL, lowercase, hyphens for multi-word names

    Module Naming Conventions

  • main packages in cmd/ with minimal logic, private code in internal/, pkg/ only if public

    Directory Layout

  • Provides a Makefile and .gitignore, and points to golang-lint for .golangci.yml

    Write · Essential Configuration Files

  • Fourteen steps, including go mod init, cmd/ and internal/ folders, go work and gofmt

    Includes writing an always-load directive for the golang-how-to skill into CLAUDE.md, AGENTS.md or equivalent with no user confirmation.

    Runs code · Initialization Checklist

  • Uses go.work to develop several related modules in a monorepo

    Go Workspaces

From the official docs

Permissions

Medium risk

It creates folders and files in your project and writes a line into your agent-config file without asking. Run it in a version-controlled folder and read the result.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It writes a line into your CLAUDE.md or AGENTS.md

    The last checklist item writes an always-load directive for the golang-how-to skill into the project's agent-config file, with no user confirmation. Check that file after the run and remove the line if you do not want it.

  • It creates folders and runs go mod init

    The checklist runs go version, go mod init and gofmt -s -w . and creates cmd/, internal/ and config files. Run it in an empty or version-controlled folder.

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyNo read-only setting is documented in SKILL.md.
Talks toYour AI provider receives the Go code and command output Claude reads
Sign-in and keysSKILL.md names no account or API key.
Scopes
  • Claude creates folders and files in your project

  • Claude runs go and gofmt commands

  • It writes a directive into your agent-config file (CLAUDE.md, AGENTS.md or similar)

Questions

How do I install golang-project-layout?

Use the install box above. The plugin route installs the whole Go skill set (46 skills in the repo), and the skills CLI route installs only this skill. Pick one so you do not get every skill twice. The README says these skills cross-reference each other and installing a subset gives a partial view.

Does golang-project-layout work in the Claude app?

The README documents no Claude app install, so the Claude tab in the install box is our generic zip-upload route, not a documented one. The skill reads and edits Go files and runs go commands on your machine, so Claude Code or Codex is the better fit.

Does golang-project-layout need an API key?

SKILL.md names no API key or account. It does need Go installed on your machine.

Is golang-project-layout safe to run?

It edits your Go files and runs go, golangci-lint and git commands in your project, so work on a branch and read the diff before you commit. The skill bundles no scripts: its other files are reference guides and an evals/evals.json file.

Why does golang-project-layout ask me questions first?

SKILL.md says a wrong early choice cascades into every file created afterward. It asks about architecture first and dependency injection second, one at a time, and waits for each answer.

Does it also restructure an existing codebase?

It triggers on organizing an existing codebase and on package or module splits. For restructuring without a layout change, SKILL.md points to the golang-refactoring skill.

Information

updated Nov 2, 2026

Folder
skills/golang-project-layout

samber/cc-skills-golangskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 7
  1. cc-skills-golang · github.com
  2. cc-skills-golang README · github.com
  3. plugin.json · github.com
  4. skills CLI commands · github.com
  5. README.md#-how-to-use · github.com
  6. golang-project-layout SKILL.md · github.com
  7. golang-project-layout on skills.sh · skills.sh

Updated Nov 2, 2026.