Skip to content
Agentmart
Submit a tool

go-best-practices

Best practices for writing Go code.

Skill by amoniacou

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/amoniacou-go-best-practices

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Best practices for writing Go code. Load it yourself, without being asked, before writing or changing Go code.

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/go-best-practices

What's inside

Skill name
go-best-practices
Description
Best practices for writing Go code. Load it yourself, without being asked, before writing or changing Go code.
License
MIT
Instructions
16 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Go best practices

## 1. No reflection when the types are known

When the code knows the types at compile time, write plain code. `reflect` is many times slower, skips the compiler's type checks and hides which fields are used.

- compare two fields with `a.Name == b.Name`, not `reflect.DeepEqual(a.Name, b.Name)`
- compare structs whose fields are all comparable with `a == b`
- compare slices and maps with `slices.Equal` and `maps.Equal`
- branch on a type with a type switch, not `reflect.TypeOf` or `reflect.ValueOf(x).Kind()`
- write a shared function with type parameters, not `any` plus `reflect`
- copy a struct with assignment, not by walking its fields

Use `reflect` only when the type is unknown until runtime and nothing else works: a serializer, a struct-tag parser, an ORM mapper. In tests, `reflect.DeepEqual` and `cmp.Diff` are fine.

From amoniacou/agent-skills, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 12, 2026 (17 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from amoniacou

Cite this page

go-best-practices skill. Agent Mart. https://agentmart.dev/skills/amoniacou-go-best-practices (last updated 2026-10-24)