Agent skill

Go Best Practices

by 2SSK in 2SSK/dot-files

Go development best practices. An agent skill from 2SSK/dot-files.

MITAuto-check passedDevelopment

Install Go Best Practices

skills CLI
$ npx skills add 2SSK/dot-files --skill go-best-practices -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install 2SSK/dot-files go-best-practices --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/2SSK/dot-files.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/go-best-practices .claude/skills/go-best-practices && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
go-best-practices
GitHub stars
247
Token cost
~467 tokens
SKILL.md length
55 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Go development best practices. An agent skill from 2SSK/dot-files.

  • Writing Go code
  • SKILL.md covers Core Principles, Error Handling, Concurrency and Context, plus 3 more sections
  • Calls go

What it does

Go Best Practices is an agent skill from 2SSK/dot-files. Go development best practices. Idiomatic Go, error handling, concurrency patterns, testing. Use when writing Go code.

Its SKILL.md is about 470 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: opencode

It sits in Development. The licence is MIT.

When your agent uses it

  • Writing Go code

Example prompts

  • “/go-best-practices”

Requirements

  • Compatibility (from SKILL.md): opencode

What it can do on your machine

Read from SKILL.md and the folder at commit b0ecfb1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    opencode

    From compatibility in the SKILL.md frontmatter.

Context cost

Go Best Practices loads about 467 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 55 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~467

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from 2SSK/dot-files at commit b0ecfb1, republished under its MIT licence (© 2SSK). 55 words, ~467 tokens.

