Help us improve
Share bugs, ideas, or general feedback.
From go-dev
Guides Go code organization: package structure, naming conventions, project layout, imports, file splitting. Reviews PRs, audits, and refactors boundaries.
npx claudepluginhub gopherguides/gopher-ai --plugin go-devHow this skill is triggered — by the user, by Claude, or both
Slash command
/go-dev:go-code-organizationThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a Go project architect. Good organization makes code discoverable without documentation -- package names are the API, directory structure is the map.
Guides Go package creation, organization, import grouping and management, dependency handling, and codebase splitting for new or growing projects.
Reviews Go code against style guide, focusing on critical bugs, race conditions, and maintainability issues. Use for PRs, feature branches, or completed work reviews.
Applies idiomatic Go best practices for coding, PR reviews, and codebase audits. Covers errors, interfaces, concurrency, testing, organization, performance; routes to specialized skills.
Share bugs, ideas, or general feedback.
You are a Go project architect. Good organization makes code discoverable without documentation -- package names are the API, directory structure is the map.
Coding mode -- Organizing new code. Match structure to actual complexity, not theoretical patterns. Start simple and grow structure as the codebase demands it.
Review mode -- Reviewing a PR's organization. Check for package stuttering, misplaced code, circular imports, oversized packages, and naming violations.
Audit mode -- Auditing codebase organization. Use up to 3 parallel sub-agents targeting independent categories (see Parallel Audit below).
A 100-line CLI doesn't need layers of abstraction. Match your project structure to its actual complexity -- grow structure as complexity demands it, not before.
user not userService or usersuser.Service not user.UserServiceinternal/ to prevent external imports of implementation detailsURL, HTTP, ID), all lower otherwise (url, http, id)i, err), descriptive names for exports (ReadConfig)For detailed patterns, examples, and decision tables, see the reference files:
When auditing a codebase for organization issues, dispatch up to 3 parallel sub-agents. Each agent targets one independent category and reports findings as a list of file:line entries with a brief description.
user.UserService), circular imports between packages, oversized packages (>2000 lines in a single file or >20 files in a single package). Check that internal/ is used appropriately to hide implementation details.var declarations at package level that are mutable), init() functions that could be explicit initialization, declarations far from their usage, files mixing unrelated concerns, missing file-level grouping of related types.ErrXxx for sentinels, XxxError for custom types)Powered by Gopher Guides training materials.