dot-files: Skill for Claude Code

.claude/skills/go-best-practices/SKILL.md

go-best-practices is a skill for Claude Code from 2SSK/dot-files. It costs 29 tokens per session (483 once invoked), scanned A, original, MIT.

A set of coding guidelines for Go, a programming language designed for simple, compiled programs and concurrent services. It covers error handling, HTTP request context, worker pools, and table-driven tests.

In plain words
What is it for?
Use it when writing or reviewing Go services and libraries, especially code with errors, API calls, concurrent workers, or repeated test cases.
Why use it?
It helps keep Go code idiomatic and makes failures, cancellation, concurrency, and test cases easier to handle consistently. The examples show common patterns rather than one specific application.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions OpenCode.

This is 2SSK/dot-files's own configuration. It tells Claude Code how to work on dot-files itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dot-files configures →

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

Reuse

Borrowing it

Nothing to install: this file belongs to 2SSK/dot-files. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/2SSK/dot-files/main/.claude/skills/go-best-practices/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/2SSK/dot-files

Made for: Claude Code.

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-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/2ssk/dot-files/go-best-practices/github.svg)](https://agentmods.dev/skills/2ssk/dot-files/go-best-practices)
Your own site
<a href="https://agentmods.dev/skills/2ssk/dot-files/go-best-practices"><img src="https://agentmods.dev/badge/skills/2ssk/dot-files/go-best-practices/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-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/2ssk/dot-files/go-best-practices"><img src="https://agentmods.dev/badge/skills/2ssk/dot-files/go-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 483 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00029 $0.00483
Opus 5.5 $0.00012 $0.00193
Sonnet 5.5 $0.00006 $0.00097
Haiku 4.5 $0.00003 $0.00048

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

Security

Grade A, and why

go-best-practices scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/go-best-practices/SKILL.md · 93 lines

What it actually says

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

// 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

// 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

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

Testing

// 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

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
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. 1mo ago First seen · 93 lines · 29 tokens per session scan A 361cbd4ef985

Subscribe to this mod's changes

go-best-practices is a skill published in the GitHub repository 2SSK/dot-files (258 stars, last pushed 9d ago), licensed MIT. It adds 29 tokens to every session and 483 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

Related

go-best-practices compared with skills from other repositories

go-best-practices next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
go-best-practices2SSK/dot-filesSkill2589d agoMITA29Claude Code
ax-go-agent-optimizeax-llm/axSkill3.0ktodayApache-2.0A51Claude Code, Codex
golang-testingsamber/cc-skills-golangSkill4.0k22d agoMITA115Claude Code
golang-samber-oopssamber/cc-skills-golangSkill4.0k22d agoMITA74Claude Code
golang-uber-fxsamber/cc-skills-golangSkill4.0k22d agoMITA122Claude Code
cobra-viperspf13/go-skillsSkill72316d agoMITA97Claude Code
tree-sitter-language-pack-extracting-code-structurexberg-io/tree-sitter-language-packSkill489yesterdayMITA52Claude Code