Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

go-helper

БесплатноБез исполняемых скриптовНе проверен

Current Go development guidance for modules, toolchains, workspaces, testing, fuzzing, concurrency, profiling, security, and Go tooling. Use when writing or…

shepherdjerredот shepherdjerred★ 85 звёзд на GitHub

Об этом скилле

Go Helper

Use the module's declared Go language version, propagate errors, keep goroutine ownership explicit, and run the repository's real verification commands. Distinguish read-only module checks from operations that edit files or fetch dependencies.

Current baseline

Verified 2026-08-03: current stable is Go 1.26.5.

go version
go env GOTOOLCHAIN GOVERSION

Go 1.26 added expression-valued new, the default Green Tea garbage collector, lower cgo overhead, crypto/hpke, and other library/tool changes. JSON v2 remains experimental behind GOEXPERIMENT=jsonv2; SIMD work is experimental and platform-specific.

The go directive is a strict minimum language/toolchain version. toolchain suggests a toolchain for the main module. Module-version boundaries also control behavior such as Go 1.22 loop variables and Go 1.23 timer channels.

Read references/releases.md for the 44-page research ledger. Read references/modules-and-tooling.md for module, workspace, toolchain, lint, and dependency operations. Read references/testing-and-performance.md for tests, fuzzing, races, synctest, traces, profiles, and PGO. Read references/patterns-and-security.md for errors, goroutines, HTTP, paths, logging, randomness, and vulnerability checks.

Command authority

Read-only or check-oriented commands:

go version
go env
go list ./...
go test ./...
go test -race ./...
go vet ./...
go mod verify
go mod tidy -diff
go work edit -json

go mod tidy edits go.mod and go.sum. Dependency and download commands can mutate caches and involve network state. Review their effect instead of labeling them read-only.

Focused verification

Use the package's actual task when one exists. A generic Go project baseline is:

go test ./...
go test -race ./...
go vet ./...
go mod tidy -diff

Run the repository-pinned golangci-lint command if configured. Do not prescribe a fixed number of linters; its catalog and defaults are versioned.

Modules and toolchains

module example.com/project

go 1.26

The go line is the minimum required version and selects language behavior. GOTOOLCHAIN controls whether the bundled, PATH, or downloadable toolchain is selected.

Use go get for dependency changes and go mod tidy to reconcile the module graph. Review both go.mod and go.sum. Avoid a broad go get -u ./...; upgrade an intentional set, read release notes, and verify the resulting graph.

For a non-mutating tidy check:

go mod tidy -diff

Errors

Return errors with context and preserve identity with %w when callers may inspect them:

func load(path string) ([]byte, error) {
	data, err := os.ReadFile(path)
	if err != nil {
		return nil, fmt.Errorf("read %q: %w", path, err)
	}
	return data, nil
}

Do not discard Close, ReadAll, Write, trace, or server errors when failure can affect correctness. For cleanup whose error matters, call and return it explicitly rather than relying only on defer.

Goroutine ownership

Every goroutine needs a lifecycle: completion, cancellation, or a process-long owner. Thread context.Context through request-scoped operations; never store it in a long-lived struct solely for convenience.

Prefer errgroup or an equivalent structured owner when sibling failure should cancel work. Bound concurrency and preserve output ordering when the contract requires it.

Tests and benchmarks

Go 1.25 stabilized testing/synctest; the stable API is synctest.Test(t, func(t *testing.T) { ... }) plus synctest.Wait(). Fake time advances only when goroutines in the bubble are durably blocked.

Use B.Loop() for current benchmarks. Avoid exact universal race-detector or benchmark overhead claims. The race detector only finds races executed on a supported platform.

Fuzz failures are stored at testdata/fuzz/FuzzName/<hash>. Keep them as regression corpus entries.

Modern APIs

  • Iterator functions and iter.Seq / Seq2 support range-over-function patterns. Do not yield after yield returns false.
  • maps and slices expose iterator-producing and consuming helpers.
  • unique.Make canonicalizes comparable values into handles.
  • math/rand/v2 is non-cryptographic randomness.
  • os.Root confines supported file operations against symlink path escapes.
  • runtime/trace.FlightRecorder provides bounded recent trace data; check Start and WriteTo errors and call Stop.
  • crypto/hpke implements the RFC 9180 DHKEM suites. Hybrid post-quantum KEMs require a separate specification; use protocol-specific expertise before designing cryptography.

HTTP and profiling

Check every server error. Bind diagnostic endpoints to an operator-only interface and never expose net/http/pprof unauthenticated to the public network.

Block and mutex profiles require nonzero profiling rates.

Полный SKILL.md на GitHub

Установить go-helper в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/modules-and-tooling.mdreferences/patterns-and-security.mdreferences/releases.mdreferences/testing-and-performance.md

FAQ

Что делает скилл go-helper?

Current Go development guidance for modules, toolchains, workspaces, testing, fuzzing, concurrency, profiling, security, and Go tooling. Use when writing or reviewing Go, go.mod, go.work, Go CI, tests, performance work, or Go upgrades.

Как установить скилл go-helper?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл go-helper запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить go-helper с