Golang Patterns
antoniopaya22/go-rest-template
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
Patrones idiomáticos de Go, buenas prácticas y convenciones para construir aplicaciones Go robustas, eficientes y mantenibles.
$ npx skills add affaan-m/ECC --skill golang-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install affaan-m/ECC golang-patterns --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/es/skills/golang-patterns .claude/skills/golang-patterns && rm -rf skills-srcUse ~/.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/
Install the "golang-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patterns into .claude/skills/golang-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-patterns", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patternsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add affaan-m/ECC --skill golang-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install affaan-m/ECC golang-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .agents/skills && cp -r skills-src/docs/es/skills/golang-patterns .agents/skills/golang-patterns && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "golang-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patterns into .agents/skills/golang-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-patterns", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add affaan-m/ECC --skill golang-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install affaan-m/ECC golang-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/docs/es/skills/golang-patterns .cursor/skills/golang-patterns && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "golang-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patterns into .cursor/skills/golang-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-patterns", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/affaan-m/ECC.git --path docs/es/skills/golang-patterns--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add affaan-m/ECC --skill golang-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install affaan-m/ECC golang-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/docs/es/skills/golang-patterns .gemini/skills/golang-patterns && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "golang-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patterns into .gemini/skills/golang-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-patterns", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install affaan-m/ECC golang-patternsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add affaan-m/ECC --skill golang-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .github/skills && cp -r skills-src/docs/es/skills/golang-patterns .github/skills/golang-patterns && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "golang-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patterns into .github/skills/golang-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-patterns", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add affaan-m/ECC --skill golang-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install affaan-m/ECC golang-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/affaan-m/ECC.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/docs/es/skills/golang-patterns .opencode/skills/golang-patterns && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "golang-patterns" agent skill from https://github.com/affaan-m/ECC/tree/main/docs/es/skills/golang-patterns into .opencode/skills/golang-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "golang-patterns", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
golang-patternsPatrones idiomáticos de Go, buenas prácticas y convenciones para construir aplicaciones Go robustas, eficientes y mantenibles.
Golang Patterns is an agent skill from affaan-m/ECC. Patrones idiomáticos de Go, buenas prácticas y convenciones para construir aplicaciones Go robustas, eficientes y mantenibles.
Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with Go. The repository describes itself as: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 4eb71d9. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
goFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Golang Patterns loads about 3.6k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 342 words of instructions outside code blocks.
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.
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.
The full file from affaan-m/ECC at commit 4eb71d9, republished under its MIT licence (© affaan-m). 342 words, ~3,605 tokens.
.claude/skills/golang-patterns/SKILL.md (or your agent's skills folder).Patrones idiomáticos de Go y buenas prácticas para construir aplicaciones robustas, eficientes y mantenibles.
Go favorece la simplicidad sobre la astucia. El código debe ser obvio y fácil de leer.
// Bien: Claro y directo
func GetUser(id string) (*User, error) {
user, err := db.FindUser(id)
if err != nil {
return nil, fmt.Errorf("get user %s: %w", id, err)
}
return user, nil
}
// Mal: Demasiado ingenioso
func GetUser(id string) (*User, error) {
return func() (*User, error) {
if u, e := db.FindUser(id); e == nil {
return u, nil
} else {
return nil, e
}
}()
}Diseñar tipos para que su valor cero sea inmediatamente usable sin inicialización.
// Bien: El valor cero es útil
type Counter struct {
mu sync.Mutex
count int // el valor cero es 0, listo para usar
}
func (c *Counter) Inc() {
c.mu.Lock()
c.count++
c.mu.Unlock()
}
// Bien: bytes.Buffer funciona con el valor cero
var buf bytes.Buffer
buf.WriteString("hello")
// Mal: Requiere inicialización
type BadCounter struct {
counts map[string]int // el mapa nil causará panic
}Las funciones deben aceptar parámetros de interfaz y retornar tipos concretos.
// Bien: Acepta interfaz, retorna tipo concreto
func ProcessData(r io.Reader) (*Result, error) {
data, err := io.ReadAll(r)
if err != nil {
return nil, err
}
return &Result{Data: data}, nil
}
// Mal: Retorna interfaz (oculta detalles de implementación innecesariamente)
func ProcessData(r io.Reader) (io.Reader, error) {
// ...
}// Bien: Envolver errores con contexto
func LoadConfig(path string) (*Config, error) {
data, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("load config %s: %w", path, err)
}
var cfg Config
if err := json.Unmarshal(data, &cfg); err != nil {
return nil, fmt.Errorf("parse config %s: %w", path, err)
}
return &cfg, nil
}// Definir errores específicos del dominio
type ValidationError struct {
Field string
Message string
}
func (e *ValidationError) Error() string {
return fmt.Sprintf("validation failed on %s: %s", e.Field, e.Message)
}
// Errores centinela para casos comunes
var (
ErrNotFound = errors.New("resource not found")
ErrUnauthorized = errors.New("unauthorized")
ErrInvalidInput = errors.New("invalid input")
)func HandleError(err error) {
// Verificar error específico
if errors.Is(err, sql.ErrNoRows) {
log.Println("No records found")
return
}
// Verificar tipo de error
var validationErr *ValidationError
if errors.As(err, &validationErr) {
log.Printf("Validation error on field %s: %s",
validationErr.Field, validationErr.Message)
return
}
// Error desconocido
log.Printf("Unexpected error: %v", err)
}// Mal: Ignorar error con identificador en blanco
result, _ := doSomething()
// Bien: Manejar o documentar explícitamente por qué es seguro ignorar
result, err := doSomething()
if err != nil {
return err
}
// Aceptable: Cuando el error realmente no importa (raro)
_ = writer.Close() // Limpieza de mejor esfuerzo, error registrado en otro lugarfunc WorkerPool(jobs <-chan Job, results chan<- Result, numWorkers int) {
var wg sync.WaitGroup
for i := 0; i < numWorkers; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for job := range jobs {
results <- process(job)
}
}()
}
wg.Wait()
close(results)
}func FetchWithTimeout(ctx context.Context, url string) ([]byte, error) {
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
return nil, fmt.Errorf("create request: %w", err)
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, fmt.Errorf("fetch %s: %w", url, err)
}
defer resp.Body.Close()
return io.ReadAll(resp.Body)
}func GracefulShutdown(server *http.Server) {
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
<-quit
log.Println("Shutting down server...")
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
if err := server.Shutdown(ctx); err != nil {
log.Fatalf("Server forced to shutdown: %v", err)
}
log.Println("Server exited")
}import "golang.org/x/sync/errgroup"
func FetchAll(ctx context.Context, urls []string) ([][]byte, error) {
g, ctx := errgroup.WithContext(ctx)
results := make([][]byte, len(urls))
for i, url := range urls {
i, url := i, url // Capturar variables del bucle
g.Go(func() error {
data, err := FetchWithTimeout(ctx, url)
if err != nil {
return err
}
results[i] = data
return nil
})
}
if err := g.Wait(); err != nil {
return nil, err
}
return results, nil
}// Mal: Goroutine leak si el context es cancelado
func leakyFetch(ctx context.Context, url string) <-chan []byte {
ch := make(chan []byte)
go func() {
data, _ := fetch(url)
ch <- data // Bloquea para siempre si no hay receptor
}()
return ch
}
// Bien: Maneja correctamente la cancelación
func safeFetch(ctx context.Context, url string) <-chan []byte {
ch := make(chan []byte, 1) // Canal con buffer
go func() {
data, err := fetch(url)
if err != nil {
return
}
select {
case ch <- data:
case <-ctx.Done():
}
}()
return ch
}// Bien: Interfaces de un solo método
type Reader interface {
Read(p []byte) (n int, err error)
}
type Writer interface {
Write(p []byte) (n int, err error)
}
type Closer interface {
Close() error
}
// Componer interfaces según se necesite
type ReadWriteCloser interface {
Reader
Writer
Closer
}// En el paquete consumidor, no en el proveedor
package service
// UserStore define lo que este servicio necesita
type UserStore interface {
GetUser(id string) (*User, error)
SaveUser(user *User) error
}
type Service struct {
store UserStore
}
// La implementación concreta puede estar en otro paquete
// No necesita conocer esta interfaztype Flusher interface {
Flush() error
}
func WriteAndFlush(w io.Writer, data []byte) error {
if _, err := w.Write(data); err != nil {
return err
}
// Hacer flush si está soportado
if f, ok := w.(Flusher); ok {
return f.Flush()
}
return nil
}myproject/
├── cmd/
│ └── myapp/
│ └── main.go # Punto de entrada
├── internal/
│ ├── handler/ # Handlers HTTP
│ ├── service/ # Lógica de negocio
│ ├── repository/ # Acceso a datos
│ └── config/ # Configuración
├── pkg/
│ └── client/ # Cliente de API pública
├── api/
│ └── v1/ # Definiciones de API (proto, OpenAPI)
├── testdata/ # Fixtures de prueba
├── go.mod
├── go.sum
└── Makefile// Bien: Corto, minúsculas, sin guiones bajos
package http
package json
package user
// Mal: Verboso, mayúsculas mixtas, o redundante
package httpHandler
package json_parser
package userService // Sufijo 'Service' redundante// Mal: Estado global mutable
var db *sql.DB
func init() {
db, _ = sql.Open("postgres", os.Getenv("DATABASE_URL"))
}
// Bien: Inyección de dependencias
type Server struct {
db *sql.DB
}
func NewServer(db *sql.DB) *Server {
return &Server{db: db}
}type Server struct {
addr string
timeout time.Duration
logger *log.Logger
}
type Option func(*Server)
func WithTimeout(d time.Duration) Option {
return func(s *Server) {
s.timeout = d
}
}
func WithLogger(l *log.Logger) Option {
return func(s *Server) {
s.logger = l
}
}
func NewServer(addr string, opts ...Option) *Server {
s := &Server{
addr: addr,
timeout: 30 * time.Second, // por defecto
logger: log.Default(), // por defecto
}
for _, opt := range opts {
opt(s)
}
return s
}
// Uso
server := NewServer(":8080",
WithTimeout(60*time.Second),
WithLogger(customLogger),
)type Logger struct {
prefix string
}
func (l *Logger) Log(msg string) {
fmt.Printf("[%s] %s\n", l.prefix, msg)
}
type Server struct {
*Logger // Embedding - Server obtiene el método Log
addr string
}
func NewServer(addr string) *Server {
return &Server{
Logger: &Logger{prefix: "SERVER"},
addr: addr,
}
}
// Uso
s := NewServer(":8080")
s.Log("Starting...") // Llama al Logger.Log embebido// Mal: El slice crece múltiples veces
func processItems(items []Item) []Result {
var results []Result
for _, item := range items {
results = append(results, process(item))
}
return results
}
// Bien: Asignación única
func processItems(items []Item) []Result {
results := make([]Result, 0, len(items))
for _, item := range items {
results = append(results, process(item))
}
return results
}var bufferPool = sync.Pool{
New: func() interface{} {
return new(bytes.Buffer)
},
}
func ProcessRequest(data []byte) []byte {
buf := bufferPool.Get().(*bytes.Buffer)
defer func() {
buf.Reset()
bufferPool.Put(buf)
}()
buf.Write(data)
// Procesar...
return buf.Bytes()
}// Mal: Crea muchas asignaciones de string
func join(parts []string) string {
var result string
for _, p := range parts {
result += p + ","
}
return result
}
// Bien: Asignación única con strings.Builder
func join(parts []string) string {
var sb strings.Builder
for i, p := range parts {
if i > 0 {
sb.WriteString(",")
}
sb.WriteString(p)
}
return sb.String()
}
// Mejor: Usar la librería estándar
func join(parts []string) string {
return strings.Join(parts, ",")
}# Build y ejecutar
go build ./...
go run ./cmd/myapp
# Pruebas
go test ./...
go test -race ./...
go test -cover ./...
# Análisis estático
go vet ./...
staticcheck ./...
golangci-lint run
# Gestión de módulos
go mod tidy
go mod verify
# Formato
gofmt -w .
goimports -w .linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- gofmt
- goimports
- misspell
- unconvert
- unparam
linters-settings:
errcheck:
check-type-assertions: true
govet:
check-shadowing: true
issues:
exclude-use-default: false| Modismo | Descripción |
|---|---|
| Aceptar interfaces, retornar structs | Las funciones aceptan parámetros de interfaz, retornan tipos concretos |
| Los errores son valores | Tratar errores como valores de primera clase, no como excepciones |
| No comunicarse compartiendo memoria | Usar canales para coordinación entre goroutines |
| Hacer que el valor cero sea útil | Los tipos deben funcionar sin inicialización explícita |
| Un poco de copia es mejor que una pequeña dependencia | Evitar dependencias externas innecesarias |
| Claro es mejor que inteligente | Priorizar legibilidad sobre astucia |
| gofmt no es favorito de nadie pero sí amigo de todos | Siempre formatear con gofmt/goimports |
| Retornar temprano | Manejar errores primero, mantener el camino feliz sin indentar |
// Mal: Retornos naked en funciones largas
func process() (result int, err error) {
// ... 50 líneas ...
return // ¿Qué se está retornando?
}
// Mal: Usar panic para control de flujo
func GetUser(id string) *User {
user, err := db.Find(id)
if err != nil {
panic(err) // No hacer esto
}
return user
}
// Mal: Pasar context en struct
type Request struct {
ctx context.Context // El context debería ser el primer parámetro
ID string
}
// Bien: Context como primer parámetro
func ProcessRequest(ctx context.Context, id string) error {
// ...
}
// Mal: Mezclar receptores de valor y puntero
type Counter struct{ n int }
func (c Counter) Value() int { return c.n } // Receptor de valor
func (c *Counter) Increment() { c.n++ } // Receptor de puntero
// Elegir un estilo y ser consistenteRecuerda: El código Go debe ser aburrido de la mejor manera — predecible, consistente y fácil de entender. Ante la duda, mantenerlo simple.
© affaan-m, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in docs/es/skills/golang-patterns of affaan-m/ECC.
Open the folder on GitHubat commit 4eb71d9
Golang Patterns 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Golang Patterns this skillaffaan-m/ECC | 276k | — | ~3.6k | Automated safety check: Pass | MIT | |
| Golang Patternsantoniopaya22/go-rest-template | 172 | 9 repos | ~3.5k | Automated safety check: Pass | None | |
| Golang Proantoniopaya22/go-rest-template | 172 | 3 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Context Handling in fp-goIBM/fp-go | 2k | — | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| fp-go HTTP Client PatternsIBM/fp-go | 2k | — | ~4.4k | Automated safety check: Pass | Apache-2.0 | |
| Go Concurrencyinference-gateway/inference-gateway | 214 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 |
antoniopaya22/go-rest-template
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
antoniopaya22/go-rest-template
Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with…
IBM/fp-go
Covers handling Go's context.Context idiomatically in fp-go code: reading and scoping context through operators, timeouts, cancellation and converting ctx-first functions.
IBM/fp-go
Shows how to build composable, context-aware HTTP pipelines in Go using fp-go's ReaderIOResult monad instead of raw net/http calls.
inference-gateway/inference-gateway
Idiomatic Go concurrency - sync primitives, channel semantics, the select statement, and the standard channel patterns (cancellation/done-channel, fan-out/fan-in, pipeline, or-done, context…
unxed/f4
Golang concurrency design — goroutine lifecycle and leak prevention, channels and select, channel ownership and direction, sync.Mutex/RWMutex/sync.Map/sync.Once/atomics, errgroup, singleflight…
affaan-m/ECC
Audits your installed Claude skills and commands for quality, with a quick mode for recently changed skills and a full mode that evaluates all of them through subagents.
affaan-m/ECC
Ingests, indexes, searches, edits and monitors video, audio and live streams through the VideoDB Python SDK, returning stream links, clips and timestamps.
affaan-m/ECC
Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references.
affaan-m/ECC
Scans installed skills for principles that recur across them and proposes rule-file changes: append, revise, add a section, create a file or leave as covered.
affaan-m/ECC
Builds DRAFT counterparty agreements from one markdown template and a small JSON spec per party, with clauses picked by the party's role.
affaan-m/ECC
Set an ECC-specific frontend design direction for production UI work.
Works with
Patrones idiomáticos de Go, buenas prácticas y convenciones para construir aplicaciones Go robustas, eficientes y mantenibles. Golang Patterns is an agent skill from affaan-m/ECC. Patrones idiomáticos de Go, buenas prácticas y convenciones para construir aplicaciones Go robustas, eficientes y mantenibles.
Golang Patterns fits situations like: tasks that involve Async programming.
Run `npx skills add affaan-m/ECC --skill golang-patterns -a claude-code`. Or copy the skill folder (docs/es/skills/golang-patterns in affaan-m/ECC) into .claude/skills/golang-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add affaan-m/ECC --skill golang-patterns -a codex`. Or copy the skill folder (docs/es/skills/golang-patterns in affaan-m/ECC) into .agents/skills/golang-patterns in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add affaan-m/ECC --skill golang-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-patterns, .gemini/skills/golang-patterns, .github/skills/golang-patterns and .opencode/skills/golang-patterns in your project.
Going by SKILL.md and its folder, Golang Patterns needs the command-line tools its instructions call (go).
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.
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.
Golang Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.6k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Golang Patterns: Golang Patterns (antoniopaya22/go-rest-template, 172 stars), Golang Pro (antoniopaya22/go-rest-template, 172 stars), Context Handling in fp-go (IBM/fp-go, 2k stars) and fp-go HTTP Client Patterns (IBM/fp-go, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
affaan-m (a GitHub user) maintains it in affaan-m/ECC, which has 276,111 GitHub stars. The repository holds 683 skills in this directory. The repository was last updated on October 10, 2026.
Source: affaan-m/ECC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.