
Go project layout
Guides an agent to scaffold a new Go project or service with a sized layout
Go project layout is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 90
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Go project layout
This skill helps an AI coding agent set up the folder structure and starting files for a new Go project. It starts by matching the layout to the project's size: a flat package main for a small single-binary tool, a root package for a library, or a cmd/ and internal/ structure for services and multi-binary projects. It covers module path naming, keeping main.go thin with a run function that takes its dependencies, and where configuration and dependency direction should live.
The skill also gives the agent a short scaffolding procedure and a verification checklist. The steps cover initialising the module, setting the go directive, creating only the directories the first feature needs, pinning developer tools, and confirming that go build and go vet pass on the skeleton. It also advises against creating empty directories in advance and against committing local replace directives.
It relies on the Go toolchain and git, and the agent is expected to work in a Go project with read, edit and shell access restricted to go, gofmt and git commands. The skill ships as a single SKILL.md file with no bundled scripts.
When your agent uses it
Scaffold new Go projects and services: directory structure, cmd/ and internal/ conventions, when to use a flat layout, module naming, and main package wiring. Use when: "new Go project", "scaffold a service", "create project structure", "start a Go module", "how do I organize a new service", "set up folder structure". Not for: reviewing an existing architecture (go-architecture-review), DI wiring (go-dependency-injection), CI setup (go-ci).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*), Bash(git:*)(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 1 file (7 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.
What it does
- Layout by project size
- Chooses between flat, library, single-service and multi-binary structures based on what is being built.
- Module naming guidance
- Explains how to pick a fetchable module path and how the last path element becomes the import name.
- Thin main pattern
- Shows a main that only wires dependencies and delegates to a testable run function.
- Package and directory rules
- Covers internal/ usage, avoiding grab-bag packages, and keeping package names matching directories.
- Config and dependency flow
- Describes loading and validating config at startup and keeping domain code free of infrastructure imports.
- Scaffolding checklist
- Lists the steps and verification checks to confirm a fresh skeleton builds and vets cleanly.
Good for
- Scaffold a new Go service with cmd and internal directories
- Set up a Go module for a reusable library
- Decide whether a small Go tool should use a flat layout
- Start a new Go project with a thin main.go and config struct
- Organise the folders for a multi-binary Go repository
Go project layout FAQ
What does the skill need to run?
It requires the Go toolchain and git for repository initialisation.
Does Go project layout change or add any files on its own?
It is a guide for an agent that may create files with Read, Edit, Write and shell access limited to go, gofmt and git commands. The skill itself bundles no scripts.
Does Go project layout cover reviewing an existing project's architecture?
No. The skill's own description points reviews of existing architecture, dependency injection and CI setup to other skills.
Which Go versions does Go project layout mention?
It notes that since Go 1.26, go mod init writes the previous release in the go directive, and that module tools via go get -tool need Go 1.24 or later.
Does Go project layout run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Go project layout?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Go project layout?
The closest alternatives to Go project layout are Go architecture review, Project scaffold, Skill creator, Go documentation and Developing genkit go.
Where this comes from
- Description: from the skill's own SKILL.md.
More from eduardo-sl/go-agent-skills

Guides Go agents in designing HTTP REST APIs, handlers, middleware and shutdown
- Open source
- 90 GitHub stars
- Developer tools

Reviews Go project structure, dependency direction and module boundaries
- Open source
- 90 GitHub stars
- Developer tools

Guides an AI agent to build Go command-line tools with clean flags, streams and exit codes
- Open source
- 90 GitHub stars
- Developer tools

Guides Go code toward constructor injection, explicit wiring and no global state
- Open source
- 90 GitHub stars
- Developer tools

Guides Go code toward idiomatic design patterns like functional options and factories
- Open source
- 90 GitHub stars
- Developer tools

Guides building Go GraphQL servers with gqlgen, covering N+1 batching and query limits
- Open source
- 90 GitHub stars
- Developer tools



