go-project-layout

go-project-layout is a skill for Claude Code from car12o/claude-workflows. It costs 38 tokens per session (1,036 once invoked), scanned C, original, MIT.

A guide for organising Go projects, including folders, packages, module settings, Makefiles, linting, and continuous integration. Go is a programming language, and a package is a group of related Go code.

In plain words
What is it for?
Starting a Go project, choosing its directory structure, designing packages, configuring go.mod, and setting up Makefile and CI checks.
Why use it?
It helps keep a Go codebase understandable as it grows and makes common build, test, lint, and release tasks consistent.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build -trimpath -o bin/ ./cmd/....

Part of the gopher plugin — 6 skills, 5 commands, 5 agents, 1 hook shipped together

Good fit Starting a Go project, choosing its directory structure, designing packages, configuring go.mod, and setting up Makefile and CI checks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/car12o/claude-workflows
agentmods
npx agentmods add skills/car12o/claude-workflows/go-project-layout

Made for: Claude Code.

Or install gopher, the plugin that ships this one along with the rest of its 6 skills, 5 commands, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-project-layout

README.md
[![agentmods](https://agentmods.dev/badge/skills/car12o/claude-workflows/go-project-layout/github.svg)](https://agentmods.dev/skills/car12o/claude-workflows/go-project-layout)
Your own site
<a href="https://agentmods.dev/skills/car12o/claude-workflows/go-project-layout"><img src="https://agentmods.dev/badge/skills/car12o/claude-workflows/go-project-layout/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for go-project-layout

Your own site · 80×15
<a href="https://agentmods.dev/skills/car12o/claude-workflows/go-project-layout"><img src="https://agentmods.dev/badge/skills/car12o/claude-workflows/go-project-layout.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.01036
Opus 5.5 $0.00015 $0.00414
Sonnet 5.5 $0.00008 $0.00207
Haiku 4.5 $0.00004 $0.00104

Measured 3mo ago against content hash c996df8b66ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

go-project-layout scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf bin/ coverage.out
plugins/gopher/skills/go-project-layout/SKILL.md · 147 lines

How it starts

The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Project Layout

Directory Structures

Minimal (library / small tool):

go.mod, main.go, main_test.go, README.md

Standard (single service):

cmd/server/main.go
internal/{domain,service,repository,handler}/
go.mod, Makefile, .golangci.yml

Service (multi-binary):

cmd/{api,worker}/main.go
internal/{domain,service,repository,handler,config}/
pkg/               # public libraries (sparingly)
migrations/
go.mod, Makefile, .golangci.yml, Dockerfile

Package Design

  • Single responsibility: one package = one clear purpose
  • Minimal exports: only export what consumers need
  • No circular imports: dependencies flow one direction
  • internal/ by default; pkg/ only for genuinely reusable libraries
  • Flat over nested: avoid deep hierarchies

go.mod (Go 1.24)

module github.com/org/project

go 1.24

tool (
    golang.org/x/tools/cmd/goimports
    github.com/golangci/golangci-lint/cmd/golangci-lint
    golang.org/x/vuln/cmd/govulncheck
)

Makefile

.PHONY: build test lint fmt vet tidy coverage run clean check

build:
	go build -trimpath -o bin/ ./cmd/...
test:
	go test -race ./...
coverage:
	go test -race -coverprofile=coverage.out ./...
	go tool cover -func=coverage.out
fmt:
	gofmt -s -w . && goimports -w .
vet:
	go vet ./...
lint:
	golangci-lint run
tidy:
	go mod tidy && go mod verify
clean:
	rm -rf bin/ coverage.out
check: fmt vet lint test build

.golangci.yml

run:
  timeout: 5m
  go: "1.24"
linters:
  enable:
    # Defaults (explicit for clarity)
    - errcheck
    - govet
    - staticcheck
    - unused
    - gosimple
    - ineffassign
    # Error handling
    - errorlint        # error wrapping correctness
    - errname          # error variable naming (ErrFoo)
    # Security
    - gosec            # security issues
    - bodyclose        # unclosed HTTP response bodies
    - noctx            # HTTP requests without context
    # Code quality
    - gocritic         # diagnostic + style + performance
    - revive           # extensible linter
    - unconvert        # unnecessary type conversions
    - wastedassign     # dead assignments
    - forcetypeassert  # unchecked type assertions
    - exhaustive       # enum switch exhaustiveness
    - nilnil           # confusing (nil, nil) returns
    - usestdlibvars    # use stdlib constants (http.StatusOK vs 200)
    - misspell         # spelling in comments/strings
    - prealloc         # slice pre-allocation opportunities
    # Conditional (common in Go 1.24+ projects)
    - sloglint         # log/slog best practices
    - testifylint      # testify best practices
issues:
  exclude-dirs: [vendor]

Read the full file on GitHub · 147 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 147 lines · 38 tokens per session scan C c996df8b66ba

Subscribe to this mod's changes

go-project-layout is a skill published in the GitHub repository car12o/claude-workflows (2 stars, last pushed 9mo ago), licensed MIT. It adds 38 tokens to every session and 1,036 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

go-project-layout compared with skills from other repositories

go-project-layout next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-project-layoutcar12o/claude-workflowsSkill29mo agoMITC38Claude Code
golang-continuous-integrationsamber/cc-skills-golangSkill4.0k2d agoMITA181Claude Code
tree-sitter-language-pack-managing-parsersxberg-io/tree-sitter-language-packSkill489todayMITA65Claude Code
go-cieduardo-sl/go-agent-skillsSkill901mo agoMITA142Claude Code
scaffold-gourmzd/dotfilesSkill6yesterdayApache-2.0A116Claude Code
setup-go-projectphobologic/claude_code_helpersSkill67d agoMITA70Claude Code
go-ci-workflowjohnqtcg/awesome-skillsSkill321mo agoMITA53Claude Code