README.md
Beautiful Go
Beautiful Go is a set of three Agent Skills and a golangci-lint configuration that teach coding agents to write, review, and port Go 1.27 code. The skills work with any agent that reads the Agent Skills format, e.g. Claude Code, Codex, Cursor, and Gemini CLI.
| 1 | skills/ |
| 2 | ├── go-best-practices/ # rules the agent follows when it writes Go |
| 3 | │ └── references/ # digests of the style guides, read when a rule needs its reason |
| 4 | ├── go-review/ # writes a review in which every finding cites a rule and shows the fix |
| 5 | │ └── assets/ # the review template and golangci.yml |
| 6 | └── go-port/ # ports C, C++, Python, Java, JS, TS, Rust, or older Go, tests first |
| 7 | scripts/ # the checks that CI runs |
The review skill and the port skill take their style rules from go-best-practices, so
install all three.
| 1 | flowchart LR |
| 2 | review[go-review] --> write[go-best-practices] |
| 3 | port[go-port] --> write |
| 4 | write --> refs[references/] |
| 5 | review --> lints[assets/golangci.yml] |
Install
Install the skills with the skills installer,
and add -g to install them for your user account instead of the current project.
| 1 | npx skills add https://git.cafe/dynd/BeautifulGo.git |
To install by hand, copy or link the three folders under skills/ into the folder where
your agent looks for skills, e.g. ~/.claude/skills/ or ~/.agents/skills/.
The skills run these tools, and they skip a tool that is missing.
| Tool | Where to get it |
|---|---|
| Go 1.27 | go.dev/dl |
| golangci-lint 2.15 or later | golangci-lint.run |
| govulncheck | go install golang.org/x/vuln/cmd/govulncheck@latest |
| gopls | go install golang.org/x/tools/gopls@latest |
jscpd 5.4 or later, optional for go-port | github.com/kucherenko/jscpd |
Use the lint configuration
The configuration enables 41 linters and the gofmt and goimports formatters. Copy it
to the root of your module.
| 1 | cp skills/go-review/assets/golangci.yml your-module/.golangci.yml |
| 2 | cd your-module && golangci-lint run |
Check the repository
CI runs these checks on every pull request. The checks need Go 1.27, golangci-lint, Python 3.11 or later, and network access, because check-examples.py runs go get.
| 1 | python3 scripts/check-skill.py # front matter, links, and referenced files |
| 2 | python3 scripts/check-examples.py # every Go example is gofmt-clean and passes go vet |
| 3 | sh scripts/check-lints.sh # every enabled linter fires on scripts/lint-fixture |
| 4 | python3 scripts/check-versions.py # every version agrees with versions.toml |
| 5 | python3 scripts/check-rules.py # the rule table is well formed, its ids match scripts/rule-ids.txt, and its tool names exist |
Dispatch upstream.yml with cafe ci dispatch upstream.yml to compare versions.toml with
the newest Go release, golangci-lint release and upstream guides. The check names what
moved. Run python3 scripts/check-versions.py --upstream to see the same report.
Sources
The rules draw from Effective Go, the
Go Code Review Comments wiki, the
Google and
Uber style guides,
Organizing a Go module, and the
Go release notes. Where the older style guides lag on
Go 1.21–1.27 idioms, the Go release notes and toolchain (go fix, go vet) are the
primary authority. Nearly half of the entries in references/rules.md (marked ours) are
this project's stricter house defaults where upstream guides stay permissive or silent.
The project follows the design of
Beautiful Rust.