en un clic
go
Guidelines for Go development, testing, and tooling.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Guidelines for Go development, testing, and tooling.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Guidelines for creating, reviewing, and improving agent skills.
Guidelines for validation, staging, amending, and commit messages.
Guidelines for dependency injection patterns.
Guidelines for ensuring architectural changes are validated against core use cases.
Orchestrates efficient read and write interactions with the engram unified memory store via MCP tools. Provides deterministic workflows for decomposing observations into atomic memories, composing four-dimensional queries (context, similarity, relationship, time) for maximum retrieval accuracy, managing agent-managed focus context, and linking memories into associative webs at write time. Ensures memories are discoverable, precisely ranked, and structurally connected across sessions.
Guidelines for dual-use architecture (CLI and Go Library), dependency separation, and extensible registry patterns.
| name | go |
| description | Guidelines for Go development, testing, and tooling. |
Follow Effective Go as the baseline.
We follow the standard layout. See Layout Reference for details.
Use for object construction with optional parameters.
type Server struct {
timeout time.Duration
}
type Option func(*Server)
func WithTimeout(t time.Duration) Option {
return func(s *Server) { s.timeout = t }
}
func New(opts ...Option) *Server {
s := &Server{timeout: 30 * time.Second} // Default
for _, opt := range opts {
opt(s)
}
return s
}
The standard for unit testing.
func TestAdd(t *testing.T) {
tests := []struct {
name string
a, b int
want int
}{
{"positive", 1, 2, 3},
{"negative", -1, -1, -2},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := Add(tt.a, tt.b); got != tt.want {
t.Errorf("Add() = %v, want %v", got, tt.want)
}
})
}
}
Wrap upstream errors to provide context.
if err := dest.Do(); err != nil {
return fmt.Errorf("failed to do action: %w", err)
}
Use log/slog with TextHandler.
logger := slog.New(slog.NewTextHandler(os.Stdout, nil))
slog.Info("starting application", "version", version)
golangci-lint.go test -race ./....