Download SKILL.mdSave it as .claude/skills/go-best-practices/SKILL.md (or your agent's skills folder).
name
go-best-practices
description
Go development best practices. Idiomatic Go, error handling, concurrency patterns, testing. Use when writing Go code.
compatibility
opencode

Go Best Practices

Follow Go proverbs and community standards for all Go code.

Core Principles

  • Simplicity: Go is simple. Avoid over-engineering.
  • Idiomatic: Follow effective Go guidelines
  • Performance: Profile before optimizing
  • Testing: Test-driven development

Error Handling

go
// Always wrap errors with context
if err != nil {
    return fmt.Errorf("failed to do operation: %w", err)
}

// Custom error types for known conditions
var NotFoundError struct{ Name string }
func (e NotFoundError) Error() string {
    return fmt.Sprintf("not found: %s", e.Name)
}

Concurrency

go
// Use channels for coordination, mutexes for state
// Worker pool pattern
jobs := make(chan Job, workerCount)
results := make(chan Result, workerCount)

// Start workers
for i := 0; i < workerCount; i++ {
    go worker(jobs, results)
}

Context

go
// All API calls must accept context
func DoSomething(ctx context.Context, arg Arg) (Result, error) {
    req, err := http.NewRequestWithContext(ctx, ...)
    // ...
}

Testing

go
// Table-driven tests
tests := []struct {
    name     string
    input    Arg
    expected Result
}{
    {"case 1", Arg{...}, Expected{...}},
}

for _, tt := range tests {
    t.Run(tt.name, func(t *testing.T) {
        result := DoSomething(tt.input)
        assert.Equal(t, tt.expected, result)
    })
}

Build Commands

bash
go fmt ./...
go vet ./...
golangci-lint run
go test -race -coverprofile=coverage.out ./...
go build -o binary ./cmd/...

Quality Gates

  • gofmt passes
  • golangci-lint passes
  • go test -race passes
  • Coverage ≥ 80%
  • No goroutine leaks

© 2SSK, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/go-best-practices of 2SSK/dot-files.

Open the folder on GitHubat commit b0ecfb1

Compare with similar skills

Go Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Go Best Practices compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Go Best Practices this skill2SSK/dot-files247—~467Automated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.5kAutomated safety check: PassGPL-3.0
Merge Dependabot PRsonyx-dot-app/onyx32k1 repos~2.2kAutomated safety check: PassMIT
Android UI Visual Reviewpermissionlesstech/bitchat-android7.8k—~2.6kAutomated safety check: PassGPL-3.0
Constraint-Driven Developmentaddyosmani/agent-skills103k2 repos~5.2kAutomated safety check: PassMIT

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Merge Dependabot PRs

    onyx-dot-app/onyx

    Triages and lands a batch of open Dependabot PRs in the Onyx repo, where main is gated exclusively by GitHub's merge queue: approves and enqueues green PRs, closes superseded duplicates, fixes…

    32k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Android UI Visual Review

    permissionlesstech/bitchat-android

    Analyze an Android pull request, branch, commit, or patch for user-visible changes and produce reproducible before/after screenshots from isolated builds.

    7.8k GitHub stars~2.6k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Constraint-Driven Development

    addyosmani/agent-skills

    Records a project's quality bar in CONSTRAINTS.md and watches diffs for signs an agent quietly weakened it, such as suppressions, skipped tests or lowered thresholds.

    103k GitHub starsUsed in 2 repos~5.2k tokens
    DevelopmentAuto-check passed
  • Go Pedantry

    chromedp/chromedp

    This skill should be used when the user is writing Go code and needs guidance on Go-specific pedantry: error wrapping with fmt.Errorf and %w, interface design (accept interfaces return structs)…

    13k GitHub stars~3.7k tokensUpdated 3 days ago
    DevelopmentAuto-check passed

More from 2SSK/dot-files

  • Cpp Best Practices

    2SSK/dot-files

    C++ development best practices. An agent skill from 2SSK/dot-files.

    247 GitHub stars~489 tokensUpdated yesterday
    Auto-check passed
  • Docker and container best practices. An agent skill from 2SSK/dot-files.

    247 GitHub stars~438 tokensUpdated yesterday
    Auto-check passed
  • Observability

    2SSK/dot-files

    Observability best practices. An agent skill from 2SSK/dot-files.

    247 GitHub stars~676 tokensUpdated yesterday
    Auto-check passed
  • React Native development. An agent skill from 2SSK/dot-files.

    247 GitHub stars~570 tokensUpdated yesterday
    Auto-check passed
  • Ship

    2SSK/dot-files

    A skill your agent uses when the user wants to commit, push, and open a pull request for the current changes.

    247 GitHub stars~808 tokensUpdated yesterday
    Auto-check: notes
  • TDD

    2SSK/dot-files

    Test-Driven Development workflow. An agent skill from 2SSK/dot-files.

    247 GitHub stars~444 tokensUpdated yesterday
    Auto-check passed

Questions about Go Best Practices

What does Go Best Practices do?

Go development best practices. An agent skill from 2SSK/dot-files. Go Best Practices is an agent skill from 2SSK/dot-files. Go development best practices.

When should I use Go Best Practices?

Go Best Practices fits situations like: writing Go code.

How do I install Go Best Practices in Claude Code?

Run `npx skills add 2SSK/dot-files --skill go-best-practices -a claude-code`. Or copy the skill folder (.claude/skills/go-best-practices in 2SSK/dot-files) into .claude/skills/go-best-practices in your project. Claude Code loads it when a task matches its description.

How do I install Go Best Practices in Codex?

Run `npx skills add 2SSK/dot-files --skill go-best-practices -a codex`. Or copy the skill folder (.claude/skills/go-best-practices in 2SSK/dot-files) into .agents/skills/go-best-practices in your project. Codex loads it when a task matches its description.

Can I use Go Best Practices in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add 2SSK/dot-files --skill go-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/go-best-practices, .gemini/skills/go-best-practices, .github/skills/go-best-practices and .opencode/skills/go-best-practices in your project.

What does Go Best Practices need to run?

Going by SKILL.md and its folder, Go Best Practices needs the command-line tools its instructions call (go). Compatibility (from SKILL.md): opencode.

Does Go Best Practices access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Go Best Practices safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Go Best Practices use?

Go Best Practices is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Go Best Practices use?

About 467 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Go Best Practices?

Skills that share tags, products or a category with Go Best Practices: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Mailspring App Screenshots (Foundry376/Mailspring, 18k stars), Merge Dependabot PRs (onyx-dot-app/onyx, 32k stars) and Android UI Visual Review (permissionlesstech/bitchat-android, 7.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Go Best Practices?

2SSK (a GitHub user) maintains it in 2SSK/dot-files, which has 247 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: 2SSK/dot-files on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.